Posts

smtp - Linux postfix/dovecot 554 Relay access denied -

i have error 554 relay access denied when trying send email outlook client. i can read incoming mails cannot send. if connect telnet localhost 25 can send external emails, outlook client doesn't work. here's postfix , dovecot config : postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix inet_interfaces = mailbox_size_limit = 0 mydestination = localhost myhostname = mail.mydomain.com mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relayhost = smtpd_banner = $myhostname esmtp $mail_name (ubuntu) smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/ssl/certs/dovecot.pem smtpd_tls_key_file = /etc/ssl/private/do...

c++ - Strange behavior of copy-/move-constructors & how to return large objects? -

i have been experimenting c++11 again recently, after absence, , after reading many articles on internet thoroughly confused efficient way return large objects factory functions (basically, data analysis database). i have become fan of unique_ptr, read in several articles because of new move-constructors possible return big vector by value , because of these new semantics should fast copying 1 pointer. to try out, wrote small test program outputs in various constructors: #include <iostream> #include <memory> using namespace std; class c { public: c( string n ) : _name{n} { cout << "constructing c named '" << _name << "'\n"; }; c() : _name( "empty" ) { cout << "default-constructing c named '" << _name << "'\n"; } ; // default-ctor c( const c& c ) : _name{c._name} { _name += " [copied]"; cout << "copy-c...

dds - OpenSliceDDS across a network -

i new dds world. understand basic concepts publish , subscribe, , stuff can gained documentation. attempting use openslice dds, , able through tutorial without difficulty. however, want 2 different computers on same network talk each other, seems relatively simple task, can find no documentation on it. for example, message chat room tutorial... how message board running on 1 machine, , chatter on machine? thanks! found it! http://opensplice.org/pipermail/developer/2009-july/000094.html . to summarize link: setup environment on node 1 running release file in ospl_home directory (release.bat) start opensplice daemon on node 1 (ospl start) run messageboard application on node 1 setup environment on node 1 running release file in ospl_home directory (release.bat) start opensplice daemon on node 2 (ospl start) run chatter application on node 2

javascript - switch multiple images on click -

i have code switch image , forth , works fine. however, wondering if there way rewrite script can use in multiple places. code currently: function swaparrows(obj) { var x=document.images if (x[0].src.match('images/editloadout.png')) { x[0].src="images/editloadoutopen.png"; } else if (x[0].src.match('editloadoutopen.png')) { x[0].src="images/editloadout.png"; } } <img src="images/editloadout.png" onclick="swaparrows()" /> which works 1 specific instance only. work in multiple places different pictures entirely. pass 2 images in swap function, , use actual clicked object's src: function swaparrows(obj, i1, i2) { var src = obj.getattribute('src'); if (src.match(i1)) obj.setattribute('src', i2); else obj.setattribute('src', i1); } where html is: <img src="...

python - Flask Principal granular resource on demand -

i've been looking @ post: http://pythonhosted.org/flask-principal/#granular-resource-protection now while there nothing wrong how working can't see usable since @ time of login posts read , editblogpostneed added identity. imagine if have been writing more normal number of posts long term not strategy check post access view /posts/<post_id> . is there way check on each request view using flask principal ? i can of course around lazy relationship query , filter want use flask principal . not sure understand question entirely, might help. in flask app, i'm using flask-principal role permission such admin , editor, , i'm using granular resource protection described in flask-principal docs . in case i'm checking if user has permission access particular account. in each view identity loaded , permission checked. in view : @login_required def call_list(id, page=1): dept = models.department.query.get_or_404(id) view_permission = au...

simulating phone call in Android app for a wristband -

i have android app receives tasks server, environment used noisy , vibration not work , device on user's belt. thought use "smart" wristbands vibrate or glow , show caller id. smart watches expensive such wrist band if simulate phone call application. there way create call app on android?

html - Using PHP to insert data into a MySQL Database -

i'm trying create self-submitting page create form user fill out. information stored in mysql database. form seems working, can't insert information form database reason. here's have: <!doctype html> <html> <head> <title>mysql test</title> </head> <body> <h1>mysql test</h1> <?php if($_server["request_method"] == "get") { ?> <form action="" method="post"> <input type="text" name="name" placeholder="name" /><br /> <input type="submit" value="send" /> </form> <?php } else if ($_server["request_method"] == "post") { $name = $_post["name"]; $server = new pdo("mysql:dbname=test;host=localhost", "...