Posts

c++ - Error compiling grpc generated source -

im running issues compiling both example route_guide generated source own. im sure user error im not sure issue is. error seems hint grpc_final wasn't able find reference to. $ protoc --version libprotoc 3.0.0 ./route_guide.grpc.pb.h:29:2: error: expected expression public: ^ ./route_guide.grpc.pb.h:28:18: error: variable has incomplete type 'class routeguide' class routeguide grpc_final { ^ ./route_guide.grpc.pb.h:28:7: note: forward declaration of 'routeguide::routeguide' class routeguide grpc_final { ^ route_guide.grpc.pb.cc:25:18: error: incomplete type 'routeguide::routeguide' named in nested name specifier std::unique_ptr< routeguide::stub> routeguide::newstub(const std::shared_ptr< ::grpc::channelinterface>& channel, const ::grpc::stuboptions& options) { ^~~~~~~~~~~~ ./route_guide.grpc.pb.h:28:7: note: forward declaration of 'routeguide::routeguide' class routeguide grpc_fin...

html - Centering Navbar Content -

can me center links on nav bar please. have been trying last 45 minutes. every time use display: flex , justify-content: center works until hamburger button appears , clicked on , floats left. any massively appreciated. thank you reece .navbar { background-color: #000; justify-content: center; height: auto; font-family: gill sans, verdana; font-size: 15px; line-height: 18px; text-transform: uppercase; letter-spacing: 2px; font-weight: bold; } nav li:hover { background-color: #c00; margin: 0; } <nav> <div class="navbar-container"> <!--navbar container start --> <nav class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar-header"> <button aria-controls="navbar" aria-expanded="false" class="navbar-toggle" data-target="#navbar" data-toggle="collapse" type="button"> ...

android - Signup Firebase user without e-mail address -

i'm using following steps sign-up new firebase user. there way me set username parameter in future user can login using username & password ? also, there way sign using username & password ,ie, not have option of e-mail id. i've gone through following solution, doesn't seem efficient. suppose there better way of doing so. firebase login , signup username private firebaseauth auth; //get firebase auth instance auth = firebaseauth.getinstance(); //create user auth.createuserwithemailandpassword(email, password) .addoncompletelistener(signupactivity.this, new oncompletelistener<authresult>() { @override public void oncomplete(@nonnull task<authresult> task) { toast.maketext(signupactivity.this, "createuserwithemail:oncomplete:" + task.issuccessful(), toast.length_short).show(); // if sign in...

Installing a progressive web app (PWA) on Chromebook -

i'm developing pwa works fine such on desktop , android. on android, can installed on home screen , runs offline. i expect makes app installable on chromebook well, allowing app icon installed task bar, example, without need dedicated "chrome app" (since see non technical reason that). however, can't find way install app manually on chromebook (chrome os 54) - there not seem "install" command in menu. is not supported (why?) or require special settings in manifest or something? i think equivalent, now, of installing progressive web app on chrome book, select more tools "customize , control" button (three vertical dots lately) , select add shelf. check "open window" option.

algorithm - Number of different binary sequences of length n generated using exactly k flip operations -

consider binary sequence b of length n . initially, bits set 0. define flip operation 2 arguments, flip(l,r) , such that: all bits indices between l , r "flipped", meaning bit value 1 becomes bit value 0 , vice-versa. more exactly, in range [l,r]: b[i] = !b[i]. nothing happens bits outside specified range. you asked determine number of possible different sequences can obtained using exactly k flip operations modulo arbitrary given number, let's call mod . more specifically, each test contains on first line number t , number of queries given. there t queries, each 1 being of form n , k , mod meaning above. 1 ≤ n, k ≤ 300 000 t ≤ 250 2 ≤ mod ≤ 1 000 000 007 sum of n-s in test ≤ 600 000 time limit: 2 seconds memory limit: 65536 kbytes example : input : 1 2 1 1000 output : 3 explanation : there single query. initial sequence 00. can following operations : flip(1,1) ⇒ 10 flip(2,2) ⇒ 01 flip(1,2) ⇒ 11 there 3 possible sequences can ge...

C# .net winforms data insert error -

Image
using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using system.text; using system.threading.tasks; using system.windows.forms; using system.data.sqlclient; namespace crudwithlogin { public partial class student_registration : form { sqlconnection conn = new sqlconnection(@"data source=(localdb)\mssqllocaldb;attachdbfilename=c:\users\android\documents\data.mdf;integrated security=true;connect timeout=30"); public student_registration() { initializecomponent(); } private void student_registration_load(object sender, eventargs e) { label1.text = "you logged in "+((form)this.mdiparent).controls["label1"].text; } private void button1_click(object sender, eventargs e) { conn.open(); sqlcommand cmd = conn.createcommand(); cmd.comman...

php - Do I have to implement the UserInterface for Users in Symfony -

i creating webpage symfony. there advantages in implementing userinterface symfony\component\security\core\user ? it seems me, interface not represent needs. example not need , want username rather email. you need implement many components e.g. security use it. your user can extended or simplified. username do public function getusername() { return $this->getemail(); }