Posts

Showing posts from February, 2012

Eclipse dynamic web project has multiple deployment descriptors -

Image
i have eclipse dynamic web project has multiple deployment descriptors (2 extra) adversely affecting deployment: i not know how came be, nor how rid of them. there 1 web.xml file in project located in webcontent/web-inf how eliminate descriptors? edit created new dynamic web project in workspace. new project has 1 deployment descriptor: furthermore, contents of .settings folder : whereas .settings folder project deployment descriptors:

excel - Open Text File and Split() with exclamation mark as delimiter -

should simple think, can't seem work. tried 2 methods opening text file (.txt) excel , splitting other option: "!" set workbookbk = workbooks.opentext(fullfilepath, xlmsdos, _ xldelimited, xldoublequote, false, false, false, false, false, true, "!") this syntax fine says "compile error: expected function or variable" missing?! i used set workbk = workbooks.open filename:= fullfilepath, delimiter:= "!" this opens file ok, doesn't split file @ all help appreciated if you're going skip arguments method, need explicitly specify arguments are supplying: workbook.opentext syntax (from msdn ) expression . opentext ( filename , origin , startrow , datatype , textqualifier , consecutivedelimiter , tab , semicolon , comma , space , other , otherchar , fieldinfo , textvisuallayout , decimalseparator , thousandsseparator , trailingminusnumbers , local ) expression variable represents workbooks object. ...

PHP/Java Bridge. How to connect from php server to desktop App -

i'm testing php/java bridge connection. , have simple example yet. php file is: require_once("http://localhost:8087/javabridge/java/java.inc"); $world = new java("helloworld"); echo $world->hello(array("from php")); and java file: import javax.swing.joptionpane; public class helloworld { public static final string javabridge_port="8087"; static final php.java.bridge.javabridgerunner runner = php.java.bridge.javabridgerunner.getinstance(javabridge_port); public static void main(string args[]) throws exception { runner.waitfor(); system.exit(0); } public void hello(string args[]) throws exception { joptionpane.showmessagedialog(null, "hello " + args[0]); } } everything works fine on 1 pc. have implement connection php server java desktop application on server not on localhost, "localhost:8087/javabridge/java/java.inc" won't work. in future java app print on printer data php w...

javascript - Amending D3 circle animation -

this simple question. here jsfiddle, animate circle between 2 nodes using d3 (original code mike bostock's): http://jsfiddle.net/guill84/uxy8d9vs/5/ . how stop circle returning node when it's reached node b? relevant bit of code follows: var path = d3.select("path#ab"), startpoint = pathstartpoint(path); marker.attr("r", 7) .attr("transform", "translate(" + startpoint + ")"); transition(); //get path start point placing marker function pathstartpoint(path) { var d = path.attr("d"), dsplitted = d.split(" "); return dsplitted[1].split(","); } function transition() { marker.transition() .duration(2000) .attrtween("transform", translatealong(path.node())); } function translatealong(path) { var l = path.gettotallength(); return function(i) { return function(t) { var p = path.getpointatlength(t * l); ...

dynamics crm - CRM 2016 OrganizationServiceProxy.EnableProxyTypes seems to hang -

we're changing architecture of our end systems , we've discovered need enable proxy types use in codeactivities workflows, using organizationserviceproxy.enableproxytypes method. however, whenever include method call makes workflow run extremely slow before failing. here code use call method: var service = servicefactory.createorganizationservice(context.userid); if (service organizationservice) { tracingservice.trace("enabling proxy types"); ((organizationserviceproxy)((organizationservice)service).innerservice).enableproxytypes(assembly); tracingservice.trace("proxy types enabled"); } any ideas? thanks i've never had pass assembly in parameter enableproxytypes. did try without passing assembly? also, there's way enable proxy types adding behaviors collection. here's example: public static iorganizationservice getorganizationservice(guid userid) { clientcredent...

android - How to change a textview from a custom view's class -

let's have custom view inside activity , textview below custom view. change textview 's text once custom view clicked seem null pointer when use findviewbyid() , how can that? <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context="com.yuvaleliav1gmail.quoridor_ye.mainactivity" android:background="#dd7d23"> <com.yuvaleliav1gmail.quoridor_ye.comboardview android:layout_width="90...

Index is still red after recovery in Elasticsearch. How to turn it green? -

i working es 2.2 after index recovery with post /_snapshot/s3_repository/snapshot_traces_291215/_restore { "include_global_state": false } my index still red red open traces_v2 3 1 here cluster health: { "cluster_name": "burst", "status": "red", "timed_out": false, "number_of_nodes": 1, "number_of_data_nodes": 1, "active_primary_shards": 0, "active_shards": 0, "relocating_shards": 0, "initializing_shards": 0, "unassigned_shards": 6, "delayed_unassigned_shards": 0, "number_of_pending_tasks": 0, "number_of_in_flight_fetch": 0, "task_max_waiting_in_queue_millis": 0, "active_shards_percent_as_number": 0 } i sure recovery complete. checked get /_cat/recovery?v get /_cat/_shards?v gives me: index shard prirep state docs store ip node tr...

python - numpy reshaping multdimensional array through arbitrary axis -

so question regarding use of reshape , how functions uses each axis on multidimensional scale . suppose have following array contains matrices indexed first index. what want achieve instead index columns of each matrix first index . in order illustrate problem, consider following example given numpy array indexes matrices first index z. x = np.arange(9).reshape((3, 3)) y = np.arange(9, 18).reshape((3, 3)) z = np.dstack((x, y)).t where z looks like: array([[[ 0, 3, 6], [ 1, 4, 7], [ 2, 5, 8]], [[ 9, 12, 15], [10, 13, 16], [11, 14, 17]]]) and shape (2, 3, 3) . here, first index 2 images , 3 x 3 matrix. the question more phrased then, how use reshape obtain following desired output : array([[ 0, 1, 2], [ 3, 4, 5], [ 6, 7, 8], [ 9, 10, 11], [12, 13, 14], [15, 16, 17]]) whose shape (6, 3) . achieves dimension of array indexes columns of matrix x , y presented above. natural inclination use reshape directly on z in followin...

google cloud storage - gsutil rsync uploading then immediately deleting file, leaving source and target in different states -

i have script running gsutil rsync -r -d -c , , leave source , target directories out of sync. last file in in list (named version.json) first uploaded, , deleted. has encountered bug? additional information: versioning turned off in target bucket this occurs when attempting overwrite entire contents of target bucket, present.

vue.js - Real time update between 2 components? -

is possible have realtime update of input fields between 2 components? in component have input field has v-model="value". wanna pass input realtime other component , fill input field. data of inputvalue should passed component 2 value props. or maybe i'm wrong result? component 1 <template> <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> <input class="mdl-textfield__input" type="text" id="global-{{element}}" v-model="inputvalue"> <label class="mdl-textfield__label" for="global-{{element}}">{{ label }}</label> </div> </template> component 2 <template> <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> <input name="items[{{prop1}}][{{element}}]" value="{{value}}" class="mdl-textfield__input" t...

powershell - "Access denied" error when trying to enumerate drives on remote computers -

i trying run powershell command total disk space of drives our remote servers. when run command getting error below. have text file has names of servers , have confirmed winrm configured , running. $servers = get-content "c:\users\anorris\desktop\dr\servers1.txt" foreach ($s in $servers) { invoke-command -computername $s {get-psdrive} } error: [ahv-a2acortst02] connecting remote server failed following error message : access denied. more information, see about_remote_troubleshooting topic. + categoryinfo : openerror: (:) [], psremotingtransportexception + fullyqualifiederrorid : pssessionstatebroken agreed message 'access denied' dead giveaway don't have access. i create credential variable , make sure credential has rights remote system. $creds = get-credential change code following (i added -scriptblock , bolded text $servers = get-content "c:\users\anorris\desktop\dr\servers1.txt" foreach ($s in $serv...

javascript - Use mini gmap extracts for steps on a track -

Image
i have particular question , don't find how explain : have google maps track , x steps on it. want add "mini" map extract in front of each waypoint make more readable. think way recreate x new maps, each 1 track on , concerned waypoint, i'm not absolutely sure it. do think there way use juste part of main map, in example ? main idea prevent page loading 8 differents maps, each 1 track, because i'm asuming bit hard load. thanks !

knockout.js - Rerender as HTML - JSON databind not supporting HTML - displaying tags -

working on application using knockout data binding. i'm not versed in data binding or front end stuff matter. have json data being pulled in , binded. looks after bind: <span data-bind="text: servicename"><a href="tst.com">here</a></span> and displays html tags on page shown: <a href="tst.com">here</a> the application have aspect uses data binding in similar fashion , supports html. i'm guessing kind of attribute or function force plain text? my questions: what should looking conversion? is there way re-render html via js after page has loaded? you can use html binding that. http://knockoutjs.com/documentation/html-binding.html <span data-bind="html: servicename"></span> this render value of servicename html inside span.

computer science - CISC and RISC architectures -

i read lot difference between cisc , risc architectures different sources. 1 of things seemed agreed upon cisc used von neumann whereas risc used harvard architecture. couldn't quite grasp reason behind classification. there no relations between instruction set ( risc , cisc ) architecture of processor ( harvard architecture , von neumann architecture ). both instruction set can used of architecture. older arm architecture used von neumann architecture risc, , later arm9 shifted harvard architecture risc. latest arm processor uses more advanced hybrid architecture.

system("") call in AWK executing only last line -

i have written awk script takes values file.txt , each row of file makes call system("...") . problem terminal takes last system call. i need every system("...") call being called each row of file.txt gets executed. for example: file.txt 00:00:6c:19:8f:b1:d8:27 10.0.0.10 1 00:00:6c:19:8f:b1:d8:27 10.0.0.11 1 00:00:6c:19:8f:b1:d8:28 10.0.0.12 3 00:00:6c:19:8f:b1:d8:28 10.0.0.11 2 for example file.awk: begin { } { switch_mac=$1 ip_dst=$2 output_port=$3 system("curl" " -d" " '{" "\"switch\""":" "\""switch_mac"\"""," "\"cookie\""":""\"1\"""," "\"priority\""":""\"2\"""," "\"eth_type\""":""\"0x0800\"""," "\"ipv4_dst\""":""\""ip_d...

python - NoneType object has no attribute 'encode' (Web Scrapping) -

i getting error 'nonetype' object has no attribute 'encode' when run code url = soup.find('div',attrs={"class":"entry-content"}).findall('div', attrs={"class":none}) fobj = open('d:\scrapping\parveen_urls.txt', 'w') getting in url: fobj.write(getting.string.encode('utf8')) but when use find instead of findall 1 url. how urls object findall? 'nonetype' object has no attribute 'encode' you using .string . if tag has multiple children .string none ( docs ): if tag’s child tag, , tag has .string, parent tag considered have same .string child: use .get_text() instead.

php - Laravel 5 : Use different database for testing and local -

how 1 change database development , testing on local system without editing .env file each time? i have found quite inconvenient practice tdd because of this. is possible laravel application differentiate between normal development , testing can choose appropriate database? create testing database configuration in laravel edit config\database.php file , add testing -array connections array: 'connections' = [ 'testing' = [ 'driver' => env('db_test_driver'), // more details on testing database ] ] then add necessary variables .env -file. edit phpunit configuration open phpunit.xml -file , add following within <php> -tag: <env name="db_connection" value="testing"/> now phpunit run tests on database defined in testing -array.

c# - Cannot access child value on Newtonsoft.Json.Linq.JValue during Neo4jConnection -

i've set neo4j connection not working rather throwing error: cannot access child value on newtonsoft.json.linq.jvalue. this neo4j ninject module file: public class neo4jmodule : ninjectmodule { /// <summary>loads module kernel.</summary> public override void load() { bind<igraphclient>().tomethod(initneo4jclient).insingletonscope(); } private static igraphclient initneo4jclient(icontext context) { var neo4juri = new uri("http://www.example.com"); var graphclient = new graphclient(neo4juri, "username", "password"); graphclient.connect(); return graphclient; } } this registerservices method ninject.web.common file: private static void registerservices(ikernel kernel) { kernel.load<neo4jmodule>(); } i don't understand why getting error. exception caught at: graphclient.connect(); i debugged application , realised grap...

ons api - Can I get GDP history in JSON format from ONS API? -

i'd create dynamic graphs charting uk gdp movements on last couple of years library such d3. is possible gdp related info via ons api ? some gdp-related datasets available in json-stat via openapi e.g. http://web.ons.gov.uk/ons/api/data/dataset/reggva02.json?context=economic&jsontype=json-stat&apikey=12345&geog=2015eurostath&diff=&totals=false however if want simple timeseries, main ons web site shout. if go https://www.ons.gov.uk/economy/grossdomesticproductgdp you'll list of gdp-related time series. when find 1 want, append /data url underlying numbers in json. e.g. https://www.ons.gov.uk/economy/grossdomesticproductgdp/timeseries/ybha/edp2/data

javascript - I am trying to extract an element from the DOM, how is this done? -

Image
this code ran each time generates graph, in addition set id of tag graph using this. have case need logarithmic graph. @ first thought converted string, returns [object svgsvgelement you can use xmlserializer convert dom object string var s = new xmlserializer(); var str = s.serializetostring(element);

windows - Freepascal finding eof after reset of a non-empty file -

got me stumped: on windows, free pascal {... writes text lines pdftmp, ...} close(pdftmp); reset(pdftmp); while not eof(pdftmp) begin readln(pdftmp,inpline); writeln(prodfile,inpline); end; close(pdftmp); i've verified pdftmp file written text, eof() function returns true on first call, while block never executed. i tried kinds of tricks surrounding code determine whatever else might causing failure, including updating fpc compiler, no avail. tests confirm improper eof() function result. the same code works on mac. (freepascal supports various platforms.) any other poor soul out there had evil befall , stall out nice project? if so, how fixed, if was?

symfony - custom authentication provider with anonymous user -

i have question didn't find answer for. i have maintain symfony application uses custom authentication , user provider. provider works aspected , user can login correctly. however, need make few routes accessible anonymous users. should accessible when user not authenticated. tried adjust access_control configuration in security.yml make these urls accessible: firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: pattern: ~ anonymous: ~ internal_api: provider: fos_userbundle check_path: /api/user/login logout: path: /api/user/logout access_control: - { path: ^/api/init, roles: is_authenticated_anonymously } - { path: ^/api/resources, roles: is_authenticated_anonymously } - { path: ^/, roles: role_user } unfortunately not work. users still can't access these routes, long not authenticated. so question is: necessary p...

javascript - Deploy node.js application to elastic beanstalk (using express) -

i've been having issues deploying app elastic beanstalk day today. have following project structure (single page app built react) dist/ index.html bundle.js package.json app.js i zip , upload elastic beanstalk running node.js here app.js var express = require('express'); var app = express(); app.use(express.static(__dirname + '/dist')); app.get('/*', function(req, res){ res.sendfile(__dirname + '/dist/index.html'); }); app.listen(8080, function() { console.log('listening on port: ' + 8080); }); locally, wоrks fine, aws thrоws warnings. for comes across similar issue, turned out related of dependencies used, worth downgrading them, , not use ^ version . you able find further info on via logs eb produces.

buffer - Mysql threads stuck in 'query end', how to prevent furious flushing -

mysql became unresponsive many simple update , insert threads stuck in 'query end' state. ---transaction f528f961, active (prepared) 858 sec mysql tables in use 1, locked 1 2 lock struct(s), heap size 376, 1 row lock(s), undo log entries 1 mysql thread id 82683520, os thread handle 0x7f73a6925700, query id 14714499253 192.168.1.22 wms query end update `users` set `id` = '6016', `es_id` = '4817', `department_id` = '4', `schedule_id` = '1', `username` = 'john.doe', `user_role` = 'guest,admin,picker', `status` = '1', `team` = '2', `email` = null, `wms_user` = '1', `logged_in_time` = '2016-02-01 07:06:45', `last_activity` = '2016-02-01 13:07:49', `session_id` = 'qbei0rrfiu05l9olcckh6sg976' (id = 6016) cpu load went up, disk io went up, hit ratio went down. cpu load / disk io "use db" , "show master st...

In JavaScript, does it make a difference if I call a function with parentheses? -

i noticed difference when calling function empty parentheses, or without parentheses @ all. however, not passing arguments function wondered, difference between: window.onload = initall(); and window.onload = initall; please explain principle behind it. window.onload = initall(); this executes initall() straight away , assigns function's return value window.onload . not want. initall() have return function make sense. window.onload = initall; this assigns actual function window.onload - possible because in javascript, @felix says, functions first class objects - without executing it. initall executed load event.

How to get your web application to target ASP.NET 2.0 -

Image
i having problems installing web application on server because has asp.net 2 , web application expecting 4.0, how can swap web application target asp.net 2.0 on server know can 2.0 built in 2.0. is there configuration somewhere tell ? the web application expecting 4.0 if source compiled @ .net framework 4, cannot downgrade .net 2 @ application pool. how fix you want change target framework .net framework 2, , publish again.

java - Change background color of JTable row based on column value issue -

Image
based on this question did this: public class showticketplanning extends javax.swing.jframe { private static string prevticket=""; private static int color=1; public showticketplanning() { initcomponents(); (int = 0; < c.gamelist.size(); i++) { gameselectgamecb.additem(c.gamelist.get(i).printforlist()); } } private void gameselectgamecbactionperformed(java.awt.event.actionevent evt) { int ind = gameselectgamecb.getselectedindex(); if (c.gamelist.size() > 0) { defaulttablemodel tmodel = (defaulttablemodel) dbgplantbl.getmodel(); while (tmodel.getrowcount() > 0) { tmodel.removerow(0); } string columnnames[] = new string[c.dbglist.get(ind).getdrawdaylist().size()]; int gamedrawsize = c.dbglist.get(ind).getdrawdaylist().size(); (int z = 0; z < gamedrawsize; z++) { ...

Overlapping Lines on WPF canvas blending colors - how to fix? -

if draw line (assume ls line segment coordinates) . . . line line = new line(); string rgb = "#ff0000"; // red line.stroke = (solidcolorbrush)(new brushconverter().convertfrom(rgb)); ls = plylist[p].l3ds[seg]; line.x1 = ls.p0.x; line.y1 = ls.p0.y; line.x2 = ls.p1.x; line.y2 = ls.p1.y; geometrycnv.children.add(line); ... red line. if . . . line line = new line(); string rgb = "#00ff00"; // green line.stroke = (solidcolorbrush)(new brushconverter().convertfrom(rgb)); ls = plylist[p].l3ds[seg]; line.x1 = ls.p0.x; line.y1 = ls.p0.y; line.x2 = ls.p1.x; line.y2 = ls.p1.y; geometrycnv.children.add(line); ... green line. if both (using same coordinates), brownish-orange color though colors of 2 lines blended, though lines had sort of transparency. want happen recent line draw on previous 1 resulting color recent color - green in case. what need achieve this? try setting snapstodevicepixels true on geometrycnv. aliasing both lines leading ...

php - Check input type value for validation -

i need check input type value must start (wv), , must have 17 additional characters. for example: if user write 1223ggg , must show me message: your entry invalid must wvxxxxxxxxxxxxxxxxx if user write wv12365478996325874 , must show me message: your entry success how can that? casimir's solution might not have worked because want string 19 characters, not 17. an updated version of be: if (strpos($str, 'wv')===0 && strlen($str)==19) { my regex solution be if(preg_match('/^wv.{17}$/', 'wv12365478996325874')) { echo 'your entry success'; } else { echo 'your entry invalid must wvxxxxxxxxxxxxxxxxx'; } if want characters numbers after wv replace . \d . php demo: https://eval.in/513858 regex101 demo: https://regex101.com/r/mu1kw8/1 depending on need might able use ctype , http://php.net/manual/en/book.ctype.php , validate string.

unit testing - Is it possible to run (and check) Nginx rewrite rules without running the whole web server? -

i want close can "unit testing" nginx rewrite rules. how close can 1 doing this? there way run request rewriting module without running entire web server? can embed nginx server in process running ruby or python or, if have to, java? tricks can think of? put rewrite rules in include file. create nginx configuration testing pulls in rewrite include file. using -c , possibly -g flags, run nginx user. since can run on alternate port, won't conflict web server running on port 80. have automated testing run tests against "test server". shut down nginx test server.

vba - Change chart colors in a form -

Image
i trying use vba change colors palette of "pie chart" in report of ms-access 2010. printing in report & chart result of query created of "chart wizard" (because using spanish edition of ms-office don't know real name of utility). so far i've tried: private sub gráfico0_updated(code integer) gráfico0.recolor (rgb(0, 0, 256)) end sub use , change color number needed activechart.cleartomatchstyle activechart.chartstyle = 344

apache - How use htacces to run index.php in subfolder in nginx? -

i'm new in nginx . i stack on run website using nginx . i have try convert htaccess use nginx.conf or default.d/*.conf site still not working. here files: --- .htaccess --- |-- public | | --- index.php | --- .htaccess |-- application first htaccess rewriteengine on rewriterule ^(.*) public/$1 [l] second htaccess same folder index.php options -multiviews rewriteengine on options -indexes rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewritecond %{request_filename} !-l rewriterule ^(.+)$ index.php?url=$1 [qsa,l] this nginx.conf after edit: user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "...

Going over the API limit in Shopify? -

i need maximum of 250 products 1 api call. how can archive this? unfortunately have no experience in ruby. maybe can wise me direction. thank you, you cannot increase limit beyond 250 per page. nevertheless use page parameter next 250 products. i'm not aware of ruby logical flow: get url = /admin/products.json?limit=250&page={{p}} assign value of p 1 start calling api. each successful return increase value of p check if returns less 250 items. if yes, continue next step, else go step 3 exit

java - incomparable types boolean and nulltype -

when compile code way, mentioned error: public class symtree{ public static boolean issym(bt bt) { return(ismirror(bt.left, bt.right)); } private static boolean ismirror(bt lr,bt rr) { if(lr==rr==null) (((error here))) return true; ..... however when compile this private static boolean ismirror(bt lr,bt rr) { if(lr==rr)&&(lr==null)) return true; ....... i no error. error uncomparable types nulltype , boolean, non of compared objects boolean- both objects bt(binary tree) class, has been defined elsewhere. thank you! the reason it's giving error because when write this: if (lr==rr==null) the compiler interprets similar 1 of following: if ((lr==rr) == null) if (lr == (rr==null)) basically, you're comparing boolean condition (either lr==rr or rr==null ) nullable type, doesn't make sense since booleans value types , can never null.

java - Migrating Hibernate 3 to 5: relation hibernate_sequence does not exist -

i migrating application running hibernate 3 hibernate 5. i have strange error: error: relation hibernate_sequence not exist we using *.hbm.xml mapping files , working fine until changed hibernate version. mean have pretty straight forward mapping id column , db sequence generator , still hibernate wasn't able pick correct config. <hibernate-mapping> <class name="com.boyan.myclass" table="my_class"> <id name="id" type="long"> <column name="id" /> <generator class="sequence"> <param name="sequence">my_class_seq</param> </generator> </id> ... </class> </hibernate-mapping> i started digging in hibernate code , saw sequencegenerator deprecated , new versions use sequencestylegenerator . confused when noticed in new version property telling sequence name ...

javascript - Close Modal using CSS only -

i need close modal using css this: http://jsfiddle.net/raving/1mhsynmw/ however, can't work. modal below. function alert(msg) { document.getelementbyid("alert").innerhtml = '<div class="modal-overlay"><div class="modal"><div class="modal-container"><h3>' + msg + '</h3><p>' + msg + '</p></div><p class="modal-footer"><a href="javascript:" id="ok">ok</a></p></div>'; } alert("this text show modal. text show modal. text show modal. text show modal."); body { font-family:arial; font-size:11px; } .modal { position: fixed; top: 20px; margin-left: auto; margin-right: auto; left: 0; right: 0; width: 200px; box-shadow: 0 4px 6px 1px rgba(50, 50, 50, 0.14); background: #fff; } .modal p { cursor:default; } .modal-container { ...

Multithread in ios plugin for Unity -

i writing ios plugin unity. on unity call function in ios plugin. know that: function run on main thread or background? because seems function run on background. in advance in unity runs on 1 thread. unity not multithreaded in way. (if launch thread, must "get to" main thread, in unity, eg ui.) in ios level plugin, if go thread "your problem". won't go thread unless that. , then, must entirely after it.

mysql - How can I improve this one to many ActiveRecord data model? -

i have home-grown (not own) versioning system following data structure: create_table "activities", :force => true |t| t.string "source" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "head_revision_id" end add_index "activities", ["head_revision_id"], :name => "index_activities_on_head_revision_id" add_index "activities", ["source"], :name => "index_activities_on_source" create_table "activity_revisions", :force => true |t| t.integer "activity_id" t.string "activity_type" t.string "title" t.text "content" t.text "comment" t.integer "modified_by_id" t.datetime "created_at", :null => false t.datetime "updated_at", ...

Is there a way to calculate the confidence in global optimum from a Genetic Algorithm? -

is there mathematical way of providing confidence value based on parameters of genetic algorithm? a simplistic way looking @ how of search space has been explored, feel underestimating value ga meant narrow search , approximate global optimum without considering entire search space. the reason need because wrote ga around kemeny-young algorithm, , useful provide sort of number estimating confidence on output.

bigdata - Python - big list issue -

i need create , search big list, example list of 3.9594086612e+65 arrays of 10x10 (or bigger list of bigger arrays). i need create list of combinations. after need filter out combinations according rule. process should repeated till 1 combination left. if try create list crashes because of memory after few minutes. i can imagine, solution should store data in different way list in memory. what possible, correct , easy way? sql database? nosql database? or multiple text files opened , closed 1 after one? need run through list multiple times. hy: 3.9594086612e+65 it's more computer memory in world. (and not multiply 10)!

java - which color format is that? -

new color(0.2f, 0.949f, 0.949f, 1); guys i'm editing android application in eclipse , i've encountered color code. i've never seen before. it's not rgb or hex, can me find format of it? decimal numbers , f suffix clue these floating-point values. format colors commonly used. each red, green, blue, , alpha value in range 0.0 1.0. can convert these values hex multiplying 255 decimal ( 0xff hex) , convert decimal value hex. see the color constructor documentation details.

matlab - Algorithm challenge to merge sets -

given n sets of numbers. each set contains numbers 1 100. how select sets merge longest set under special rule, 2 non-overlapping sets can merge. [1,2,3] can merge [4,5] not [3,4]. efficient algorithm merge longest set. my first attempt form n n matrix. each row/column represents set. entry(i,j) equals 1 if 2 sets overlap, entry(i,i) stores length of set i. questions becomes can perform row , column operations @ same time create diagonal sub-matrix on top left corner trace large possible. however, got stuck in how efficiently perform row , column operations form such diagonal sub-matrix on top left corner. as pointed out in comments (maximum coverage problem) have np-hart problem. luckily, matlab offers solvers integer linear programming. so try reduce problem form: min f*x subject ax<=b , 0<=x there n sets, can encode set vector of 0s , 1s. example (1,1,1,0,0,...) represent {1,2,3} , (0,0,1,1,0,0...) - {3,4} . every column of a represents set. a(i,j...

I can't upload files on my Django's website -

i have created online store in django. works on pc. have moved on shared hosting, can't upload anything. can add new information in database without images. i 404 error. have media_url , media_root configured corectly in settings. who know how fix issues? my settings.py file(this first experience django , python): """ django settings public project. generated 'django-admin startproject' using django 1.8.8. more information on file, see https://docs.djangoproject.com/en/1.8/topics/settings/ full list of settings , values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # build paths inside project this: os.path.join(base_dir, ...) import os base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # quick-start development settings - unsuitable production # see https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ # security warning: keep secret key used in production secret! secr...

angular - Refresh Angular2 page progamatically without all app reloading -

what method refresh route in angular 2 programatically in order trigger oninit hook? maybe there single method refresh current route. from: https://angular.io/docs/ts/latest/api/router/router-class.html renavigate() : promise<any> navigates either last url navigated to, or last url requested if router has yet navigate. inject router , call renavigate() method: this._router.renavigate();

ios - Mobile Safari/WebKit memory issues -

Image
we writing html 5 app requires large files loaded. we loading binary data files via ajax. app crashes on ipad. upon further investigation instruments on mac noticed while downloading file, memory allocated webkit exponentially grows runs out of memory. (100mb file grows memory on 550mb browser crashes) we tested loading kinds of other types of files via other methods such image obj shown below. function testimage() { var download = new image(); download.src = 'data/33mb.jpg?n=' + new date().gettime(); } after above 33mb image loads, instruments show memory has grown 309 mb. and here sample xhr call same results loading large binary file. function testxhr() { var xhr = new xmlhttprequest(); xhr.open('get', 'data/100mb.bin?n=' + new date().gettime()); xhr.send(); } we baffled happening. how load large files on safari mobile? any insight appreciated. in advance.