Posts

html - Height and weight attributes being ignored by css -

we updates our sites design, can't figure out why css ignoring height , width? for instance, youtube embedded videos don't stay @ 625x352 <iframe width="625" height="352" src="https://www.youtube.com/embed/jpcfaqiyui4" frameborder="0" allowfullscreen></iframe> and images original width of 155px , height of 250px don't transform 155x180 specified in html. <a href="http://my.jpg" target="_blank"><img src="http://thumbnail.jpg" width="155" height="180" /></a> anybody has idea how fix this? for player remove width 100% iframe { /* width: 100%; */ min-width: 0; max-width: 100%; } or can add inline css "width: initial;" iframe if can not play stylesheet <iframe width="625" height="352" width: initial;"> </iframe>

function - Continuous PowerTransform/BoxCox Transformation in R -

Image
i have dataset need transfer normal distribution. first, generate reproducible dataset. df <- runif(500, 0, 100) second, define function. function continue transforming d.f. until p > 0.05. transformed d.f. generated , named y. boxcoxtrans <- function(y) { lambda <- 1 constant <- 0 while(shapiro.test(y)$p.value < 0.10) { constant <- abs(min(y, na.rm = true)) + 0.001 y <- y + constant lambda <- powertransform(y)$lambda y <- y ^ lambda } assign("y", y, envir = .globalenv) } third, test df shapiro.test(df) shapiro-wilk normality test data: df w = 0.95997, p-value = 2.05e-10 because p < 0.05, transform df boxcoxtrans(df) then gives me following error messages, error in qr.resid(xqr, w * fam(y, lambda, j = true)) : na/nan/inf in foreign function call (arg 5) what did wrong? you use box-muller transformation generate approximately normal distribut...

where is scala get() method been defined -

def twosum(param1: list[int], param2: int) = { val gb = ((param1 combinations 2 tolist) find (_.sum == param2) get) val gb2 = gb map (param1.indexof(_)) sorted val index1 = gb2(0)+1 val index2 = gb2(1)+1 println(s" index1 = ${index1}, index2 = ${index2}") } in code, it's using @ second line. question scala get() method been defined. thanks find returns option . you therefore calling get method of option class.

java - Downloading file via SFTP using JSCH (android) -

i'm trying make app downloads file server using sftp. whenever run debugger, seems fine no errors. log says has downloaded specified file. however, can't seem find file supposedly downloaded anywhere in device. help? import android.app.activity; import android.os.asynctask; import android.os.bundle; import android.util.log; import android.view.menu; import android.view.menuitem; import com.jcraft.jsch.channel; import com.jcraft.jsch.channelsftp; import com.jcraft.jsch.jsch; import com.jcraft.jsch.jschexception; import com.jcraft.jsch.session; import com.jcraft.jsch.sftpexception; import java.util.list; public class mainactivity extends activity { private string user = "user"; private string pass = "pass"; private string host = "hostname"; private int portnum = 22; private string filename = "sample.txt"; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinsta...

java - Text moving animation -

Image
i new animations in javafx, , basic idea of how works; need starting keyframe , and ending one, play it. what want have list of strings, say, "0, 1, 2, 3, 4, 5...10", , variable, index . want have 3 of them on screen @ time inside 3 different text objects: 0 1 2 in example above, index = 0 . if index = 1 , this: 1 2 3 you idea, want do, every time index increments (it have property ), there animation of numbers trading spaces. so (symbol numbers represent fading): index = 0 : 0 1 2 index = 1 : ) 1 2# frame --- : ) 1 2 # frame --- : )1 2 # frame --- : 1 2 3 so in theory, lists stores these numbers infinite can't (shouldn't) have separate text object each number. can't figure out how should done, keyframes moving text object complicates things. here sample. import javafx.animation.*; import javafx.application.application; import javafx.beans.binding.stringbinding; import javafx.beans.property.*; import jav...

html - How to stack Second Div on First in Responsive (CSS)? -

i trying stack div 1 & div 2 (which side side in desktop mode), stack div 2 follwed div 1 below. used floats cannot make work. please find attach image short description. desktop view div 1(img) & div 2(txt) tablet view 740px (stack div2 first & div 1) div 2(txt) div 1(img) if understand question you're asking, want have 2 divs, div1, , div2, next each other on desktop, on mobile have div2 stack on top of div1. to this. you'll want have html code div2 first in index.html file followed div1. specify float:right on desktop. i've attached fiddle below better understanding. http://jsfiddle.net/d2o7zn1v/ in fiddle, div2 remain right of div1 on desktop stack on top of div1 on screen size below 600px. i hope helps!

html - Unordered list elements won't position -

i built slide-out menu using jquery, list containing menu items has been behaving strangely. no matter how change css, various list elements stay in same place, right on top of each other. page in question this. .slide-menu { width: 30%; left: -30%; position: absolute; z-index: 1; background-color: white; } .dlink { font-size: 16px; position: absolute; width: 30%; display: block; } #slide-list{ list-style: none; top: 0%; margin-left: 0px; } .sli-list-item { width: 30%; } #slide-panel { height: 100%; top: 0%; } this relevant css. change .dlink class this: .dlink { font-size: 16px; position: relative; width: 30%; display: block; } position: absolute; made them line on top of each other.