Posts

Featured post

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

i'm trying implement crud operation using datatableseditor using datatables.but i'm getting error messages: 1)uncaught exception: datatables editor - remote hosting of code not allowed. please see http://editor.datatables.net details on how purchase editor license 2)typeerror: a.editor undefined 3) $.fn.datatable.editor not constructor" what reason? here configuration: <%@ page language="java" contenttype="text/html; charset=iso-8859-1" pageencoding="iso-8859-1"%> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>insert title here</title> <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.12/css/jquery.datatables.min.css"> <link re...

Regex Matching Words in XML Between Two Other Words (Matlab regexp) -

i'm trying parse xml file using matlab regexp. retrieve array of incidences of word "curvepoint" occuring between "deposits" , "/deposits". xml below should [6x1] array like " <curvepoint> <curvepoint> <curvepoint> <curvepoint> <curvepoint> <curvepoint> " my attempt below doesn't work there lots of other text interspersed between each "curvepoint" word-incidence , look-aheads/backs, don't know how handle this. regexp(xmltext,'(?<=<deposits>)(<curvepoint>)(?=</deposits>)','match')' xmltext is <?xml version="1.0" encoding="utf-8"?> <interestratecurve> <effectiveasof>2016-11-07</effectiveasof> <currency>eur</currency> <baddayconvention>m</baddayconvention> <deposits> <daycountconvention>act/360</daycountconvention> <snapti...

distributed computing - How to run Tensorflow on SLURM cluster with properly configured parameter server? -

i in fortunate position of having access university's slurm powered gpu cluster. have been trying tensorflow run in cluster node, far have failed find documentation. (everyone have spoken @ university has run using cpu nodes before or using single gpu node. i found excellent bit of documentation previous question here . unfortunately, it's rather incomplete. of other distributed examples have found such such this 1 rely on explicitly specifying parameter server. when try run using code question, appears work until either fails connect nonexistent parameter server or hangs when server.join called , no print outs provided sbatch outfile (which understand should happen). so in short, question how 1 go starting tensorflow on slurm cluster? sbatch stage onwards. first time dealing distributed computing framework besides spark on aws , love learn more how configure tensorflow. how specify 1 of items in tf_hostlist example server parameter server? alternatively can use sbat...

python - multiprocessing pool with map -

i try multiprocess code this: param_seq = [] pool = pool(multiprocessing.cpu_count()-1) def work(param_set): (_, v) = experiment_sim(param_set[0], param_set[1]) v_dev = np.subtract(exp_v, v) return - np.sum(np.square(v_dev)) / (2 * noise_sigma ** 2) x in ra.values: y in gpas.values: param_seq.append((x, y)) likelihood = pool.map(work, param_seq) and looks working fine, work, in , stops , nothing , have stop program. following message occurs: process poolworker-8: process poolworker-10: process poolworker-13: process poolworker-14: process poolworker-11: process poolworker-12: traceback (most recent call last): traceback (most recent call last): traceback (most recent call last): traceback (most recent call last): traceback (most recent call last): traceback (most recent call last): file "/usr/local/cellar/python/2.7.11/frameworks/python.framework/versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap file ...

python - Poor performance of db. inserts using django-mssql -

i designed data warehousing application, struggle poor performance when fetching data source , saving them db. - approximately 150 kb/s. because of limitations imposed customer, forced use django on 64bit win machine , save data ms sql express (exact versions below). using django-mssql (1.7) backend. original data stored in .dbf file (visual foxpro), dbfread returns each row file python dict (this not issue, tested running reader discarding data). dictionary checked data quality (function sanitize_value_for_db() below), data copied django data model (attributes of object populated; tables wide, hence each table/object has 100 columns/attributes) , objects saved db. using django objects.bulk_create() (in batches of 50-100). i run code through profiler using cprofile , pstats modules. results below. see of time spent in pywin. have no clue if there can do. hints or opinions appreciated. thanks. configuration: xeon e5-2403 v2 @ 1,8 ghz, 30 gb ram windows server 2012...

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -

i trying convert json java object use of gson in maven, following youtube video guidance - https://www.youtube.com/watch?v=vqgghm9pwe0 , theres error occurs when in main class error - package com.squareup.okhttp3 doesn't exist. code below: java package com.codebeasty.json; import com.squareup.okhttp3.okhttpclient; public class main { private static okhttpclient client = new okhttpclient(); public static void main (string [] args) { } } i put in dependency in pom.xml: <dependencies> <dependency> <groupid>com.squareup.okhttp3</groupid> <artifactid>okhttp</artifactid> <version>3.4.2</version> </dependency> <dependency> <groupid>com.google.code.gson</groupid> <artifactid>gson</artifactid> <version>2.8.0</version> </dependency> </dependencies> i dont understand why doesn't recognize com.squareup. there may need download? have downl...

Generate uuid based on some value and retrive c# -

i need generate uuid based on (userid+time+ip) @ client side, , retrive details uuid (which user passes me through phone). what need in detail user,time , ip should encoded in uuid such way uuid self not reveal details after processing should able details. how encode values in uuid , retrive them ? suggested answer:(by vivek nuna) this code works fine generating uuid , how retrive userid,time , ip uuid ? string input = "userid"+"time"+"ip"; using (md5 sha256 = md5.create()) { byte[] hash = sha256.computehash(encoding.default.getbytes(input)); guid result = new guid(hash); }