Posts

Showing posts from August, 2014

html5 - Placing checkbox over an image without using 'top' and 'position:absolute'? -

is possible put checkbox on image without using 'top' , 'position:absolute' ? <div class="main"> <img src="http://www.standard.co.uk/incoming/article9760552.ece/binary/original/rooney.jpg" class="image"/> <input class="checkbox" type="checkbox" value="1" /> </div> jsfiddle there's few possible ways. if want avoid top , absolute position using negative margins. or if want checkbox checked when image clicked wrap image in label , tie label checkbox. i've done both here . html: <div class="main"> <label for="checkbox"> <img src="http://www.standard.co.uk/incoming/article9760552.ece/binary/original/rooney.jpg" class="image" /> </label> <input id="checkbox" type="checkbox" value="1" /> </div> css: .image { height: 200px; width: 250px; } ...

linux - Changing CPU governor of a rooted android device -

i'm developing application changes cpu governor of rooted device. know can current governor in "sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", how change it? first, directory are, do: #cat scaling_available_governors then output this: ondemand userspace powersave performance these governors kernel supports. can force kernel use 1 of them running: #echo "powersave" > scaling_governor you need root work.

c - Sum of an array element using OpenMP -

i trying parallelize following nested "for loops" (in c) using openmp. for (dt = 0; dt <= maxdt; dt++) { (t0 = 0; t0 <= nframes-dt; t0++) { (i=0; i<natoms; i++) { vac[dt] = vac[dt] + dot_product(vect[t0][i],vect[t0+dt][i]) ; } } } basically calculates auto-correlation function of time dependent vector (vect). need vac array final output using openmp. i have tried using reduction sum approach of openmp perform this, adding following line above innermost loop ( for (i=0; i<natoms; i++) ). #pragma omp parallel default(shared) private(i,axis) schedule(guided) reduction(+: vac[dt]) but not work, since reduction sum not work arrays. best , efficient way parallelize such codes? thanks.

java - Create a service class or not for gson data processing -

we using google gson process json data.should use of service class or getting new gson().tojson(objectreference); and new gson().fromjson(jsonstring, klass.class); inside methods if gson heavyweight object objectmapper in jackson api need create service? thanks in advanced

Difference between forecast and predict function in R -

is there difference between predict() , forecast() functions in r? if yes, in specific cases should used? intro predict -- many kinds of r objects (models). part of base library. forecast -- time series. part of forecast package. (see example). example #load training data trndata = read.csv("http://www.bodowinter.com/tutorial/politeness_data.csv") model <- lm(frequency ~ attitude + scenario, trndata) #create test data tstdata <- t(cbind(c("h1", "h", 2, "pol", 185), c("m1", "m", 1, "pol", 115), c("m1", "m", 1, "inf", 118), c("f1", "f", 3, "inf", 210))) tstdata <- data.frame(tstdata,stringsasfactors = f) colnames(tstdata) <- colnames(trndata) tstdata[,3]=as.numeric(tstdata[,3]) tstdata[,5]=as.numeric(tstdata[,5]) cbind(obs=tstdata$frequency,pred=predict(model,n...

php - POST works on Postman, but not with CURL -

Image
using postman, send post (my username , password filled in): https://ssl.reddit.com/api/login?api_type=json&user=xxx&passwd=xxx&rem=true i receive response containing modhash , cookie. then, send second post postman to: https://en.reddit.com/api/comment?api_type=json&text=7/1/15test&thing_id=t1_csa56v2 with following headers (xxx has been confirmed , filled in): user-agent: xxx cookie: reddit_session=xxx x-modhash: xxx this provides correct response, when try same thing curl in php, responds user_required. once again, have confirmed cookie , modhash correct. $name = 't1_csa56v2'; $text = 'newest test 7/2/15 12:20am'; $url = 'https://en.reddit.com/api/comment'; $modhash = 'xxx'; $cookie = 'xxx'; $headerfields = array ( 'user-agent' => 'xxx', 'cookie' => 'reddit_session='.$cookie, 'x-modhash' => $modhash ); $postfields = array ( 'api_ty...

c++ - How can I see the output from printf's that are called from a DLL used by a Mex function in Matlab? -

i have mex code calls functions dll. dll has bunch of printf statements scattered around useful debugging. however, cannot see output in matlab command window. i've done reading , apparently because command windows not treated console application output printf can sent. have tried using link's solution no avail. have access source code of dll. compiling windows 7 in visual studio 2010. have tried using cout , works; however, not want rewrite of functions use cout. there can redirect output of printf matlab's command window? you need call setstdhandle before dll loads , initializes runtime library. can attach write end of pipe, , read other end. once runtime library initializes, have global data tied original stdout handle, , may not affected future calls setstdhandle .

c# - How to modify properties of the incoming object without creating a new instance? -

i modify properties of incoming object. how without creating new instance? i have class public class report : ireport<reportitem> { public report() { items = new reportitemscollection(); } public report(ienumerable<reportitem> items) { items = new reportitemscollection(items); } [datamember(name = "items")] public reportitemscollection items { get; private set; } ienumerable<reportitem> ireport<reportitem>.items { { return items; } } } and 2 methods private static report convertreportitems(report report) { var reportdata = report.items.select(backwardcompatibilityconverter.fromold); return new report(reportdata); } public static reportitem fromold(reportitem reportitem) { reportitem.agentids = new list<guid> { reportitem.agentid }; reportitem.agentnames = new list<string> { reportitem.agent }; return reportitem; } it sounds you...

azure - Can't login to Linux VM created by custom image -

i have created custom image of debian 7.0 following blog post: http://blogs.technet.com/b/dcaro/archive/2014/12/03/create-your-azure-image-with-debian-7-0.aspx in management portal vm status running. can't log vm using ssh. what's possible cause , how solve it? i intend create vm image of freebsd 8.3 in azure. 1 has tried before? maybe iptables setting , try disable iptables.

how to make a multiple string to single string in linux shell scripting -

am having string ("50342364232 , munish inspiring") when giving input taking 3 string in linux shell how make single string ? gave input ./filename "50342364232 , munish inspiring " if invoke program ./program "50342364232 , munish inspiring" , including quotes, interpreted single argument program . however, if within program call other-program $1 , when $1 expanded, expanded multiple arguments. work around that, want invoke other-program "$1" , preserve single argument.

r - Pretty printing zeros in data.frame with integers and doubles to CSV -

i have following data.frame: q <- data.frame(a = rep(0,12), b = rep(c(0,1),6), c = 0:11, d = c(rep(0.0,10),0.003579535,0.045418328), e = c(rep(0.0,10),0.001716128,0.057440227)) > q b c d e 1 0 0 0 0.000000000 0.000000000 2 0 1 1 0.000000000 0.000000000 3 0 0 2 0.000000000 0.000000000 4 0 1 3 0.000000000 0.000000000 5 0 0 4 0.000000000 0.000000000 6 0 1 5 0.000000000 0.000000000 7 0 0 6 0.000000000 0.000000000 8 0 1 7 0.000000000 0.000000000 9 0 0 8 0.000000000 0.000000000 10 0 1 9 0.000000000 0.000000000 11 0 0 10 0.003579535 0.001716128 12 0 1 11 0.045418328 0.057440227 i save in csv following format: "a","b","c","d","e" 0,0,0,0.000000000,0.000000000 0,1,1,0.000000000,0.000000000 0,0,2,0.000000000,0.000000000 0,1,3,0.000000000,0.000000000 0,0,4,0.000000000,0.000000000 0,1,5,0.000000000,0.000000000 0,0,6,0.000000000,0.000000000 0,1,7,0.000000000,0.000000000 0,0,8,0.000000000,0....

ios - Worklight 6.1 swift 1.2 support -

i working on project has built , deployed adapters on worklight 6.1 server , have develop app use these adapters using latest version of swift. i'm trying add native api project , connect server native app alwas error when call wlcliend.wlconnectwithdelegate(self): > 2015-07-14 17:35:58.782 iosnativeapi[46479:353823] [error] > [worklight]: cannot find cookies.mom file 2015-07-14 17:35:58.789 > iosnativeapi[46479:353823] *** terminating app due uncaught > exception 'nsinvalidargumentexception', reason: 'cannot create > nspersistentstorecoordinator nil model' > *** first throw call stack: my question have project in swift , server in 6.1? because 6.1 server didn't generate bridging header file, had wirte on own. so worklight server 6.1 works swift 1.2? if yes causing error? edit: here bridging header file: (i took file generated using 7.0 version , hint files weren't found) /* * licensed materials - property of ibm * 5725-i4...

sql - Speed Up Text Search Query Large Data Set -

hi i'm hoping has tip me. have query below filters detail field in #templogins table. details field text field contains many types of text strings, containing urls have parts "resultid=5" contained in resultidsearch , resultsetidsearch fields. records entries "resultid=5" ones i'm trying filter for. the problem have query takes way long run. templogin table has around 200 k records , tempsearch table has around 80 k records. any tips on how rewrite or speed query appreciated. enter code here: select * #templogins exists (select 1 #tempsearch t1 a.detail '%' + t1.resultidsearch + '%' or a.detail '%' + t1.resultsetidsearch + '%') this join version problem % going table scan index on #templogins.detail may doubt it select distinct a.* #templogins join #tempsearch t1 on a.de...

javascript - the labels flashes instead of being displayed -

as shown above it's register form , every field not filled ... label shown when submitting ... , it's working fine ! added code generator ... when user entered wrong code(mismatch) submit form ... there alert. when call in javascript whole javascript code not working ... label flashing instead of displaying next fields function registerform(){ var allow=true; var tit=document.signup.title.value; if(tit ==""){ document.getelementbyid("title_error").style.display="inline"; allow= false; } else{ document.getelementbyid("fname_error").style.display="none"; } var key=document.comp.gen.value; var key1=document.comp.matched.value; if (key !=key1){ alert(" code didn`t match"); allow=false; } return allow; } <html> <body> <?php function generaterandomstring($length=10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzabcdef...

sql - How to control spooling and echo in oracle -

i need write deployment script execute each sql script , log buffer per spooling path defined. deployment.sql set echo on; spool c:\temp\log\scriptlog\masterscript.log /* start executing script srcipt 1*/ @c:\scr\script1.sql; /* end executing script srcipt 1*/ spool c:\temp\log\scriptlog\masterscript.log append; /* start executing script srcipt 2*/ @c:\scr\script2.sql /* end executing script srcipt 2*/ set echo off spool off above deployment script execute script1 , script2. want spooling of script1 , script2 should not append on spooling of deployment script . , spooling of deployment script should contains below mentioned (means logged in deployment script) /* start executing script srcipt 2*/ @c:\scr\script2.sql /* end executing script srcipt 2*/ i tried possible solution used append of spooling , did googling lot did not appropriate solution. kindly suggest script1.sql -----------------------------------------------------------------...

Multiple linear regression for a dataset in R with ggplot2 -

Image
i testing make analysis of sentiment on dataset. here, trying see if if there interesting observations between message volume , buzzs, message volume , scores... there dataset looks like: > str(data) 'data.frame': 40 obs. of 11 variables: $ date time : posixct, format: "2015-07-08 09:10:00" "2015-07-08 09:10:00" ... $ subject : chr "mmm" "ace" "aes" "afl" ... $ sscore : chr "-0.2280" "-0.4415" "1.9821" "-2.9335" ... $ smean : chr "0.2593" "0.3521" "0.0233" "0.0035" ... $ svscore : chr "-0.2795" "-0.0374" "1.1743" "-0.2975" ... $ sdispersion : chr "0.375" "0.500" "1.000" "1.000" ... $ svolume : num 8 4 1 1 5 3 2 1 1 2 ... $ sbuzz : chr "0.6026" "0.7200" "1.9445" "0.8321...

text processing - I have two arrays roles added and roles deleted, want to merge them and write in this order in perl -

i have scenario. file has following fields: username | roles | type |date | abc|admin |added | 01072015 abc|developer |deleted |01072015 abc|deploy |added |01072015 xyz |admin |deleted |01072015 xyz| deploy|deleted|01072015 cdf|deploy|added|01072015 note here, date going same day, no change now, want printed as username |roles_added |roles deleted |date abc |admin,deploy |developer |01072015 xyz ||admin,deploy |01072015 cdf |deploy||01072015 i tried below approach given, didn't work out me. please guide me. #!/usr/bin/perl open(fil,"report.txt") or die("$!"); %k=(); while (my $line=<fil>) { ($user,$roles,$type,$dt)=split(/\|/,$line); $k{$user}{$roles}=1; $k{$user}{$type}=1; } @names=(sort keys(%k)); foreach $name (@names) { foreach $value ( (keys(%{$k{$name}})) ){ print "$value "; } print "$name\n"; } print " here \n"; while( ($k, $v) = each %$k ) { print "key: $k...

mysql - What is the effect of performance of a SQL query when have aggregate function and where clause -

i have 2 queries : 1. select u.unitid unitid, u.unitscode 'unitscode', ( cast(count(vd.date) float) / u.timediff ) * 100 'bookingcount', u.tradestarttime, u.tradestoptime, u.minimumslot, u.maximumterm @alldates vd inner join commcmlbookingdetail cd on vd.date between cd.dtfromtime , cd.dttotime , datepart(minute, vd.date) = datepart(minute, cd.dtfromtime) inner join commcmlbooking cb on cb.hmy = cd.hbooking , cb.istatus = 1 , cb.itype = 525 inner join @unitsinfo u on u.unitid = cb.hunit , cast(vd.date date) between cast(@bookingfromdate date) , cast(@bookingtodate date) , cast(vd.date time) between cast(u.tradestarttime time) , cast(u.tradestoptime time) cb.hrecord = case when @amendmentid = 0 cb.hrecord else @amendmentid end...

How to save a SQL Server Maintenance Plan within a Visual Studio Database Project -

having created sql server maintenance plan in sql server 2008 r2 instance, how can import definitions visual studio 2013 ssdt database project? i don't mind using pre- , post-deployment scripts if helps want in database project , able build project in vs , able deploy either new instance of plan, or able synchronize existing plan instance definitions in database project. also, drop , re-create entirely acceptable. does else know how ? first of maintenance plans not supported ssdt. you can export manually xml template file , try write sql/batch post deploy scripts deploy it. can find general instruction here (read comments also): https://robertbigec.wordpress.com/2013/10/03/automating-deployment-of-sql-server-maintenance-plans/ one note: exported xml template contains specific values such server name or path backup/log file locations. might want write custom script these values target machine , replace in xml file.

Rails: Display database query on HTML page, ActiveRecord -

i trying create search form rails app, user enters query , based off query, want them see list of links associated query (these links come 'links' table). created html form , has user enter query. use query <%= form_tag links_path, :method => 'get' %> <p> <%= text_field_tag :search, params[:search] %> <%= submit_tag "search", :name => nil %> </p> <% end %> in controller links table, have if statement checks user has entered , assigns link.where('title ?', '%{#params[:search]}%') @links . , converts array ( .to_a ) here statement in index action: def index @links = link.all if params[:search] #@links = link.find(:all, :conditions => ['title ?', '%{#params[:search]}%']) @links = link.where('title ?', '%{#params[:search]}%') @links.to_a end end in index.html.erb display result. used <%= @links %> however, displays a...

html - How to animate border-top effect -

when hover on "login,sign up" acorns website ( https://www.acorns.com/ ) can see animation going along. have li .navbar li{ display: inline-block; border-width:5px; border-top-style:solid; border-top-color: white; } .navbar li:hover, .navbar li:active{ border-width:4px; border-top-style:solid; border-top-color: #e0b82b;} how possible make border-top animated ? shown above. thank you. http://jsfiddle.net/9mfccz6w/ i'm trying animate top bar (yellow) you can add css tranistions .navbar li style. try code: .navbar li{ display: inline-block; border-width:5px; border-top-style:solid; border-top-color: white; -webkit-transition: 0.5s ease; -moz-transition: 0.5s ease; -o-transition: 0.5s ease; -ms-transition: 0.5s ease; transition: 0.5s ease; } jsfiddle

Private Variables vs Properties in C# -

this question has answer here: why use private members use public properties set them? 5 answers why use simple properties instead of fields in c#? [duplicate] 5 answers i teaching myself c# , curious need declaring private member variables accessed public properties. textbook i'm using says sake of encapsulation, why need private variables begin if properties can changed depending on 'get' or 'set' functions? here's example: namespace practice { struct person { private int id; private string name; public int id { {return id;} set {id = value;} } public string name { get; set; } public int age { get; set; } } class program { static void main(string[] args) { pers...

call - getting the group name to the accoding pri port in asterisk -

i using sagoma 8 port card chan_dahdi.conf configure ports are ;autogenerated /usr/sbin/wancfg_dahdi not hand edit ;autogenrated on 2015-06-12 ;dahdi channels configurations ;for detailed dahdi options, view /etc/asterisk/chan_dahdi.conf.bak [trunkgroups] [channels] context=default usecallerid=yes hidecallerid=no callwaiting=yes usecallingpres=yes callwaitingcallerid=yes threewaycalling=yes transfer=yes canpark=yes cancallforward=yes callreturn=yes echocancel=yes echocancelwhenbridged=yes relaxdtmf=yes rxgain=0.0 txgain=0.0 group=1 callgroup=1 pickupgroup=1 immediate=no ;sangoma a108 port 1 [slot:4 bus:2 span:1] <wanpipe1> switchtype=euroisdn context=from-pstn group=1 echocancel=yes signalling=pri_cpe channel =>1-15,17-31 ;sangoma a108 port 2 [slot:4 bus:2 span:2] <wanpipe2> switchtype=euroisdn context=from-pstn group=2 echocancel=yes signalling=pri_cpe channel =>32-46,48-62 ;sangoma a108 port 3 [slot:4 bus:2 span:3] <wanpipe3> switchtype=euroisdn c...

javascript - Unit Test a AngularJS Directive's Controller (Karma, Chai, Mocha) -

having trouble reaching directive's scope unit test. getting generic compile errors when trying run unit test. my app compiles ( gulp ) , runs fine, , can unit test non-directive's fine well. not sure how test's work directive, trying other people's solutions educated guesses. main page's html , js <div company-modal="companyoptions" show-close="false"></div> . (function() { 'use strict'; angular .module('app') .controller('companymodalctrl', ['$scope', selectionpage]); function selectionpage($scope) { $scope.companyoptions = {}; } })(); here first portion of directive (it big including important-top part. (function() { 'use strict'; angular .module('app') .directive('companymodal', companymodal ); function companymodal() { return { restrict: 'a', replace: fal...

javascript - How to connect the ng-model of two different controller in angularjs? -

i have 1 table fill json data. after filling table, if 1 wants modify row pop-up window, can modify. what doing: made 2 controller, want pass ng-model value 1 controller other controller controller window. please tell me how connect these 2 controller. please see running example, http://plnkr.co/edit/6lrt1b1sycex0lvcjizz?p=preview index.html <!doctype html> <html> <head> <title>todo api client demo</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script> <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> <script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap....

java - Querying CLOB column with hibernate criteria -

i have table like table name: items columns : name type id number status varchar2 data clob i have hibernate mapping below @entity @table(name="items", uniqueconstraints = {@uniqueconstraint(columnnames={"id"})}) public class hitem implements serializable { private long id; private string status; private string datajson; @column(name = "id") public long getid() { return id; } @column(name = "status") public string getstatus() { return status; } @column(name = "data") public string getdatajson() { return datajson; } } and querying data using criteria follows list<hitem> items = helper.getsession().createcriteria(hitem.class) .add(restrictions.eq("status", "a")).list(); since have more 1200 matching records in table, throwing jdbc batch update error. suspect due large number...

delphi - How to process only the newest message using an out-of-context hook -

in application use winevent hook focus changes system-wide. because there no timing problems, use out-of-context hook, if know slow. if there multiple events fired on after another, system queues them , gives them hook callback function in right order. now process newest focus change. if there other messages in queue, want callback function stop , restart parameters of newest message. there way that? when receive focus change, create asynchronous notification yourself, , cancel previous notification(s) may still pending. you can use postmessage() , peekmessage(pm_remove) that. post custom message yourself, removing previous custom message(s) still in queue. or, can use ttimer / settimer() (re)start timer on each focus change, , process last change when timer elapses. either way, last notification processed once messages slow down.

Check condition in Perl regex for substitution -

i want substitute particular pattern in file other string. want substitution when particular string not matched in pattern. my code follows: use warnings; use strict; $filename = 'c:\test_folder\file.txt'; $pattern = undef; $read_handle = undef; $string = undef; open($read_handle, "<", $filename) || die "$0: can't open $filename reading: $!"; while ( <$read_handle> ){ $string = $string.$_; } $pattern = qr/(test_case_name.*?:(.*?)\n.*?priority.*?:(\w\d).*?=cut)/s; $string =~ s{$pattern}{$1\n\nsub $2\n{\n}\n}g; print $string; i have stored whole file in string. have following problem: if in pattern, $3(3rd back-reference) not equal "p3", substitution should occur. how can achieve this? some sample data input is: =head2 gen_001 test_case_name :gen_001 priority :p0 release_introduced :7.4 automated :yes step_name : step1 step_desc :example desc understanding ...

recursion - Recursive Insertion in a Binary Tree C# -

why reason member variables left , right never change when make recursive call? here's source code: public class c_nodo { int dato; c_nodo left; c_nodo right; public int dato { { return dato; } set { dato = value; } } public c_nodo left { { return this.left; } set { this.left= value; } } public c_nodo right { { return this.right; } set { this.right = value; } } public c_nodo(int inf) { this.dato = inf; this.left = null; this.right = null; } } public class c_arbol_bin { c_nodo root; public c_arbol_bin() { root = null; } simple insertion in root or make recursive call public void inserta(int dat) { if (root == null) { root = new c_nodo(dat); } else { insert_order(this.root, dat); } } here make recursive insertion in ordered w...

php - Cant Run javascript in AJAX file -

i have php file , sending variables php ajax file , running great , when run javascript in ajax file nothing appear alerting msg , nothing appear , there conflict between ajax , javascript ? in ajax file <script type="text/javascript" src="js/library.js"></script> <script type="text/javascript" src="js/jquery.js"></script> <?php session_start(); include("mysqlconnection.php"); if (!isset($_session['username'])) { echo "<h2 align='center'>warning: not signed in </h2>"; die ("<script type = 'text/javascript' language = 'javascript'>window.settimeout(\"location.href='index.php'\", 1000); </script>"); } $uid=$_session['uid']; $code = $_get['user']; $qty = $_get['qty']; $custid = $_get['custid']; $warehouseid = $_get['warehouseid']; if ($code==''){ $sql...

delphi - Function of a class returning an array that is declared after the class -

i somehow haven't dealt problem before. have class troom = class private width, length, x1,x2,y1,y2, index: integer; public function draw: roomarr; procedure setparam; function getparam: integer; end; now, below that, because delphi 7 can't return arrays of tclass, have declared this: roomarr = array of troom; this somehow fixes problem. no idea why, found solution on internet i using "roomarr" in other functions , works fine, expected. array declared after class (otherwise not know class troom), troom (more precisely function "draw") cannot use it. is there way bypass problem? thanks in advance. a forward declaration of troom : type troom = class; // forward declaration roomarr = array of troom; troom = class ... function draw: roomarr; end; the forward declaration must completed in same type section.

IOS Swift - Manually trigger textfield events -

how trigger events manually given uitextfield object? textfieldshouldbeginediting(_:) textfielddidbeginediting(_:) textfieldshouldendediting(_:) textfielddidendediting(_:) in current scenario. there logic goes above callbacks. , there times when manually update textfield textfield.text = <new text> and textfielddidbeginediting to trigger, (hopefully) textfield.trigger("textfielddidbeginediting") while approach might not entirely right way, above solution works me. although, if can word question differently, be: how can run logic (code) when uitextfields value (text) changed via ui or via textfield.text = <new value> to elaborate on answer , reasoning: i don't think possible trigger kind of events "by hand" - neither should able to. cause possibly more problems solves. e.g. should happen caret example, should displayed in textfield? therefore suggest extract logic second method , call method current code , handle...

javascript - CSS style not functioning with jquery -

i have html file has 2 images areas mapped , marked imagemapster. want 1 of images superimposed on , above image can dragged around. although quite close achieving intend, going wrong. image drag-able default positon of image below first image. want on top of other. reduced opacity. when page reloaded, seems superimposed fraction of second. statements inside style not working supposed to. can guess being overridden jquery-ui or other styles. can point out how fix this? locate.html.erb <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script> <script src="/assets/jquery.imagemapster.min.js"></script> <script src="/assets/threeddata.js"></script> <style> img { position: absolute; } #mainimage2 { opacity: 0.6; } </style> <h1>data archival lib...

css - Hiding Content from Mobile (SEO) -

do think hiding particular content mobile version of website can harm seo? have page has around 3 long paragraphs of content. on desktop, looks fine - on mobile there far content before being able click categories on page. i've decided write media query hide first paragraph in section. google think i'm trying use black-hat techniques or understand content visible on mobile? thanks! the {display:none} tag within css para you're trying hide read google. question here lies whether consider after parsing media query. highly doubtful considering read "present" code , not read multiple instances of it, recorded spider data code on html page without considering ifs , buts of css & js. imo, should not penalised long content unique , you're not indulging in black-hat tactics.

windows - How to figure out missing dll's -

i have matlab mex file not work, giving me "the specified module not found." error. now, understand issue tries link\call\whatever dll's missing. i'd figure out ones can provide them. here explained how use dependency walker generate text file supposedly has information. generated file it's huge 1 , @ loss information missing files is. i looking advice on how locate missing files reports in dependency walker output. one way might run process monitor , filter (ctrl+l) processes matlab.exe, , inspect lines 'file name not found' after calling mex. i can suggest way - more complicated , involves attaching debugger matlab . don't go there unless process monitor fails address this.

mocking - phpunit mock method called in constructor -

i test config class, parsing config file , allows me various settings app. my goal mock parse() method of config class, called in constructor , set method returning in constructor. this way, prevents file_get_contents() being called (in parse() method) , enables me have config class config property set contain array of properties. but haven't succeeded doing that. here code: the config class: <?php namespace example; use symfony\component\yaml\parser; class config { private $parser; private $config; public function __construct(parser $parser, $filepath) { $this->parser = $parser; $this->config = $this->parse($filepath); } public function parse($filepath) { $fileasstring = file_get_contents($filepath); if (false === $fileasstring) { throw new \exception('cannot config file.'); } return $this->parser->parse($fileasstring); } public function get($path = null) { if ($path) { $config = $thi...

web services - How to get XML response from PowerShell New-WebServiceProxy -

so powershell great auto generates typed classes when using new-webserviceproxy wsdl . i'm able talk webservice, want response xml not response object (strongly typed). following example code: $proxy = new-webserviceproxy -uri http://internal/employeedetails?wsdl $gpr = new-object "microsoft.powershell.commands.newwebserviceproxy.autogeneratedtypes.webserviceproxy1s_employeedetails_wsdl.getemployeerequesttype" $req.userid = "u015412" $req.clientid = "12345" $person = $proxy.getemployee($req) $person.person | select * | format-list #output: #name : smith #firstname : john $person getemployeeresponsetype , can't see methods getxml or that. found similar topic here: how can view soap/xml web service proxy class sending? , not sure how intercept call via powershell , if there isn't better method. see people suggesting use fiddler ... want returned xml in powershell, can export file. export-clixml doesn't trick ps object exported...