Search Results

Search found 7 results on 1 pages for 'minner'.

Page 1/1 | 1 

  • How do I get an HP 1018 laser printer to work on 12.04?

    - by MInner
    edit : already printed on windows-machine Ubuntu 12.04, LJ 1018. I've tried making foo2zjs from sourse. I've downloaded firmware and placed it where necessarily manually from here I've also tried this - same as manual dowload but with some patches like stoping cups, etc.. I've fixed usbfs: process 11200 (usb) did not claim interface 0 before use problems using sudo rmmod usblp as described here. And now I have Aug 10 11:51:59 pav /usr/sbin/hplj1018: foo2zjs: usb://HP/LaserJet%201018?serial=KP07RLV... download failed. Aug 10 11:51:59 pav /usr/sbin/hplj1018: foo2zjs: loading HP LaserJet 1018 firmware /lib/firmware/hp/sihp1018.dl to CUPS USB device ... error. Before that prinet was stucking on "Sending data to printer". Now it's code is "Not connected". Unless ben@pav:~$ lsusb ... Bus 001 Device 015: ID 03f0:4117 Hewlett-Packard LaserJet 1018 Thank you.

    Read the article

  • Difference between coder and programmer in common examples, rules

    - by MInner
    Real definition is a kind of definition based on out-of-subjects axioms, rules. (Subjective, I know.) It's easy to speak about 'difference ..' with person, who's in programming. But usually it's quite hard to show difference to the person who have never used to write program. How do you think - which examples, analogies, logical chains are best for showing this kind of difference. The only example, which comes to mind is - economist (coder) and mathematician (programmer). How do you feel about it?

    Read the article

  • C++: casting to void* and back

    - by MInner
    * ---Edit - now the whole sourse* When I debug it on the end, "get" and "value" have different values! Probably, I convert to void* and back to User the wrong way? #include <db_cxx.h> #include <stdio.h> struct User{ User(){} int name; int town; User(int a){}; inline int get_index(int a){ return town; } //for another stuff }; int main(){ try { DbEnv* env = new DbEnv(NULL); env->open("./", DB_CREATE | DB_INIT_MPOOL | DB_THREAD | DB_INIT_LOCK | DB_INIT_TXN | DB_RECOVER | DB_INIT_LOG, 0); Db* datab = new Db(env, 0); datab->open(NULL, "db.dbf", NULL, DB_BTREE, DB_CREATE | DB_AUTO_COMMIT, 0); Dbt key, value, get; char a[10] = "bbaaccd"; User u; u.name = 1; u.town = 34; key.set_data(a); key.set_size(strlen(a) + 1 ); value.set_data((void*)&u); value.set_size(sizeof(u)); get.set_flags(DB_DBT_MALLOC); DbTxn* txn; env->txn_begin(NULL, &txn, 0); datab->put(txn, &key, &value, 0); datab->get(txn, &key, &get, 0); txn->commit(0); User g; g = *((User*)&get); printf("%d", g.town); getchar(); return 0; }catch (DbException &e){ printf("%s", e.what()); getchar(); } solution create a kind of "serializator" what would convert all POD's into void* and then will unite these pieces PS Or I'd rewrite User into POD type and everything will be all right, I hope. Add It's strange, but... I cast a defenetly non-pod object to void* and back (it has std::string inside) and it's all right (without sending it to the db and back). How could it be? And after I cast and send 'trough' db defenetly pod object (no extra methods, all members are pod, it's a simple struct {int a; int b; ...}) I get back dirted one. What's wrong with my approach? Add about week after first 'add' Damn... I've compiled it ones, just for have a look at which kind of dirt it returnes, and oh! it's okay!... I can't ! ... AAh!.. Lord... A reasonable question (in 99.999 percent of situations right answer is 'my', but... here...) - whos is this fault? My or VSs?

    Read the article

  • C++: Best text accumulator

    - by MInner
    Text gets accumulates piecemeal before being sent to client. Now we use own class that allocates memory for each piece as char massive. (Anyway, works like char[][] + std::list<char*>). Then we build the whole string, convert it into std::sting and then create boost::asio::streambuf using it. That's slow enough, I assume. Correct me if I'm wrong. I know, in many cases simple FILE type from stdio.h is used. How does it works? Allocates memory at every write into it. So, is it faster and is there any way to read into boost::asio::streambuf from FILE?

    Read the article

  • C++: Most common way to talk to one application from the other one

    - by MInner
    In bare outlines, I've got an application which looks through the directories at startup and creates special files' index - after that it works like daemon. The other application creates such 'special' files and places them in some directory. What way of informing the first application about a new file (to index it) is the most common, simple (the first one is run-time, so it shouldn't slow it too much), and cross-platform if it is possible? I've looked through RPC and IPC but they are too heavy (also non-cross-platform and slow (need a lot of features to work - I need a simple light well-working way), probably).

    Read the article

  • Linking ?++ - BDB - LNK2001

    - by MInner
    BDB is compiled on the same PC, under same VS. #include <db_cxx.h> int main(){ Db b(NULL, 0); return 0; } 1main.obj : error LNK2001: unresolved external symbol ""public: virtual __thiscall Db::~Db(void)" (??1Db@@UAE@XZ)" 1main.obj : error LNK2001: unresolved external symbol ""public: __thiscall Db::Db(class DbEnv *,unsigned int)" (??0Db@@QAE@PAVDbEnv@@I@Z)" what could be wrong?

    Read the article

1