Posts

c++ - Why am I getting "error: type name is not allowed" with these spaghetti templates? -

this question has answer here: where , why have put “template” , “typename” keywords? 5 answers i have following code bit of "spaghetti" of templates: template <typename a, typename b, typename... args> class c { /*... */ bar& getbar() { /* ... */ } public: template <typename u> static void foo() { a = geta<u>(); baz& bar = getbar(); bar.frob<u>(a); /* @@@ */ } /*... */ } /* no template */ class d : public c<somea, d, const somee&> { /* ... */ } /* no template */ class f : public d { /* ... */} and when try compile function following statement: d::foo<f>(); i error type name not allowed , on line marked @@@ . why getting that? know when try call function type name, doesn't i'm doing here. it's classic template ambiguity, unfortunat...

android fragments - Changing background (image not color) of an activity with a button. ENG/HUN -

im working on own application contains thoughts, ideas of life. system works like random facts app , clicking on button , idea (a textview) changing. made settext text changing , multiple texts in string. what want achieve: 1. background (i made multiple png files) changing when button click. (not text). 2. prefer swipe action button click method, because go forward. next button, , want swipe previous text , swipe right next text. these complicated classes , xmls :/ ( hope can understand) mainactivity.java public class mainactivity extends appcompatactivity implements navigationview.onnavigationitemselectedlistener { navigationview navigationview = null; toolbar toolbar = null; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); //set fragment mainfragment fragment = new mainfragment(); android.support.v4.app.fragmenttransaction fragmenttr...

PHP mkdir() Invalid Path -

i'm trying save files on server, , prerequisite, create directories don't exist. i running script, dl.php , @ /home/public_html/www3/scripts/dl.php : $request['savedir'] = '/home/public_html/www3/scripts/images/logs'; if( !is_dir($request['savedir']) ) mkdir($request['savedir']); and get: warning: mkdir(): invalid path in /home/public_html/www3/scripts/dl.php the "images" exist. please check "images" folder owner , permissions. requires write enabled used "apache" user/group when executed in browser. error "permissions" since not visible "apache" user.

java - Add space between string to display in HTML file -

i doing assignment create html java code. knows how add space between words? example, when type java fun then create html display word without space javafun i did try add space textrow.append("<td>" + words.get(i).getword().replaceall("", " ") + "</td>"); didn't work this code: private void addwordlist(arraylist<wordtracker> words) { // holds 1 line of table text @ time. out.write("<table align='center' >"); stringbuilder textrow = new stringbuilder(); int rowcounter = 0; (int = 0; < words.size(); i++) { if (rowcounter == 0) { textrow.append("<tr class='answerkey'>"); } textrow.append("<td>" + words.get(i).getword() + "</td>"); rowcounter++; if (rowcounter == 5 || == words.size() - 1) { rowcounter = 0; textrow.append("...

reactjs - React rerender only one child -

in form have few dropdown components. whenever first dropdown option changes want update props second dropdown , rerender it. code looks this handleprojectchange(option) { //this.setstate({ selectedproject: option }) this.refs.phase.props = option.phases; //this.refs.forceupdate() this.refs.phase.render() } render() { var projectoptions = this.projectoptions var defaultprojectoption = this.state.selectedproject var phaseoptions = defaultprojectoption.phaseoptions var defaultphaseoption = phaseoptions[0] var worktypeoptions = api.worktypes().map(x => { return { value: x, label: x } }) var defaultworktypeoption = worktypeoptions[0] return ( <div> <dropdown ref='project' options={projectoptions} value={defaultprojectoption} onchange={this.handleprojectchange.bind(this)} /> <dropdown ref='phase' options={phaseoptions} value={defaultphaseoption} /> <dropdow...

java - setOnMouseDragged not working on browser view -

Image
i'm writing simple application in java using jxbrowser engine i'm stuck @ beginning. in code, there undecorated stage want make draggable. so, searched , found following link: how drag undecorated window so set mousepressed , mousedragged event on stackpane mousepressed event gets fired , mousedragged event no way gets fired. idea of what's problem? thanks in advance. import com.teamdev.jxbrowser.chromium.browser; import com.teamdev.jxbrowser.chromium.javafx.browserview; import javafx.application.application; import javafx.application.platform; import javafx.event.eventhandler; import javafx.scene.scene; import javafx.scene.input.mouseevent; import javafx.scene.layout.stackpane; import javafx.stage.stage; import javafx.stage.stagestyle; private static double xoffset = 0; private static double yoffset = 0; public class main extends application { public static void main(string[] args) { launch(args); } @override public void sta...

ios - Do I need to edit provisioning after changing AppID -

Image
i have app on appstore. until day not using push notifications. right add aps app. edited appid generate ssl certificates push notification server. need regenerate provisioning profile associated changed appid? yes regenerate provisioning profile when changing app id . as seen in documentation , if change app id, need change provisioning profile. as exemplified in diagram below (for team provisioning profile) , explained here , provisioning profile contain set of iphone development certificates, unique device identifiers , app id . you can edit app id directly using member center. in member center, select certificates, identifiers & profiles. under identifiers, select app ids. select app id want change, , click edit. select corresponding checkboxes enable app services want allow. followed by later, you’ll regenerate provisioning profiles use app id.