Android: Use two service of one service

Uncategorized
Question: I just start to develop android applications, so my question can be not meaningful! :)) I develop an application which I use cacheword library to handle the password! Now I want to create a fake password for the app, that I mean I want to have two password for my application, but when I create an object of casheword, if I set the password once, I cannot set the other password for it. So I think if I can have two service of casheword it can be work. (I really don't know it is meaningful or not) Can I do that?If yes, how? And if I can't, can you suggest me a solution for this problem? Thanks :) Answer: Read more
Read More

Pass $event with angularjs expression but get undefined value

Uncategorized
Question: I'm trying to get where the directives are but got undefined value HTML code:{{test($event)}} My controller function:$scope.test = function(e) { console.log(e); }; // return e = undefined Can I get the target, which call test function in this case? Thanks! Answer: $event property is only available when the expression is used in 'action' directives such as ng-click or ng-enter A quick google search can give you an explanation. Edit To add on, double curly braces {{}} generates markup with the evaluated expression provided. So no DOM event are utilized Read more
Read More

Livekitchen | Restaurant Cafe WordPress Theme

Uncategorized
Livekitchen Restaurant is a clean and modern WordPress theme for Cafe & Restaurant and any food related business web site. Built with the latest WordPress technology. Livekitchen Restaurant theme support responsive layout so it looks great on all devices And also fastest page loading. It has predefined styling for Modern Cuisine Restaurant, Asian Food Restaurant and Elegant Food Restaurant which can be imported with one click.
Read More

npm install admin privileges issues

Uncategorized
Question: I am trying to install some npm packages, I am getting below error and my system is not having admin privileges. Please let me know how to fix this issue with out having system admin rights in my system. C:Usersgavvarugitgurumy-app>npm install eslint-plugin-import eslint-plugin-flowtype eslint-plugin-jsx-a11y eslint-plugin -react npm ERR! path C:Usersgavvarugitgurumy-appnode_modulesfseventsnode_modulesgetpassnode_modules npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall lstat npm ERR! Error: EPERM: operation not permitted, lstat 'C:Usersgavvarugitgurumy-appnode_modulesfseventsnode_modulesge tpassnode_modules' npm ERR! at Error (native) npm ERR! { [Error: EPERM: operation not permitted, lstat 'C:Usersgavvarugitgurumy-appnode_modulesfseventsnode_module sgetpassnode_modules'] npm ERR! stack: 'Error: EPERM: operation not permitted, lstat 'C:Usersgavvarugitgurumy-appnode_modulesfseven tsnode_modulesgetpassnode_modules'n at Error (native)', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'lstat', npm ERR! path: 'C:Usersgavvarugitgurumy-appnode_modulesfseventsnode_modulesgetpassnode_modules' } npm ERR! npm ERR! Please try running this command again…
Read More

Formatting mongodb query to create pandas DataFrame from nodechef – issue with character limit

python
Question: I'm trying to import data from nodechef using MongoClient. I have been able to download a table for each specific collection using the following code: from pymongo import MongoClient import pandas as pd client = MongoClient("mongodb://xxxx.nodechef.com:xxx") db = client.xxxx users= pd.DataFrame(list(db['collection'].find())) However, in the dataframe that is returned, there appears to be a 50 character limit for the string variables so that they are not being returned in full. {'email': '', 'question1': 1991, 'question3': ... {'email': 'x', 'question1': 1980, 'question3':... Each case for this variable in the dataframe is cut short. I've tried to find out how to extend this or remove potential character limits though have not been successful. I think this might be to do with the .find() method and parameters within it though I'm fairly new…
Read More

Session resets on every page reload

Uncategorized
Question: I was developing a laravel application on my windows machine and project was working fine there. The project was synced with dropbox and when i moved to mac my laravel project is not working here on macos. The issue i am facing is that it regenerates session id on each page reload. I am using database as session storage and it adds a new entry in database. I have tried using file driver as session storage and same thing happens that it creates a new file in storage/framework/session which justifies that file permissions are ok and writeable. All of my forms have stopped working and getting TokenMismatchException in VerifyCsrfToken.php Permission of storage folder and session folder is 755 Each reload on the application adds a new entry in the…
Read More

Luxury Spa and Beauty Html Template

Uncategorized
Luxury Spa and Beauty Html Template follows latest trends of Design and provides complete solution for websites created for beauty product or Spa based. Templates have elegant design and will give your website fresh looks and boost your sell by 30%. Checkout out our Template and if you like. Please do not forget to rate Template Template have followed all the necessary pages for Spa and Beauty websites. Template focus on beauty products only. and Designed for only Beauty and Spa Websites. Because of free Icons and Fonts used in this template, Any Designer can make changes into template easily. Template is easy to convert into any type of website like : WordPress, Joomla, static html, Custom Framework.
Read More

SQLSTATE[HY000] [1049] Unknown database 'TestProject_testing'

Uncategorized
Question: I'm trying to run tests on my office's project using codeception, however wen I run them, I get the following error: "SQLSTATE[HY000] [1049] Unknown database 'TestProject_testing'" Could someone please tell me how to see what databases there are as well as how I can make the codeception tests work since this is the error that is shown for every single one of them. Thanks in advance. Answer: Read more
Read More

DataTable Extension methods C#

c#
Question: I have a method to perform operation in Datatable. public DataTable SetColumnsOrder(DataTable table, String[] columnNames) { int columnIndex = 0; foreach (var columnName in columnNames) { if (table.Columns.Contains(columnName)) { table.Columns[columnName].SetOrdinal(columnIndex); columnIndex++; } } return table; } To access this method I need to do like this dt = SetColumnsOrder(dt,colNames); Instead of doing like this, how to create a function to call it like below in c# dt.SetColumnOrder(colNames); where the function should take dt as input to perform operations and store back in same dt. Answer: First of all, you don't need to return the same DataTable that you pass in. You could change your method signature to:public void SetColumnsOrder(DataTable table, String[] columnNames) and remove the return, and it would still work the same (obviously you'd call it like SetColumnsOrder(dt,colNames);…
Read More

How to solve neural network accuracy become constant issue?

Uncategorized
Question: I am using some simple model:model = Sequential() model.add(Dense(12, input_dim=len(allKeys), activation='tanh', kernel_initializer='uniform')) model.add(Dense(31, activation='tanh')) model.add(Dense(N, activation='relu')) model.compile(optimizer='adam',loss='categorical_crossentropy',metrics=['accuracy']) model.fit(X, Y, epochs=500, batch_size=40) X.shape (31, 147) Y.shape (31, 13) the values in X are either 0 or some under lower than 1.0. Y, is sparse array, one column in one row is 1, the rest columns are 0. The acc is always lower than 0.25. Most time it just 0.12. If I add dropout layer, I see the acc values change, but not above 0.25, most time just gave worse result. Epoch 290/500 31/31 [==============================] - 0s - loss: 9.6283 - acc: 0.1290 Epoch 291/500 31/31 [==============================] - 0s - loss: 9.6283 - acc: 0.1290 Epoch 292/500 31/31 [==============================] - 0s - loss: 9.6283 - acc: 0.1290 Any suggestion to improve?…
Read More

installation of octave with gui

Uncategorized
Question: I know this is very noobish question but only way to get through this is ask for help. So here it is, I installed octave-4.2.1 from octave-4.2.1.tar.xz by following standard procedure of extracting , ./configure, make , make install etc. It seems only octave-cli is installed when I fire octave--force-gui nothing happens. My question is what all I must do in order to get octave-gui working? also if it's not installed how can I install it without hampering octave-cli? Answer: Read more
Read More