Posts

reactjs - React lifecycle events cancel GSAP animation -

i'm trying use gsap react , i'm running situation animation gets cancelled. my component sidebar appears if 'show' property in state true. inside component, main functions are: shouldcomponentupdate(nextprops, nextstate) { return nextstate.show !== this.state.show; } componentwillupdate(nextprops, nextstate) { if (nextstate == true) { // animate sidebar in } else { // animate sidebar out } } togglesidebar() { const newstate = !this.state.show; this.setstate({ show: newstate }) } for reason, when click button trigger togglesidebar function, sidebar begins animate in , animates out. i have feeling because componentwillupdate returns i'm not sure. at point, i'm thinking of using transitiongroup , including gsap animation code in componentwillenter / componentwillleave lifecycle hooks can function i'm curious if there's way solve issue. one common reason togglesidebar gets called twice. happens safari browser,...

javascript - Update file referenced by require -

i have file ( app.js ) imports other js file ( config.js ) via require . imported file imports other files , on. i able read data of imported file in app.js , want update values in imported file. values in config.js coming other imported files. tried update values in following way, not update them: app.js let config = require ( 'config.js' ); config.db.user = "newuser"; config.js const dbconfig = require ( './config-db' ); const assetsconfig = require ( './config-assets' ); const smtpconfig = require ( './config-smtp' ); module.exports = { db : dbconfig.db, assets : assetsconfig.assets, smtp : smtpconfig.email }; config-db.js module.exports = { db : { user : 'user', password : '******', server : 'test-db.test.com', database : 'testdb', timezone : '+02:00' } }; ...

c# - Open groups and details in Devexpress Grid view by Name -

Image
i'm developing winform application contains devexpress gridview composed follow: hotel view (grouped location , hotel name column) availability view (is detailed view of hotel grid , contains availability selected hotel) i have data in input: location name , hotel name . when open form need expand corresponding group location , hotel name , open detail view availability hotel. in attachment can find screenshot of grid row expanded need. can me that? the code have tried following, opens location group , not hotel name , it's details. private void hotelavailabilitygridview_endgrouping(object sender, eventargs e) { focusfirstrecordingrouprow(_hotelname); } public void focusfirstrecordingrouprow(string texttofind) { int grouprow = findgrouprow(_hotelname); if (grouprow >= 0) return; hotelgridview.expandgrouprow(grouprow); hotelgridview.focusedrowhandle = hotelgridview.getchildrowhandle(grouprow, 0); } private int findgrouprow(string t...

mvc5 - how to work with summernote editor in edit action in asp.net mvc 5 its working in create but not even coming in edit part -

how work summernote editor in edit action in asp.net mvc 5, working in create not coming in edit action. <b> <textarea class="m-0" name="descmarathi" id="descmarathi" data-plugin="summernote" data-options="{height: 250}" placeholder="description"></textarea> </b>

c - Relocation error -

#include <stdio.h> #define max 1000000 int dp[max]; int p[max], c[max], k[max], child[max][1000], index[max]; int mod = 1000000007; void dfs(int i) { int j = 1; while (j <= index[i]) { dfs(child[i][j]); if ((c[child[i][j]] == c[i]) && (k[i] - k[child[i][j]] == 1)) dp[i] = (dp[i] % mod + dp[child[i][j]] % mod) % mod; ++j; } } int main() { int t, n, x, i, j; scanf("%d", &t); while (t--) { scanf("%d%d", &n, &x); (i = 0; < n; ++i) index[i] = 0; (i = 1; < n; ++i) { scanf("%d", &p[i]); child[p[i]][++index[p[i]]] = i; } (i = 0; < n; ++i) scanf("%d", &c[i]); (i = 0; < n; ++i) { scanf("%d", &k[i]); if (k[i]) dp[i] = 0; else dp[i] = 1; } dfs(0); ...

android - Override/Upgrade application downloaded outside Google Play with new version uploaded and installed from Google Play -

currently, have downloadable apk outside of google play , thousands of users have downloaded , used it. question is: can upload same application google play (maybe same name, greater version), customers can download new version google play store override , upgrade current one, downloaded outside? yes, things make app unique signature , package name. if app in google play has same signature , same package , versioncode greater apk installed upgrade old one.

javascript - Vue js --The dependency was not found : ts-loader not compiling -

the scenario: there library generic vue js components used several projects , not using typscript. library seperate project , have seperate webpack settings. this library being consumed inside project git sub module atm , project( call main project here) using typscript , ts-loader compile js , ts . can 1 guide me wether problem because 1 project using ts , other not? module config? can access other folder , files outside of main project src directory, not components inside of library? if 1 has better way of doing the, thankful advise! /** webpack.base.conf (from main project **/ module: { { test: /\.ts$/, loader: 'ts-loader', include: [resolve('src'), resolve('test')], exclude: '/node_modules', options: { appendtssuffixto: [/\.vue$/] } } } inside of main projects component trying import 1 components library, unable ts-loader tells dependency not found /** header.vue (main p...