Posts

Showing posts from August, 2010

typescript - How to declare two unassignable types? -

i have ffi binding , there couple of places void * used. i'd differentiate on typescript side. is: interface struct1ptr extends buffer {}; interface struct2ptr extends buffer {}; var x: struct1ptr; var y: struct2ptr; i'd make types unassignable, error signaled when try assign x = y or y = x or use wrong type arguments functions. typescript uses structural typing everything, have make them structurally different, e.g : interface struct1ptr extends buffer { _isstruct1: void }; interface struct2ptr extends buffer { _isstruct2: void }; var x: struct1ptr; var y: struct2ptr;

javascript - External CSS in Node JS -

i trying bind style external css have in project directory. my app structre looks this: webdtu app.js public/ stylesheets/ style.css avgrund.css animate.css views/ index.jade userhome.jade .... .... my userhome.jade : doctype html html head title mqtt chat application script(type='text/javascript', src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js') link(rel='stylesheet', href='http://fonts.googleapis.com/css?family=lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic', type='text/css') link(rel='stylesheet', href='../public/stylesheets/animate.css', type='text/css') link(rel='stylesheet', href='../public/stylesheets/style.css', type='text/css') link(rel='stylesheet', href='../public/stylesheets/avgrund.css', type='text/css') body .av...

python - How to create scale-free networks with different assortativity in NetworkX? -

given assortativity preference of hubs of network connect other hubs instead of peripheral nodes, want produce 2 scale-free networks using barabasi-albert algorithm different assortativity. one visual example of given here . how can "force" networkx create few scale-free networks assortativity coefficients different each other, ones in visual example? this how create (undirected) barabasi-albert network: import networkx nx pylab import * import matplotlib.pyplot plt %pylab inline n=100 #number of nodes ncols=10 #number of columns in 10x10 grid of positions m=2 #number of initial links seed=[100] j in seed: g=nx.barabasi_albert_graph(n, m, j) pos = {i : (i // ncols, (n-i-1) % ncols) in g.nodes()} d=g.degree().values() avg_d=round(sum(d)/100,3) avg_degree.append(avg_d) edges.append(len(g.edges())) nx.draw(g, pos, with_labels=true, nodesize=100, node_color='darkorange',font_size=10) plt.title('scale-free network (ba...

vb.net - Disable webpage error messages vb app -

i´m developing visual basic forms application, call "robot", , have problems it. the robot has webrowser object navigates website , searches info. while navigating website message box title "message webpage" appears reporting exception has ocurred, says "javax.norowavailableexception on row #xx server...". message box stops robot execution. when press ok button , message box closes, robot goes on. the question is: ¿how can disable or ignore message box errors? need robot work without stoping. thank !! sounds script of website displaying errors using javascript alert . can disable messagebox shown these errors in webbrowser control setting scripterrorssuppressed property true . see following link on msdn: https://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.scripterrorssuppressed(v=vs.110).aspx

POSTing nested objects using spring data rest? -

i have started using spring-data-rest application. have following jpa entities: @entity public class super { @id private long id; @jointable @onetomany(cascade = cascadetype.all) private list<child> children; } ----------------------------------------- @entity public class super2 { @id private long id; @jointable @onetomany(cascade = cascadetype.all) private list<child> children; } ----------------------------------------- @entity public class child { @id private long id; @column private string childmetadata; } i can think of 2 methods of saving new instances of super or super2 : expose @restresource child class -> create instances of child before creating instances of super or super2 -> pass urls of child instances in payload of super or super2 . pass details of child in payload of super or super2 without exposing @restresource child class , cascadetype.all take care of creating ...

stack trace - JavaFX Date Picker specific format error -

i've created sample application uses javafx-8 date picker. works fine on default pattern on specific pattern throws exception. i'm trying convert on 'dd-mm-yyyy' pattern on default. here source file of program please take look. datepickercontroller.java package javafx.datepicker; import java.time.localdate; import java.time.format.datetimeformatter; import java.time.format.datetimeformatterbuilder; import javafx.fxml.fxml; import javafx.scene.control.button; import javafx.scene.control.datepicker; import javafx.scene.control.textarea; import javafx.util.stringconverter; public class datepickercontroller { @fxml private datepicker dp; @fxml private button btn; @fxml private textarea ta; public void initialize() { string pattern = "dd-mm-yyyy"; dp.setprompttext(pattern); try { dp.setconverter(new stringconverter<localdate>() { datetimeformatter dtf = datetimeformatter.ofpattern(pattern); @ove...

java - Jersey 2.x leaking memory (Finalizer) with simple POST call (Multithreaded) -

the following simple jersey call leaking objects finalizer queue: public boolean startexperiment(experiment experiment) { final client client = clientbuilder.newclient(); response response = null; rundescriptor rundescr = experiment.getrundescriptor(); try { final webtarget webtarget = client.target(experimentcontroller.getinstance().getrunnerurl()).path("runs").path("startnewasyncrun"); response = webtarget.request().post(entity.entity(rundescr, mediatype.application_json)); if (response != null && response.getstatusinfo().getstatuscode() != status.created.getstatuscode()) { system.out.println("error, run not created! response info: " + response.getstatusinfo()); return false; } else { return true; } } { if(response != null) { response.close(); } ...

javascript - I want a div to refresh automaticallywithout refreshing whole page -

i have developed comment system ajax , working fine. want add ajax/js code refresh time ago div after every 5 seconds time changes while 1 on same post. please note: sir, want code request server refresh div after specific time period. not want load page or div want contents within div should refreshed after specific period of time. i'm new in js/ajax , ii tried not working yet $(document).ready(function () { setinterval(function () { $("#showtimeago!").load(); }, 1000); }); result want is: <div class="p_timeago" id="showtimeago"> <?php time_stamp($timepost);?></div> can me solve issue? i don't know ui using, here php(since jquery same) can tune requirement. function loadlink(){ $('#showtimeago').load('test.php',function () { $(this).unwrap(); }); } loadlink(); // run on page load setinterval(function(){ loadlink() // run after every 5 seconds }, 5000); ...

c++ - Return floats from fragmentshader -

for application need create depth-image of mesh. want image, each pixel tells distance between camera center , intersection point. choose task opengl, of computation can done on gpu instead of cpu. here code vertex-shader. computes real-world coordinate of intersection point , stores coordinates in varying vec4 , have access in fragment-shader. varying vec4 verpos; void main(void) { gl_position = ftransform(); verpos = gl_modelviewmatrix*gl_vertex; } and here code fragment-shader. in fragment-shader use these coordinates compute eulidean distance origin (0,0,0) using pythagoras. access computed value on cpu, plan store distance color using gl_fragcolor , , extract color values using glreadpixels(0, 0, width, height, gl_red, gl_float, &distances[0]); varying vec4 verpos; void main() { float x = verpos.x; float y = verpos.y; float z = verpos.z; float depth = sqrt(x*x + y*y + z*z) / 5000.0; gl_fragcolor = vec4(depth, depth, depth, 1.0); } ...

caching - Sql query over Ignite CacheStore or over database -

i beginner ignite, have puzzles, 1 of follows:when try query cache, whether can if memory contains or not. if not, whether query database? if not,how achieve such way? please me if know.thx. queries work on in-memory data only. can either use key access (operations get() , getall() , etc.) , utilize automatic read-through persistence store, or manually preload data before running queries. information on how load large data set cache, see page: https://apacheignite.readme.io/docs/data-loading

ruby on rails - What is the accepted way for admin-only tasks -

i'm not using devise learning purposes. want admins able access admin-only page. i've created admin attribute boolean type , default value of false. can check if admin current_user.admin? . i doing admin check like before_action :admin_check, only: :show def admin_check redirect_to(root_url) unless current_user.admin? end safe in terms of security? yes, looks safe me if remove only: :show part. want protect other actions well, guess... also, assume unprivileged user has no way of reaching controller through normal navigation, i'd invalidate session, in case.

asp.net - Application Insights added ConnectedService.json file to my project, what does this do? -

i have added application insights asp.net 4.6 web application. this added file service references\application insights\connectedservice.json the contents of file: { "providerid": "microsoft.applicationinsights.connectedservice.connectedserviceprovider", "version": "7.1.719.1", "gettingstarteddocument": { "uri": "https://go.microsoft.com/fwlink/?linkid=613413" } } what file for? not seem provide logic application , not seem required work. this file maker visual studio "connected services" tooling application insights (or other connected service) installed, version of service installed it, , go getting started documents. file not compiled app, not set content included in project or else, there connected services know things you've installed. this info shows in solution explorer in folder called "service references", , you'll see of connected services you...

Perl XML::Smart : How to update a node value in an xml file? -

i trying update xml file perl script using xml::smart library. example xml file: <food> <fruit> <name>banana</name> <price>12</price> </fruit> <fruit> <name>apple</name> <price>13</price> </fruit> <fruit> <name>orange</name> <price>19</price> </fruit> </food> i want update apple price 13 14 example. i tried this: #!/usr/bin/perl use xml::smart; $xml = xml::smart->new(file.xml); $xml->{food}{fruit}[$x]{price} = 14 ; $xml->save($file); this work if knew index number $x of fruit element named apple. here can see it's 1 because indexes start 0, in case of multiple fruit elements, how index knowing fruit name? you have search data structure fruits name fiels of apple you want ensure there 1 such element the code this use strict; use warnings 'all...

python - How to separate stock picking in from out in odoo 8 -

in openerp 7 stock_picking separated in 2 items, stock_picking_in , stock_picking_out, created 1 item containing both , there's field containing type (in or out). want have normal view "in" items , totally custom view "out". possible , how? thanks. my picking.py inherit stock.picking , add fields. want picking_in_view use stock.picking default display form view , tree view , want change display picking_out_view . problem when change display in picking_out_view change in picking_in_view because changes model. and biggest problem need change many many field stock.move out items if need modify model , in , out. is there way it? move.py # -*- coding: utf-8 -*- openerp import models, fields, api, tools openerp.exceptions import validationerror class stockmove(models.model): """ ajout de champs dans la ligne de commande, et quelques fonctions telles que unpack """ _inherit = "stock.move...

java - How to configure Tomcat to connect with MySQL -

could provide few details on how configure tomcat access mysql? in directory within tomcat place mysql-connector-java-5.1.13-bin ? should place under tomcat 6.0\webapps\myapp\web-inf\lib ? do need add configuration context.xml or server.xml ? should create web.xml file , place under tomcat 6.0\webapps\myapp\web-inf ? if so, should contents of file like? 1: place mysql-connector-java-5.1.13-bin in tomcat directory? should place under tomcat 6.0\webapps\myapp\web-inf\lib ? that depends on connections managed. create connection pooled jndi datasource improve connecting performance. in case, tomcat managing connections , need have access jdbc driver. should drop jar file in tomcat/lib . but if you're doing basic way using drivermanager#getconnection() , in fact don't matter if drop in tomcat/lib or yourapp/web-inf/lib . need realize 1 in tomcat/lib apply all deployed webapps , 1 in yourapp/web-inf/lib override 1 in tomcat/lib particular webapp. ...

azure - HTML5 video stopped working in Chrome (or playing but breaks) -

my asp.net application using html5 video , working in every browser. somehow today stopped working in chrome. or if starts working, somehow it's playing full of breaks. in mozilla , ie it's working ok. ideas? the app hosted on azure cloud , sql database there too. <video id="dolphinvideo" autoplay preload="auto" style="width: 100% !important;"> <source src='<%# string.format("/files/{0}.webm", eval("videoid")) %>' type='video/webm'> <source src='<%# string.format("/files/{0}.mp4", eval("videoid")) %>' type='video/mp4'> </video> edit javascript code cause.

javascript - Highcharts Uncaught TypeError: Cannot read property 'chart' of undefined -

i upgrading highcharts 3.0.7 4.2.5. several charts worked fine in 3.0.7 , throwing error on reflow. seems reflow event providing wrong context. context of window, chart undefined. there way fix context? here chart code environment: var chartsize = { small: { margintop: 44, marginleft: 26, marginright: 26, height: 226, width: 290, yaxis: { height: 116 }, xaxis: { plotlines: { x: -30, y: -26 }, offset: 32, labels: { y: 20, fontsize: '11px' }, y: 15 } }, large: { margintop: 75, marginleft: 28, marginright: 28, height: 375, yaxis: { height: 216 }, xaxis: { ...

javascript - Hiding an object using css -

i trying hide vertical bar have created in jquery flot graph when mouse not within bounds of grid. set me horizontal bounds grid such: horizontalbounds = [leftoffset, plot.width() + leftoffset]; . used if statement "if mouse within vertical bounds, verticalbar.css." if (position.pagex >= horizontalbounds[0] && position.pagex <= horizontalbounds[1]) { if (typeof verticalbar !== "undefined" && verticalbar !== null) { verticalbar.css({ transform: "translate(" + position.pagex + "px, 0px)" }); } below css code (which in javascript file; don't ask...). need hide verticalbar when mouse not within horizontal bounds? thinking add attribute `visibility: hidden' verticalbar.css, can't figure out how that. hints? verticalbar.css({ backgroundcolor: "#f7e4e6", width: "1px", height: "...

r - Need to replace values of a column with new values -

i need replace column value of data frame new values in r. below example data set: date temp sf 2/3/2016 20 3 4/3/2016 45 7 7/3/2016 35 8 9/3/2016 25 7 9/4/2016 16 5 9/7/2016 25 7 9/9/2016 14 6 10/2/2016 32 2 11/2/2016 32 2 11/16/2016 45 6 i need replace value of column "temp" new values c(12,13,14,15) "date" greater (9/7/2016). format of date ("%m/%d%y"). final output should like: date temp sf 2/3/2016 20 3 4/3/2016 45 7 7/3/2016 35 8 9/3/2016 25 7 9/4/2016 16 5 9/7/2016 25 7 9/9/2016 12 6 10/2/2016 13 2 11/2/2016 14 2 11/16/2016 15 6 thank you! we create logical index first converting 'date' column date class , checking whether greater "2016-09-07" ('i1'), subset 'te...

Solr Block Join Parent Query Parser range query search error -

i using solr 6.1.0, , i'm indexing parent-child data solr. when query, use block join parent query parser, return parent's records, , not of child records, though there might match in child record. however, not able range query child record. example, if search query q= +title:join +{!parent which="content_type:parentdocument"}range_f:[2 8] i following error: { "responseheader":{ "zkconnected":true, "status":400, "qtime":3}, "error":{ "metadata":[ "error-class","org.apache.solr.common.solrexception", "root-error-class","org.apache.solr.parser.parseexception"], "msg":"org.apache.solr.search.syntaxerror: cannot parse 'range_f:[2': encountered \"<eof>\" @ line 1, column 18.\r\nwas expecting 1 of:\r\n \"to\" ...\r\n <range_quoted> ...\r\n <range_goop> ...\r\...

wso2is - WSO2 IS: Difference between application-authenticator and carbon-authenticator -

when walking through code of wso2 identity server 5.x, can find samlsso authenticator in application-authenticator , 1 in carbon-authenticator. same true iwa. what difference between these? 1 used when? or 1 of them obsolete? application authenticators used authenticate users external apps (service providers) using wso2 products. carbon authenticators used authenticate users admin console of particular server.

c++ - OpenSSL: Nmake fatal error U1077: 'ias' : return code '0x1' -

i'm trying set openssl on windows 10 64-bit, having followed instructions far, after installing visual studio attempted nmake in openssl directory using visual c++ 2008 command prompt following error: "c:\strawberry\perl\bin\perl.exe" "-i." -mconfigdata "util\dofile.pl" "-omakefile" "crypto\include\internal\bn_conf.h.in" > crypto\include\internal\bn_conf.h "c:\strawberry\perl\bin\perl.exe" "-i." -mconfigdata "util\dofile.pl" "-omakefile" "crypto\include\internal\dso_conf.h.in" > crypto\include\internal\dso_conf.h "c:\strawberry\perl\bin\perl.exe" "-i." -mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\opensslconf.h.in" > include\openssl\opensslconf.h ias -d debug -ocrypto\aes\aes-ia64.obj "crypto\aes\aes-ia64.asm" 'ias' not recognized internal or external command, ...

javascript - The reduce function causing errors -

the errors shown in chrome console: 1. http://localhost:3000/vendor/@ngrx/store/index.js failed load resource: server responded status of 404 (not found) 2. localhost/:19 error: error: xhr error (404 not found) loading http://localhost:3000/vendor/@ngrx/store/index.js(…) (anonymous function) @ localhost/:19 reducer.ts: *i cant find aproppiate types something1 return value's type , state type. import { action} '@ngrx/store'; export const something1 = (state: = {}, action:action) => { switch (action.type) { default: return state; } }; main.ts: removing "providestore({something1})" cause app work import { bootstrap } '@angular/platform-browser-dynamic'; import { appcomponent } './app.component'; import { disabledeprecatedforms, provideforms } '@angular/forms'; import {accountservice} "./account.service"; import {providestore} '@ngrx/store'; import {something1} "./reducer"; boots...

Jquery stops before for loop -

i trying adjust div font-size depending on height i elements class "prod-name" .each $prod_names = new array(); $i=0; $j=0; $(".prod-name").each(function(){ $prod_names[$i] = $(this); $i++; }); for($j=0;$j>=$i;$j++){ console.log("in for"); if(($prod_names[$j].height() > 20) && ($prod_names[$j].height() <= 40)){ console.log("ok"); $prod_names[$j].css("font-size","0.9em"); }else if($prod_names[$j].height() > 40){ $prod_names[$j].css("font-size","0.8em"); } } <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <div id="mostviewed" class="products"> <h2 class="cat-title">most viewed</h2> <ul> <li class="scol25 mcol25 lcol25" > ...

visual studio 2015 - Where is NUNIT result xml in nunit-vs-adapter -

i using nunit vs 2015 , nunit-vs-adapter , want process test results. founf console runner creates sort of result xml , want know can find when running tests inside vs 2015. the adapter doesn't save test results file. could, of course, make request such feature project @ https://github.com/nunit/nunit3-vs-adapter . require new setting in runsettings file.

Where should we store data (files) from users in Laravel architecture? -

i have project meant work countries. now, in example lets says usa-( us ) , france-( fr ). so, when user write in url us_mysite.com , system should open files, or display pictures related only, not fr at point user need update file (pdf, excel, pictures, videos, etc) , system must store these files inside correct country. so have in site root structure this: www/mystie/ ... ... data/ us/ excel/ pdf/ fr/ ... img/ us/ fr/ ... ... now migrating system laravel 5 , know should put data folder. should inside public/ folder? folder should accessible delete, read, changes , save files trough process. this quote laravel doc: https://laravel.com/docs/master/structure#the-public-directory the storage/app/public directory may used store user-generated files, such profile avatars, should publicly accessible. should create symbolic link @ public/storage points directory. may cre...

mdx - mondrian - Count only unique members in sets -

i new mondrian, , need mdx query. for example: year 1 id_client: 1,2 year 2 id_client: 2,3 year 3 id_client: 1 if try "distinct-count" aggregator id_client, result: year 1 2 year 2 2 year 3 1 how can calculate new id_client? need result: years new year 1 2 both clients new year 2 1 client id = 3 new year 3 0 no new clients

javascript - AngularJs generate categories from array -

Image
<table class="table-striped table-bordered table-condensed"> <tbody> <tr ng-if="$index%3==0" ng-repeat="permission in vm.parent.getallpermissions()"> <td ng-repeat="i in [0,1,2]" class="col-xs-2"> <span> <input type="checkbox" checklist-model="vm.data.permissions" checklist-value="vm.parent.getpermission($parent.$index+i)"> {{vm.parent.getpermissiontitle($parent.$index+i) || " "}} </span> </td> </tr> </tbody> </table> that's angularjs now. json this. there n users, , categories , and permissions { "admin": { "category": "admin", "permission": "admin" }, "user": { "category": "user", "permission": ...

asp.net mvc - How can I Redirect to an MVC page from a Web Forms Site.Master page? -

we re-wrote half of our existing asp.net web application in mvc. in old site.master page call response.redirect("default.aspx") , update take user new mvc /home/index page. i have tried these methods , both return "unable evaluate expression" exception... response.redirect("/home/index") dim urlhelp new urlhelper(httpcontext.current.request.requestcontext) response.redirect(urlhelp.action("index", "home")) any suggestions? suppose have hosted application in iis name "myapplication" redirect this: response.redirect("http://localhost/myapplication"); this automatically detects home controller , open index view. note: before testing make sure correct page opening while browsing: " http://localhost/myapplication "

jquery - Trying to use javascript to fill a tag of button class -

edit 3: i'm going kind of start over. i can't post 2 links theme i'm using red ink themeforest , page i'm working on portfolio page if want google it. when click 1 of portfolio items "true gangsters" info pulled div , plugged previous section formatting. all want add button these portfolio items , able pull link div , have formatted button. in jsfiddle included formatted div , "true gangsters" section formatted div gets info from. i included of portfolio part javascript i'm pretty sure important part: //update text info function updatetext(current) { var title = current.attr('data-title'); var desc = current.attr('data-description'); var date = current.attr('data-date'); controls.find('h2').html(title); controls.find('p').html(desc); controls.find('.date .day').html(date.split(',')[0]); controls.find('....

Android: How do I scale a bitmap to fit the screen size using canvas/draw bitmap? -

i taking image , drawing screen using canvas. want scale based on screen size. this tried, cuts off large chunk of image: displaymetrics metrics = context.getresources().getdisplaymetrics(); int width = metrics.widthpixels; int height = metrics.heightpixels; bitmap bitmap = bitmapfactory.decoderesource(context.getresources(),r.drawable.myimage); bitmap = bitmap.createscaledbitmap(bitmap, width, height, false); rect frametodraw = new rect(0, 0, width, height); rectf wheretodraw = new rectf(0, 0, width, height); canvas.drawbitmap(bitmap,frametodraw,wheretodraw, paint); i know doing few things wrong, i'm not sure what. code causes image exceed size of screen. want scaled size of screen. i'll drawing smaller images in need scale according size of screen, though not full screen. rect frametodraw = new rect(0, 0, width, height); rectf wheretodraw = new rectf(0, 0, width, height); take @ above code. not scaling picture. taking part of picture (in case whole pi...

android studio - Genymotion not working -

installed genymotion on ubuntu 16.04, installed virtualbox https://www.virtualbox.org/wiki/linux_downloads ubuntu 16.04, when opening genymotion got error below screenshot enter image description here below genymotion log. please help jul 25 23:11:01 [genymotion] [warning] **** starting genymotion **** jul 25 23:11:01 [genymotion] [warning] genymotion version: genymotion "2.7.2" jul 25 23:11:01 [genymotion] [debug] [launchpadapp] started ("genymotion") jul 25 23:11:01 [genymotion] [debug] [dorequest] requesting: "https://cloud.genymotion.com/launchpad/last_version/linux/x64/" jul 25 23:11:01 [genymotion] [debug] [dorequest] done jul 25 23:11:01 [genymotion] [debug] [getgenymotionlastversion] new version ( "2.7.2" ) available here: "https://www.genymotion.com/download/" jul 25 23:11:01 [genymotion] [debug] genymotion date jul 25 23:11:01 [genymotion] [debug] loading "vboxmanage" plugin jul 25 23:11:01 [genymotion] [...

How do I access an object in a different module in AngularJS? -

i have 2 modules: angular.module('test1', []) .run(function() { var numbers = [1, 2, 3,4]; // more operations on numbers here }); angular.module('test2', []) .run(function() { // want edit or iterate on numbers here }); i want able edit variable numbers in test2 module. i'm extremely new angular seems easiest way put numbers in $rootscope doesn't seem desirable. what's idiomatic way achieve this? make numbers .value() ? make service? make 'editor' depend on 'test' (a concept still trying grasp)? you need service pass data. here example how can try it. var app = angular.module('app', ['access','test1','test2']); angular.module('access', []) .service('accessservice', function() { this.numbers = [1, 2, 3,4]; // more operations on numbers here }); angular.module('test1', []) .run(function(accessservi...

How do I get my GPIB interface to communicate correct values with python? -

i have gotten simulator start communicating me ( see past question ); however, not know saying me. here simple code sends message simulator. `import serial port = '/dev/tty.usbserial-pxfo5l2l' baudrate = 9600 timeout = 1 ser = serial.serial(port = port, baudrate = baudrate, timeout = timeout) ser.write('volt:level 4') ` this supposed set voltage 4, returns 12. along other commands, return ints. can tell me means? or if using write command correctly?

.htaccess - reject all requests where header value is not "US" -

i'm trying block countries except people in usa trying access website. tried search country block rules .htaccess not find any. there simple line of code add in .htaccess file execute this? this not possible. sufficiently sophisticated user can set headers whatever want, , ip address geolocation can spoofed or plain wrong.

spring - Parameter instance recId is invalid for the requested conversion. ERRORCODE=-4461 -

i using spring jdbcnamedtemplate insert data in database. other operations (such delete) working fine, while insert getting -4461 error db2. i went these pages: http://www-01.ibm.com/support/docview.wss?uid=swg21622381 invalid data conversion: parameter instance 50.0/100 invalid requested conversion. errorcode=-4461, sqlstate=42815 but no help. below snippet of code. @override public void insert(flight fw) { string sql = "insert flight (flt,leg,org,dst,booked) values (:flt,:leg,:org,:dst,:booked)"; mapsqlparametersource namedparameters = new mapsqlparametersource(); namedparameters.addvalue("flt", fw.getflightnumber()); namedparameters.addvalue("leg", fw.getflightleg()); namedparameters.addvalue("org", fw.getorg()); namedparameters.addvalue("dst", fw.getdst()); namedparameters.addvalue("booked", fw.getbooked()); getnamedparameterjdbctemplate().update(sql, namedparameters); } also here flight table schema...

javascript - Samsung Smart Tv SDK 5.1 App Development -

can me making app latest samsung smart tv sdk 5.1? in previous sdks there 1 option of native smart tv app there many options available in latest sdk. options: samsung smart tv 1.apps framework - scene(af 2.) 2.caph - page(caph 1.0) 3.native app - pnacl module(c) - pnacl module(c++) - pnacl unit test project - web + pnacl module(c) - web + pnacl module(c++) - web app existing pnacl module 4. semantic mashup - semantic mashup file i need play live stream in app. option should choose? new sdk , desperately need help. in advance. if want create app samsung 2014 , older (orsay models) use in ide "file -> new -> project -> samsung smart tv -> web app" in app can use javascript + html + css + samsung api if want create app samsung 2015 , newer (tizen models) use in ide "file -> new -> tizen web project -> template tab -> tv-2.4 (tv-2.3 older 2015 models) -> basic application" in app can use javascript + html + css +...

How do i join two tables in a database using MySQL with specific names -

i have movies database using mysql in xampp. has 3 tables movies(movieid(pk), title, rating, genre, release_date), actors(actorid(pk), firstname,lastname,gender, date_of_birth), , actorsmovies(actorid(pk),movieid(pk). i have display fields movies michael j. fox actor. how join 2 tables show me movies michael j fox in? actorsmovies has constraints on it. example: ive tried million combinations example select firstname,lastname,title actors firstname,lastname = 'michael j','fox' join actorsmovies on actors.actorid = actorsmovies.actorid join movies on actorsmovies.movieid = movies.movieid; you have select firstname,lastname,title actors firstname,lastname = 'michael j','fox' join actorsmovies on actors.actorid = actorsmovies.actorid join movies on actorsmovies.movieid = movies.movieid; and need select firstname,lastname,title actors join actorsmovies on actors.actorid = actorsmovies.actorid join movies on actorsm...

math - (Batch) Taking number from text file and minusing it -

hi im trying make simple batch game in free time , ran problem. want amount in text file minused x amount. this part finds number in text file. :money cls set "xprvar=" /f "skip=1 delims=" %%p in (%userprofile%\variables.txt) (echo have %%p coin/s& goto break) goto coin :break pause this part takes away x amount amount written in text file dosent want work , dont know how fix it. :moneytaker set /a new=%money%-%%p echo = %new% pause doesn't work, because %%p no longer defined, when for loop finished. use variable instead: for /f "skip=1 delims=" %%p in (%userprofile%\variables.txt) set coins=%%p echo have %coins% coin/s ... echo before: %money% set /a money-=coins echo after: %money%

meteor - Password Reset token is returning null, although defined -

i'm utilizing useraccounts:unstyled , accounts-base , accounts-password , trying implement password resetting feature. i have route defined such: flowrouter.route('/reset-password/:token', { name: 'reset-password', onbeforeaction: function() accounts._resetpasswordtoken = this.params.token; this.next(); }, action(params){ accounts._resetpasswordtoken = params.token; mount(mainlayout, { content: (<forgotpassword />) }); } }); my template defined such: <template name="forgotpasswordmodal"> {{#if $not currentuser}} <div class="forgot-modal {{$.session.get 'nav-toggle'}}" id="{{checkstate}}"> <i class="fa fa-close resetpwd"></i> {{> atform}} </div> {{/if}} </template> and helper functions defined as: if (meteor.isclient) { template.forgotpasswordmodal.oncreated(function(){ if(accounts._res...

recommendation engine - When execute KNN on user based collaborative filter? -

i have seen codes , examples of user based collaborative filter executes knn before calculates similarities, , others executes after, means, executes knn on similarities matrix. so doubt when calculates knn algorithm, on data matrix before calculates similarities, or on similarities matrix? references: https://github.com/mhahsler/recommenderlab/blob/master/r/recom_ubcf.r dietmar jannach, markus zanker, alexander felfernig, gerhard friedrich - recommender systems introduction - cambridge university press (2010) a cuda-enabled parallel implementation of collaborative filtering zhongya wanga, ying liua, , pengshan ma

delphi - DCOM needs to register server on both client and server computer -

i have written in delphi 2010 dcom server , client call server. able run client on different machine server's machine, need register server on both machines, beside security related things allow client access server. i wondering if there know way needs minimum effort use client , server on 2 different machines, supposing both of client , server written , working. got far follows: run server.exe on server machine: server.exe /regserver run dcomcnfg , set security settings on server machine. define incoming rules in firewall let connection on server machine. run server.exe on client machine: server.exe /regserver now can run client.exe on client machine , use server's implemented interfaces. what pushed me write question can't understand why need register server on client machine also. client application know interface , server guids , use them accordingly when creating server in implementation. dcom on client machine has enough information query dcom of serve...