Posts

python - Why do these two arrays have the same shape? -

so trying create array , access columns name. came this: import numpy np data = np.ndarray(shape=(3,1000), dtype=[('x',np.float64), ('y',np.float64), ('z',np.float64)]) i confused why data.shape and data['x'].shape both come (3,1000), causing me issues when i'm trying populate data fields data['x'] = xvalues where xvalues has shape of (1000,). there better way this? the reason why comes out same because 'data' has bit more structure 1 revealed shape. example: data[0][0] returns : (6.9182540632428e-310, 6.9182540633353e-310, 6.9182540633851e-310) while data['x'][0][0]: returns 6.9182540632427993e-310 so data contains 3 rows , 1000 columns, , element of 3-tuple. data['x'] first element of tuple of combinations of 3 rows , 1000 columns, shape (3,1000) well.

Why can't I use an OR operator in a switch case for strings in C#? -

it says cannot use or on 2 strings in switch case (dental || vision). placing each option in own separate case work or messing syntax? thanks switch (gr.plantypefocus){ case "medical": createplanformedical(); break; case "dental" || "vision": //createplanfordental_vision break; case "ltd" || "life": //createplanforltd_life break; } } technically achieve 'or' using fall through switch (gr.plantypefocus){ case "medical": createplanformedical(); break; case "dental": case "vision": //createplanfordental_vision break; case "ltd": case "life": //createplanforltd_life break; }

jpa - Can Web sphere Liberty manage multiple JTA sources? -

when add more 1 jta-data-source in persistence.xml run runtime exception [error ] cwwjp0012e: persistence unit name not specified , unique persistence unit not found in coplinkrestservice application , coplinkrestservice.war module. [error ] cwwjp0029e: server cannot find persistence unit in coplinkrestservice.war module , coplinkrestservice application. [error ] cwnen0035e: java:comp/env/cldb reference of type javax.persistence.entitymanager null component in coplinkrestservice.war module of coplinkrestservice application cannot resolved. [error ] cntr0019e: ejb threw unexpected (non-declared) exception during invocation of method "getpersondetails". exception data: javax.ejb.ejbexception: java:comp/env/cldb reference of type javax.persistence.entitymanager null component in coplinkrestservice.war module of coplinkrestservice application cannot resolved. @ com.ibm.wsspi.injectionengine.injectionbinding.getinjectionobject(injectionbinding.java:1494) @ [...

cassandra - Cassandre did not delete old sstables created by full compact -

i have cf , set ttl 10 days. have cron job runs every 2 days. can see merged sstable after compaction. however,sometime, can still see sstables created/updated full compaction more 10 days ago in disk. restarting not force cassandra delete old files. anyway rid of them.

ssis - Cannot see Integration Services Catalogs node in SQL Server Management Studio (SSMS) -

Image
i wanted create ssis catalog , way create catalog right click on "integration services catalogs" node , select "create catalog" option. however, not able see "integration services catalogs" node in sql server management studio (ssms) shown in following image. what missing can see node in ssms? please help. fyi, have sql server 2014 (developer edition) , integration services 12.0 installed on machine. got resolved me! fyi, had launch sql server setup again , install named instance (\) of sql server. so, when connect named instance of sql server able see "integration services catalogs" node on object explorer (see below). however, although resolved me , able move forward now, not sure why not able show me node when connect sql server default instance. ms technet reference

Cordova multiple Html files -

in cordova app index.html redirects main.html when ondeviceready event. can't use plug-ins in main.html . need enable in cordova main.html work? avoid using multiple html files, keep cordova application "on same page" having other content in other html files or template fragment files, , loading these in via ajax / javascript div in index.html "cur. might want consider templating engine such handlebars , depending on javascript framework(s) using build app other options may more attractive. example project on github have uses approach can found here .

What will go in the field 'Deauthorize Callback URL' and 'Valid OAuth redirect URIs' to enable facebook login on ezpublish? -

i using ezpublish version 4.3 , trying integrate facebook login users in system. followed instructions @ facebook login ezpublish however, requires me configure 2 values in facebook app of mine i.e. deauthorize callback url , valid oauth redirect uris . not sure oauth uri format used in ezpublish login/ failed login. please suggest solution.