Posts

Showing posts from June, 2011

r - Subsetting HTML table source data according to checkbox input -

i'd display table 1 created dplyr chain below in html. want there ability control filter part of chain graphically (e.g. check boxes) in html file. example, might want "groups , b , contact.lists c , e". there way e.g. dt package? know can add filter box, i'm not sure if there's way both filtering , grouping/summarizing. calls <- data.frame(calldate = sample(1:30,100,t), group = sample(letters[1:3],100,t), contact.list = sample(letters[1:7],100, t), var1 = runif(100), var2 = runif(100), var3 = runif(100)) library(dplyr) calls %>% filter(contact.list == 'a') %>% group_by(calldate) %>% select(var1, var2, var3) %>% summarize(s1 = sum(var1), s2 = sum(var2), s3 = sum(var3))

.NET Core Web API application not debugging from Visual Studio 2015 -

i have .net core web api project using version 1.0.0-preview2-003131. using vs 2015 able compile project without problem, when try debugging application receiving following errors: the program '[13416] dotnet.exe' has exited code -2147450749 (0x80008083). program '[12920] iisexpress.exe' has exited code 0 (0x0). i able create new web api project using same version , works fine has project specific. ideas?

html - Hyperlinks in a Pandas Dataframe in Python -

i have following bit of code: class summary_tables(): def create_table(self, summary): formatting = formatter() table = pybloqs.htmljinjatableblock(summary,formatters=formatting.summary_format(), use_default_formatters=false) final_summary = pybloqs.vstack([table]) return final_summary class formatter(): def summary_format(self): table_center = pybloqs.fmtaligntable(alignment='center') align_cells = pybloqs.fmtaligncellcontents(alignment='center', apply_to_header_and_index=false) header = pybloqs.fmtheader(fixed_width='auto', column_width='5cm', index_width='1cm', top_padding='2cm') heatmap1 = pybloqs.fmtheatmap(axis=1, max_color=colors.heatmap_red, min_color=colors.heatmap_red, threshold=0.01) return [table_center, align_cells, header, heatmap1] this me build , format html file pandas dataframe called summary_df : mkt price_diff 0 ...

asp.net - SignalR 2 & Javascript Client to Server A to Server B -

i have following architecture setup. client (javascript) => server (has signalr server) , client (javascript) => server b (also has signalr server) i want know if can make so.. client => server => server b where client can connect signalr on servera, , using rewrite rules, allow connections uri /backend/signalr go through server b ? the reason behind architecture because have front-end serves site amongst other things, back-end processing application requires feedback client (server b client a). use signalr on both servers, , client can connect directly both. the reason question remove back-end server being public facing , allow internal network requests, that's fine , doable, problem have manage client's feedback updates server b client a, have typically route through server a. i saw answer here @ signalr iis 10 , arr 3.0 , had similar issue, except didn't have first proxy server serving signalr aswell. i guess additional different case has ...

jquery - Finding an issue in the code for a webpage - Should and could a person with HTML background be able to find the issue? -

so, following webpage has issue: https://1591.thankyou4caring.org/cau-annual-homecoming-golf-tournament the problem adding number other 0 in of quantity textbox causes container turn red. also, when proceed 'registration' multiple registrants, there red line across textbox enter first name , 'event registration summary' bar sits across textbox last name. i'm not sure if issue might 1 of sizing or toggle. even though appreciate troubleshooting issue page, main reason asking question can know if question code of webpage can troubleshot had nothing development of page. if so, how long should take person background in html , no jquery or css experience?

rgb - How to check the color profile of EPS files? -

i need programmatically check if eps vector file has 1 color profile. example, i'd know if file contains both rgb , cmyk color profiles. postscript, , therefore extension eps, cannot contain colour profiles (assuming mean icc profiles). if mean need know if eps file uses both rgb , cmyk colour specifications, that's different issue. easiest way write postscript program redefines colour operators , reports usage. run , eps through postscript itnerpreter, such ghostscript.

c# - How to refresh an Entity Framework Core DBContext? -

when table updated party, db context in dotnet core still return old value, how can force db context refresh? i've done research found people use reload method, not available in ef core, force context refresh. some other solution suggests dispose context after using, error saying db context created dependency injection , should not mess it. you have detach entity context, or implement own extension .reload() here's .reload() implementation. source: https://weblogs.asp.net/ricardoperes/implementing-missing-features-in-entity-framework-core public static tentity reload<tentity>(this dbcontext context, tentity entity) tentity : class { return context.entry(entity).reload(); } public static tentity reload<tentity>(this entityentry<tentity> entry) tentity : class { if (entry.state == entitystate.detached) { return entry.entity; } var context = entry.context; var entity = entry.entity; var keyvalues = con...

assembly - Where is an ISA stored and how exactly is it taken into account? -

i'm studying makes computer computer so far understood have high-level programming language -> -> compiled low level programming language ( assembly language ) -> -> assembler uses send instructions directly cpu using machine code the instructions must obey corresponding cpu architecture isa (instruction set architecture) cpu uses. and cpu reads/writes data registry or hdd (or sdd, etc.) through various channels. the articles i've read far fail mention following 2 (key, pov) aspects of journey instruction makes: where isa stored? in component of whole system? and how cpu take account? along journey? "ask" explicitly isa (somehow) if instruction received valid? a simple description university of virginia :). http://www.cs.virginia.edu/~cs333/notes/cs333_class3.pdf an other 1 use full http://www.ece.utep.edu/courses/web3376/notes_files/ee3376-isa.pdf if need more let me known ;)

Figuring out which FCM tokens are expired from a firebase response with several registration ids -

firebase rest endpoint push notifications lets send message several people @ once passing tokens through "registration_ids" array instead of "to". when response comes looks this: { "multicast_id":000000000000000000, "success":1, "failure":4, "canonical_ids":0, "results":[ { "error":"notregistered" }, { "error":"notregistered" }, { "error":"notregistered" }, { "error":"notregistered" }, { "message_id":"0:0000000000000000%a0a0a0aaa0a0a0aa" } ] } how supposed correlate notregistered errors particular token sent to? the results in same order specified them in request. last token valid.

Three.js camera rotation issues? -

i in middle of developing environment user can travel in space environment explore information on site. i have created point , click system when user travelling forward default , want change direction click in area want change direction to, once click occurs screen moves clicked area becomes centre of screen , forwar travel carries on area. the issue i'm experiencing when users clicking on area that's close proximity screen upper right hand of screen change area cannot screen centre on click, tiny forward travel occurs whilst screen rotation occurring? limitation of three.js camera? thinking if there anyway stop forward teavel , make pivot on spot screen turns on spot make sure can centre before travels again forward. click area in these cars alwaya seems off centre of screen. if can lend me hand or point me in right direction appreciate it!

file handling - Perl STDERR redirect failing -

a common functions script our systems use uses simple stderr redirect in order create user-specific error logs. goes this # re-route standard out text file close stderr; open stderr, '>>', 'd:/output/logs/stderr_' . &parseusername($env{remote_user}) . '.txt' or die "couldn't redirect stderr: $!"; now, copy-pasted own functions script system-specific error log, , while it'll compile, breaks scripts require it. oddly enough, doesn't print error children script throwing. slightly modified version looks like, close stderr; open (stderr, '>>', 'err/stderr_spork.txt') or die print "couldn't redirect stderr: $!"; everything compiles fine in command prompt, -c returns ok, , if throw warn function script, , compile, outputs properly. still not understand why though kills children. cut out redirect, , sure enough work. thoughts? die (and warn ) writes stderr . if close stderr ...

ios - NSDateFormatter and current language in iOS11 -

it appears default behavior nsdateformatter has been changed in ios11. code used work , produced date formatter according selected iphone/ipad language prior ios11: _dateformatterinstance = [[nsdateformatter alloc] init]; _dateformatterinstance.timezone = [nstimezone systemtimezone]; looks in ios11 have explicitly specify locale property it: _dateformatterinstance = [[nsdateformatter alloc] init]; _dateformatterinstance.timezone = [nstimezone systemtimezone]; _dateformatterinstance.locale = [nslocale localewithlocaleidentifier:[[nslocale preferredlanguages] firstobject]]; can confirm findings? this isn't problem nsdateformatter , it's change in how ios 11 supports localization. under ios 11, [nslocale currentlocale] returns languages supported app's localizations. if app supports english (as base localization), no matter language user selects on device, currentlocale return english. under ios 10 , earlier, currentlocale directly represent u...

How to import existing iCloud contacts into Salesforce. -

i needing import icloud contacts salesforce , wondering if possible , if so, best way achieve this? i have done before client. have export icloud contacts vcards. have find tool convert vcards csvs. export icloud csvs

node.js - KOA - Passport with Password Grant strategy -

hi trying implement password grant strategy koa-passport. configured strategy below passport.use(new passwordgrantstrategy({ tokenurl: "http://localhost:3001/api/v1/oauth/token", clientid: "democlient1", clientsecret: "democlientsecret1", scope: "profile", grant_type: "password", customheaders: {authorization: "basic zgvtb2nsawvudde6zgvtb2nsawvudhnly3jldde=", scope: "profile" } }, async (accesstoken: string, refreshtoken: string, profile: any, done: (error: any, user?: any, options?: iverifyoptions) => void) => { console.log("details ", accesstoken, profile); done(null, profile); })); and how try authenticate, return passport.authenticate("password-grant", { username: "test", password: "test" ...

JMeter JSR223 Postprocessor not updating User Parameter -

i have http sampler yields json string. parse json fragment using groovy jsonslurper update userparameter pollover: import groovy.json.jsonslurper def jsonslurper = new jsonslurper() def response = jsonslurper.parsetext(prev.getresponsedataasstring()) def iserror = response.response.iserror def error = iserror ? "true":"false" def data = response.response.data def pollover = data?.trim() || iserror log.info("response = " + response) log.info("iserror = " + iserror) log.info("error = " + error) log.info("data = " + data) log.info("pollover = " + pollover) vars.put("pollover", pollover ? "true":"false") vars.put("data", data) vars.put("error", error) unfortunately user parameter pollover never updated, although log groovy postprocessor show has right value: 2017-09-13 13:03:54,296 info o.a.j.e.jsr223postprocessor: response = [response:[version:1505333033161, ...

css - Importing Fonts into an Angular App -

i'm trying import font "montserrat" angular4 project resets standard. here's style.css @import url("https://fonts.googleapis.com/css?family=montserrat:500,700"); .fancyfont { font-family: 'montserrat'; } and friend.component.html <p class="fancyfont">look @ fanciness</p> i figured out. i imported google fonts this: @import url("https://fonts.googleapis.com/css?family=montserrat:500,700"); which includes 2 different weights, 500 , 700. telling css font-weight wanted use began work. .fancyfont { font-family: 'montserrat'; font-weight: 500; }

Where does JavaScript require an expression? -

i've been messing around figure out javascript requires expression. is rule can't place statement in middle of existing expression? besides in jsx, there anytime can think of when would've wanted use statement expression required? (by mean anytime did put if else statement instead of ternary expression in jsx) here links code trying figure out expression required. https://repl.it/ld8n/0 https://repl.it/ldii/1

openflow - opendaylight: Genius install flow in switch -

i using opendaylight / carbon , trying work genius wrapper. want install flow in switch based on mac address match incoming packet. instruction want install "goto" instruction. proceed follows: flowentitybuilder flowentitybuilder = new flowentitybuilder(); flowentitybuilder.settableid(tableid) .setdpnid(dpnid) .setflowid(flowutils.createflowid().tostring()) .setflowname("gototable1"); matchinfo matchinfo = new matchethernetsource(macaddress); instructioninfo instructioninfo = new instructiongototable(tableid); flowentity flowentity = flowentitybuilder.addinstructioninfolist(instructioninfo).addmatchinfolist(matchinfo).build(); mdsalapimanager.installflow(dpnid,flowentity); mu intention create flow entity , install using imdsalapimanager.installflow method. here exception see: java.lang.illegalargumentexception: node (urn:opendaylight:flow:inventory?revision=2013-08-19)ethernet-source missing mandatory d...

java - main ERROR Unable to locate appender "test" for logger config "test" -

this log4j2 json config { "configuration": { "appenders": { "console": { "patternlayout": { "pattern": "%d{yyyy-mmm-dd hh:mm:ss a} [%t] %-5level %logger{36} - %msg%n" }, "name": "console", "target": "system_out" }, "rollingfile": { "name": "general", "filename": "c:/logs/simulator-log.log", "filepattern": "c:/logs/simulator-log-%d{yyyy-mm-dd hh-mm-ss}.log", "patternlayout": { "pattern": "%msg%n" }, "policies": { "onstartuptriggeringpolicy": { } } }, "file": { "patternlayout": { "pattern":"%msg%n" }, "name": "test", "filename": "c:/logs/requests_received.log" }, "fi...

jquery - How do I submit Ajax form from javascript and update target div? -

i have bootstrap modal popup, ajax helper form on need js validation prior submitting. if validation fails, i'm showing things on form. if validation passes want submit form, , update specific div partialview. validation, i'm calling js function button on form, , passing in form. if validation passes, call form's submit. this works, partialview displays full page, rather in target div. form works , updates target div when submit directly submit input on form instead of submitting js function. how update target div when submitting js function? see code: function validateactionitem(sender) { var $formtosubmit = $(sender).closest('form'); $formtosubmit.submit(); } <div id="mydivcontainer" class="col-lg-12"> @html.action("mypartial", "mycontroller", new { id = model.id }) <div class="modal fade" id="mymodal"> <div class="modal-dialog modal-lg"> <div ...

Convert 2016-08-27 string to date in hive -

i using code below convert date format output null. select from_unixtime(unix_timestamp(b.temp,'yyyymmdd'), 'yyyymmdd') temp1 ([![enter image description here][1]][1] select a.*, regexp_replace(a.ao_date,'-','') temp clla_samp_base ) b ; any appreciated! 2016-08-27 in iso date format date format acceptable hive "as is". hive> select cast ('2016-08-27' date) dt; ok dt 2016-08-27 p.s. if have column containning values in format, can define column type date in first place.

mysql - Foreign Key cyclic reference Dilemma -

consider simple situation in there 2 tables, named users , workgroups. a user's email address primary key in users table. a workgroup_id primary key in workgroup table. a user can create multiple workgroups. a user can part of 1 workgroup. under given scenario need track user created workgroup. what have done: have variable named workgroup_id in users table know workgroup user belongs to. foreign key workgroup_id in workgroup table. have variable named user_email in workgroup table track user created workgroup. foreign key user_email in users table. the problem facing here results in cyclic reference between users , workgroups table. since cyclic references anywhere in programming big no no. how solve this? there better design pattern missing here? edit: whether "circular references big no no" or not, conceptually may not since there implementation non universal in different databases, still remain valid problem. aggravated case when have use o...

jenkins - Declarative Pipeline When Conditions -

i'm in need of when condition on jenkins. want take words full_build merge request title , execute different stages based on whether full_build or submitting merge request master doesn't need go through veracode, sonarqube, etc etc (these stages not pasted in repeats of when conditions below). however, have repeat crazy when condition on every stage, creating special stage executes on full_build or "regular" builds. has created @noncps script set true/false variable? or there crafty way execute script on startup set reusable variable? i want have users execute gitlab mr , not have go jenkins hit button (hence not use parameter of boolean). pipeline { agent { node { label 'master' } } parameters{ //i trying pull information full build merge request } environment { //assume random variables work fine } options { skipdefaultcheckout() gitlabconnection('gitlab...

java - Spring boot security add parameter to login -

i've problem, use spring boot , there i've implemented security. in securityconfig class (below method source code) i've provided username , password parameters checked during login process. need check if account activated, in db i've column 'activated' boolean value. , how provide own parameter account activated login process ? @override protected void configure(httpsecurity http) throws exception { http.authorizerequests() .antmatchers("/").permitall() .antmatchers("/investors/**").hasanyrole("admin") .antmatchers("/search**").authenticated() .anyrequest().fullyauthenticated() .and() .formlogin() .loginpage("/login") .usernameparameter("username") < - .passwordparameter("password") < - .permitall() .and() .logout() thanks help ...

select - How to split comma separated string of records and arrange then sequentially in MySQL? -

i want mysql query select records separately following table id agentid name return date 1 1,2,3 2016-05-22,2016-02-1,2016-1-15 2 2,4 b 2016-03-22,2016-04-1 expecting answer id agentid name return date 1 1 2016-05-22 1 2 2016-02-1 1 3 2016-1-15 2 2 b 2016-03-22 2 4 b 2016-04-1 you can use mysql substring_index(). return sub-string given comma separated string before specified number of occurrences of delimiter. try this, seems work fine: select id ,substring_index(substring_index(t.agentid, ',', n.n), ',', -1) agent ,name ,substring_index(substring_index(t.return_date, ',', n.n), ',', -1) return_date table1 t cross join ( select a.n + b.n * 10 + 1 n (select 0 n union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union s...

SSIS: How do I pass string parameter in an update statement in Execute SQL Task? -

i have 1 execute sql task in ssis 2012 has update statement. want pass string variable in clause of update statement. update section below: where coalesce(s1.iteration, '') not '%?%' , s2.iteration = '?' here, ? needs replaced string variable, in case 08152017 . have added variable parameter mapping. screenshot attached. the task executes not updates value in intended column. seems query not passing value.what doing wrong? how check sql inside execute sql task getting value variable? create user variable % on it, example, variable name like_var data type string "%" + @orig_var + "%" let's say, orig_var has value of 08152017, therefore like_var have %08152017% then use like_var on parameter in execute sql task parameter 0, data type varchar in parameter mapping where coalesce(s1.iteration, '') not ? , s2.iteration = ?

ios - Firebase DB Key, Name, Value clarification -

i have firebase db follows: { "kids" : { "icon" : "childicon", "name" : "children's", "qty" : 2 }, "clothes" : { "icon" : "mensicon", "name" : "mens", "qty" : 12 }, "womans" : { "icon" : "womansicon", "name" : "womans", "qty" : 5 } } i want read top level list of names. example, trying retrieve "kids, clothes, womans" i can use code: let query = ref.queryordered(bychild: "name") //userid) query.observe(.value, with: { snapshot in var array = [categories]() child in snapshot.children { if let category = mapper<categories>().map(json: (child as! firdatasnapshot).value as! [string : anyobject]) { array.append(category) } } success(array) ...

bjam execution in boost's example/tutorial failed -

as instructed on http://www.boost.org/doc/libs/1_62_0/libs/python/doc/html/tutorial/tutorial/hello.html i entered bjam in folder's directory (c:\program files\boost\boost_1_65_1\libs\python\example\tutorial) , got following error: ...found 12 targets... ...updating 5 targets... compile-c-c++ hello.obj hello.cpp hello.cpp(7): fatal error c1083: cannot open include file: 'boost/python/module.hpp': no such file or directory call "c:\users\trg\appdata\local\temp\b2_msvc_14.1_vcvars32_.cmd" >nul cl /zm800 -nologo @"hello.obj.rsp" ...failed compile-c-c++ hello.obj... ...skipped <p.>hello_ext.dll lack of <p.>hello.obj... ...skipped <p.>hello_ext.pdb lack of <p.>hello.obj... ...skipped <p.>hello lack of <p.>hello_ext.dll... ...failed updating 1 target... ...skipped 4 targets... as above returns, error is: fatal error c1083: cannot open include file: 'boost/python/module.hpp': no such file or direct...

c++ - Error calculating the area of a triangle? -

i'm working on program reads base , height of triangle of triangle , reports area. here's have far: #include<iostream> using namespace std; // simple triangle class base , height class triangle { public: double setbase(double x) { //was void changed double base = x; } double setheight(double y) { height = y; } double getbase() { return base; } double getheight() { return height; } private: double base, height; }; double area(double, double); int main() { triangle isoscoles1; isoscoles1.setbase; isoscoles1.setheight; cin >> isoscoles1.setheight; cin >> isoscoles1.setbase; double x = isoscoles1.getbase; double y = isoscoles1.getheight; cout << "triangle area=" << area(x,y) << endl; system("pause>nul"); } double area(double x, double y) { double a; = (x*y) / 2; retu...

java - Big O for 3 nested for loops? -

public int loop(int[] array1) { int result = 0; (int = 0; < array1.length; i++) { (int j = 0; j < array1.length; j++) { (int k = 1; k < array1.length; k = k * 2) { result += j * j * array1[k] + array1[i] + array1[j]; } } } return result; } i'm trying find complexity function counts number of arithmetic operations here. know complexity class o(n^3), i'm having bit of trouble counting steps. my reasoning far count number of arithmetic operations 8, complexity function 8n^3? any guidance in right direction appreciated, thank you! the first loop run n times, second loop run n times third loop run log(n) times (base 2). since multiplying k 2 each time inverse operation take log. multiplying have o(n^2 log(n))

sql - replication multiple databases into one database -

before question want explain i'm trying do. i'm using sql server 2016 , have 2 databases databasea databaseb in remote server created same databases using same creation sql scripts used databasea , databaseb . used replication service sql server 2016 . local database publisher , remote server subscriber. this worked fine. want having 1 database in remote server contains tables both databases , 2 databases replicate corresponding tables. for example [databasea].[dbo].[tablea] ---is replicated into-->[aggregateddatabase].[dbo].[tablea] [databaseb].[dbo].[tableb] ---is replicated into-->[aggregateddatabase].[dbo].[tableb] is possible? if yes how else other options i'm looking for? yes,it possible..two different publishers can have 1 subscriber.. if yes how just set way set replication , while selecting subscriber choose aggregated database

javascript - d3.js forceSimulation() with object entries -

Image
have problem bubble chart . used forcesimulation() array of objects , worked. changed data source , doesn't, if console displays no errors . data object called "lightweight", following structure: use append circles so: // draw circles var node = bubblesvg.selectall("circle") .data(d3.entries(lightweight)) .enter() .append("circle") .attr('r', function(d) { return scaleradius(d.value.length)}) .attr("fill", function(d) { return colorcircles(d.key)}) .attr('transform', 'translate(' + [w/2, 150] + ')'); then create simulation: // simulate physics var simulation = d3.forcesimulation() .nodes(lightweight) .force("charge", d3.forcecollide(function(d) { return d.r + 10; })) .force("x", d3.forcex()) .force("y", d3.forcey()) .on("tick", ticked); // updates position of each circle (from function dom) // call check position of...

java - Default null Integer field to null instead of 0 using Jackson -

i'm trying default missing integer value null when deserializing json java using jackson library version 2.8.8. for example, following json missing age attribute: { "name": "me" } and java class public class person { private integer age; private string name; public integer getage(){ return this.age; } public void setage(integer age){ this.age = age; } //omitting getters , setters of name verbosity sake } what i'm ending java object age 0 , name "me". i'd have age null instead of 0. i'm using code conversion: objectmapper mapper = new objectmapper(); mapper.readvalue(json, person.class); according github issue on fasterxml , framework should defaulting value null instead of 0 since i'm using wrapper class (integer). don't have ability modify pojo being used because being generated framework i'm using, when inspect generated setter or debug , @ setter within beandeserializerfactory....

syntax highlighting - How to work around CLion 2017.2 thinking constexpr if's make everything after unreachable -

Image
i know clion 2017.2 has limited support c++17 features (basically other nested namespaces), it's frustrating treats constexpr if's if after unreachable code until end of function. anyone know workaround @ least functionality after constexpr if end of function? if constexpr c++17 feature, not support clion yet, don't understand happen in code. if bother unreachable code highlighting can disable inspection completly in settings or disable on particular code sample sadly, there no way disable wavy red line

Dictionary Syntax Error in Google Apps Script -

i have function creates dictionary based on series of values sheet. try pull 1 of values sheet using key. works fine log console. however, in if statement, says syntax error , nothing else. cannot figure out. here function , code crashes. problem occurs in loop, , not occur outside of it. //creates dictionary function columnlocationwithnotation(notation) { var spreadsheet = spreadsheetapp.openbyurl(); var sheet = spreadsheet.getactivesheet(); var data = sheet.getdatarange(); var cells = data.getvalues(); var dictionary = {}; switch (notation) { case "zeroindex": (var = 0; < sheet.getlastrow(); i++) { dictionary[cells[i][0]] = cells[i][1] } return dictionary break; case "regularindex": (var = 0; < sheet.getlastrow(); i++) { dictionary[cells[i][0]] = cells[i][2] } return dictionary break; case "string": (var = 0; < sheet.getlastrow(); i++) { ...

javascript - embedded video disappearing just after page loads -

using google chrome browser (windows/mac), happens me following code displays video preview when page loads, after 1 second preview disappears. tried in 5 different computers google chrome browser. on other computer google chrome browser preview didn't disappear (just 1/6 of tries works properly). <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css" media="all"> .container { overflow: hidden; } </style> </head> <body> video 1:<br /> <div class="container"> <div> <iframe frameborder="0" src="https://www.youtube.com/embed/juqyzgnbspy" width="385" height="217" align="left" > </iframe> </div> </div> video 2:<br /> <div class="container"...

java - Syntax Error, insert ". class" to complete expression 5 -

import java.util.random; public class randomwalker { public static void main(string[] args) { int n = integer.parseint(args[0]); int x = 0; int y = 0; int = 0; int distance = 0; random rand = new random(); system.out.println("(" + "0" + "," + "0" + ")"); while (i<n) { if (i=n) int val = rand.nextint(4) + 1; = i+1; if (val==1) { y = y+1; if (i = n - 1) { distance = ((math.pow((x-0), 2)) + (math.pow((y-0), 2))); system.out.println("squared " + "distance " + "= " + distance); } else { system.out.println("(" + x + "," + y + ")"); } } if (val==2) { x = x+1; if (i = n - 1) { distance = ((math.pow((x-0), 2...

Delphi IDE disable Sync Edit Mode -

Image
delphi ide has sync edit button shows when select multiple lines of text there way disable this? we suspect making mouse scrolling while text selected painfully slow on machines scrolling video example of why think sync edit that's slowing down scrolling steps reproduce 1) create unit in delphi 2) add 100 lines random text 3) have no lines selected/highlited - use mouse wheel scroll (should no lag) 3) make 1 line selected/highlited - use mouse wheel scroll (should no lag) 4) make multiple lines selected/highlited - use mouse wheel scroll (you notice lag in scrolling - if close notice sync edit appears have reprinted making different color has attempted 15 secs video) this reason why suspect sync edit button

html - a href background image display not working with chrome -

the problem occurred when added href div. checked out site in safari , fine when opened chrome background image turns grey box. i read question says display: inline-block should fix once site online updated github no luck! appreciated don't want have remove background image. here github page ... https://michael-hands.github.io/jennielouise/ <a href="gallery.html" class="cake-smash"> <div class="box1"> <h2>cake smash</h2> <p class="animated">lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> </div> </a> .cake-smash position: relative height: 50% width: 100% display: block background-image: url("../img/cakesmash.jpg") background-position: center center background-repeat: no-repeat background-size: cover text-align: center display: inline-block margin-bottom: -5px padding: 0

python 3.x - Python3 extrapolate using the starting value as the average of the final values -

i have dataframe yearly data in want extrapolate monthly. had process ran in sas, moving python3, did this. took yearly value , used average full year, spreading out monthly values (with month 6 being value). here sas code: proc expand data = interpolation out = interpolate1 = year =month; id mdy; convert ww_unempratefc / observed = average; convert us_gas/observed = average; run; below starting data. year rw_unempfc usgas 0 2011 7.49 3.40 1 2012 7.30 3.54 2 2013 7.10 3.33 3 2014 7.00 2.90 4 2015 6.90 2.21 here sas output 1 year: jan2011 7.5054662504 3.1396263397 feb2011 7.5116185928 3.2054411594 mar2011 7.5147516515 3.2648661888 apr2011 7.515085202 3.3200225579 may2011 7.512602436 3.3689424153 jun2011 7.5075223604 3.4119533453 jul2011 7.5000068984 3.4492530654 aug2011 7.4900880953 3.4816285652 sep2011 7.4782763777 3.5082981244 oct2011 7.464603791 3.5300487326 nov2011 ...

javascript - Change Google Chart container to another during runtime -

like in answer: how clone , re draw google chart in div? however, don't want clone chart itself, move him div in runtime. here options... 1) if using chartwrapper class, use setcontainerid change div id redraw chart see following working snippet... google.charts.load('current', { callback: drawchart, packages: ['controls', 'corechart'] }); function drawchart() { var data = new google.visualization.datatable(); data.addcolumn('number', 'x'); data.addcolumn('number', 'y'); data.addrows([ [0, 0], [3, 3], [6, 6] ]); var chartwrapper = new google.visualization.chartwrapper({ charttype: 'linechart', containerid: 'chart-left', datatable: data, options: { backgroundcolor: 'transparent', theme: 'maximized' } }); chartwrapper.draw(); document.getelementbyid('switch').add...

orientdb2.2 - plotting subgraph in Studio -

i'm new orientdb , trying understand queries need return such orientdb plot graph circle (o) next queries in browse tab produces plot. i'm trying studio plot subgraph pattern match. want @ least plot vertices though prefer having edges come automatically well. presently, nothing comes in plot. i'm happy data returned query, studio won't plot it. not clear if have project answer in special way studio? here query: select r,u,m ( match {class:user ,as:u} <-hasauthor- {class:miniprop, as:m} <-hasmp- {class:run, as:r} return u,m,r ...

entity framework - EDMX -> Code First generator -

is there existing way generate ef code first existing edmx> i know there's reverse poco generators go connection string, wee have legacy solution has massive schema inordinate number of customisations made (renames, relationships no in underlying schema, etc) business code heavily relies on. we'd generate code first classes without breaking part of system code code first migrations. there's no automated way translate edmx mapping code-first mapping (fluent or attribute-based). best can copy generated entity classes under .edmx , recreate mappings in edmx using fluent api. note there things definingquery don't exist in code-first.

c++ - Explanation for a memory error result [compiler behavior] -

this question has answer here: c++ delete - deletes objects can still access data? 13 answers first off, question compiler behavior not correct code either! here's code cannot explain myself why i've got results. i know has memory error (deleting pointer in other scope , before done it) results only last element problematic. why last element has raw generated rand number? #include <iostream> using namespace std; void populate(int *arraytopopulate, int arraysize); int main() { int *ptr; ptr = new int[100]; populate(ptr, 100); (int = 0; < 100; i++) cout << ptr[i] << endl; return 0; } void populate(int *arr, int size) { (int = 0; < size; i++) { arr[i] = rand() % 100 + 1; } delete [] arr; } the results: 8 50 74 59 31 73 45 79 24 10 41 66 93 43 88 4 28 30 41 13 4 70 10 5...

excel - Populate ListBox on ComboBox selection - `run-time error '-2147352571 (80020005)':Type mismatch` -

i trying populate list box rows match combobox selection (in column a) i keep getting error when reach record has match in worksheet run-time error '-2147352571 (80020005)':type mismatch i trying search range matching values, add entire row of each matching value in column listbox, if there none, nothing. seems when there match, instead of copying row listbox, error. my understanding if there no match, "" printed, if there match listbox3.additem sheets("actionitems").range("a2:c8").... combobox gets list different sheet within workbook. private sub combobox3_change() set rng = sheets("actionitems").range("a2:a50").find(what:=me.combobox3.value) if rng nothing listbox3.value = "" else listbox3.additem sheets("actionitems").range("a2:c8") end if end sub on listbox.additem method written item data type string so on examples on link, can have functio...

How to get all child views to overlap and fill their parent w/ React Native Flexbox -

i want have children filling available space, , overlapping 1 another, last child visible. <view style={???}> <view style={???} /> // not visible (if bg color set on next child) <view style={???} /> </view> i've tried various combinations of flex , position , alignself: stretch , etc., , can't find winning combo. i think want this: component/index.js: import react 'react'; import { view, } 'react-native'; import style './style'; export default class component extends react.component { render() { return ( <view style={style.root}> <view style={style.childone} /> <view style={style.childtwo} /> </view> ); } } component/style.js: import { stylesheet } 'react-native'; export default stylesheet.create({ root: { flex: 1, position: 'relative', }, child...

c# - Insert float values to Access -

this code, inserts values in ms access. doesn't insert float values, 0.45 . column datatype text private void button1_click(object sender, eventargs e) { oledbcommand cmd = con.createcommand(); con.open(); cmd.commandtext = "insert hhh values('" + textbox1.text + "','" +textbox2.text + "','" + textbox3.text + "','" + textbox4.text + "')"; cmd.connection = con; cmd.executenonquery(); messagebox.show("record submitted", "congrats"); con.close(); } you insert text while float number. also, ensure proper string expression of value, textbox1: string text1; // text1 must formatted dot decimal separator. system.globalization.cultureinfo culture = system.globalization.cultureinfo.invariantculture; text1 = convert.todouble(textbox1.text).tostring(culture); cmd.commandtext = "insert hhh values (" + text1 + ",'" +textbox2.t...

Replace String Regex PHP -

i have string cannot replace it. please me. <figure class="op-interactive"><iframe> <script type="text/javascript" src="https://content.jwplatform.com/libraries/le62tg8l.js"></script><script>jwplayer.key="key";</script><div id="player"></div> <script type="text/javascript"> var playerinstance = jwplayer('player'); playerinstance.setup({ file: 'http://media.beat.vn/video/1709/2030a7d8548e20b5f685c2f54dc91db5_c.mp4', aspectratio: '16:9', width: '100%' }); </script></iframe> </figure> i want replace <oembed>http://media.beat.vn/video/1709/2030a7d8548e20b5f685c2f54dc91db5_c.mp4</oembed> thank much!

ios - Corodva serve command just reset the app erasing all my changes -

i use command cordova serve test app in browser. when issue command, find code changes made app has been disappeared include newly added js files etc. app got complete reset. how can avoid , still use cordova serve command test in browser? thanks. i got issue resolved. took sometime figure out happening under hood. making changes directly in platform ios directory. after reading help, found cordova prepare or serve copy contents respective platform root www folder resets code directly wrote ios. to conclude, have make changes in root www folder , issue prepare/serve command copies code platform test out.

java - Display SQLite data in a ListView inside a Fragment -

i need code. want display qlite data listview inside fragment.i have 3 fragment 3 table display data in listview. in case, 3 tables, 1 of them main table. table named "estate". estate table, have division_id become primary key , foreign key table. so, when run application, user must click 1 value estate display in listview, display other data tables. learn many tutorial, still stuck in code. helping me solve problem. when run application, result force closed. here code. estate.java public class estate { //public string estate_id; private integer division_id; private string division_name; public estate(){} public int getdivision_id(){ return division_id;} public void setdivision_id(int division_id) { this.division_id = division_id;} public string getdivision_name(){ return division_name;} public void setdivision_name(string division_name) { this.division_name = division_name;} /* ...

Why is my php script not send the contact form to my email? -

i tried creating simple php script send email me when fills out contact form on website nan error says: inspirehealth.today unable handle request. http error 500 <?php $first_name = $_post('first_name'); $last_name = $_post('last_name'); $email = $_post('email'); $message = $_post('message'); $to = "lewkowicz613@gmail.com"; $subject = "message inspire health"; mail ($to, $subject, $message, "from: " . $first_name . $last_name); echo "your message has been sent"; ?> and here html file relevant form <section class="section-form js--contact" id="contact"> <div class="row"> <h3>please subscribe our email list!</h3> </div> <div class="row"> <form method="post" action="form_process.php" class="contact-form"> <div class="row"> ...