Posts

Showing posts from June, 2015

excel - Using a split function in a Loop not working -

i receiving no output following code: sub spliter() dim text string dim integer dim name variant until isempty(activecell) text = activecell.value name = split(text, " ") = 0 ubound(name) cells(1, + 1).value = name(a) next activecell.offset(1, 0).select loop end sub using 'run to' debugger, can see loops working fine. build splitter sub, loop function shelled it. splitter sub works fine 1 cell , itself, incorporated loop, splitter function delivers nothing. think may array in array issue. i'm not sure you're trying put data - data activecell may anywhere on sheet , paste on row 1 of same sheet. this code take activecell , cells below , split text string space , place each word next original sentence. sub splitter() dim stext string dim x integer dim vname variant until isempty(activecell) stext = activecell.value vname = split(stext, " ") activecell.offset(, 1...

ruby - Why the module `ClassMethods` defined and extended in the same namespace? -

i trying understand code github repo . it's main module of gem setup client. module github # more code class << self def included(base) base.extend classmethods # for? end def new(options = {}, &block) client.new(options, &block) end def method_missing(method_name, *args, &block) if new.respond_to?(method_name) new.send(method_name, *args, &block) elsif configuration.respond_to?(method_name) github.configuration.send(method_name, *args, &block) else super end end def respond_to?(method_name, include_private = false) new.respond_to?(method_name, include_private) || configuration.respond_to?(method_name) || super(method_name, include_private) end end module classmethods def require_all(prefix, *libs) libs.each |lib| require "#{file.join(prefix, lib)}" end end # more methods ... end extend ...

Jekyll JSON incorrect character encoding -

i'm using simple-jekyll-search create search page posts in jekyll. the json file search generated by: [ {% post in site.posts %} { "title" : "{{ post.title | escape }}", "category" : "{{ post.category }}", "tags" : "{{ post.tags | join: ', ' }}", "url" : "{{ site.baseurl }}{{ post.url }}", "date" : "{{ post.date | date: '%y %b %-d' }}", "content" : "{{ post.content | strip_html | strip_newlines }}" } {% unless forloop.last %},{% endunless %} {% endfor %} ] the problem characters incorrectly encoded in json file (though appear correctly in html). "you’ll" appears "you’ll" in json, example. there's issue incompatibility of character encoding, i'm not sure fix it. since it's incorrect in json, i'm guessing it's somewhere in template generate json, can't life of me figure out how...

java - Returning a formatted string does not working properly -

i have created dupe-check makes sure newly created usernames unique. it looks this: string p1 = <code>; //first 3 chars in first name string p2 = <code>; //first 3 chars in last name int p3 = 1; //unique identifier. boolean dupecheck; { dupecheck = false; (int = 0; < usernamelist.size(); i++) { if (usernamelist.get(i).equals(p1+p2+integer.tostring(p3))) { dupecheck = true; p3++; } } } while (dupecheck == true); this works, if return: return string.format("%s%s%d", p1, p2, p3); duplicate usernames names like: xxxyyy1 xxxyyy2 xxxyyy3 which great. want unique identifier ( p3 ) allways 3 digits long. string.format comes play, along problems. if return following code: return string.format("%s%s%03d", p1, p2, p3); for reason, dupe check fails , these usernames: xxxyyy001 xxxyyy001 xxxyyy001 can explain happening? if store usernames using %03d, i.e. leading zeros, should use when...

spring - The page is directed to /j_spring_security_check even after entering correct credentials -

i'm using spring security in spring project. following springsecurityconfiguration.xml file. after try log in using correct credentials, page redirects https://localhost:8443/j_spring_security_check . please note falls beyond application terror movies. custom_login page presented @ https://localhost:8443/terrormovies/custom_login <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:security="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemalocation=" http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/sche...

r - handling NA values in apply functions returning more than one value -

i have dataframe df 2 columns col1 , col2 , includes na values in them. have calculate mean , sd them. have calculated them separately below code. # random generation set.seed(12) df <- data.frame(col1 = sample(1:100, 10, replace=false), col2 = sample(1:100, 10, replace=false)) # introducing null values df$col1[c(3,5,9)] <- na df$col2[c(3,6)] <- na # sapply return value function stat <- data.frame(mean=numeric(length = length(df)), row.names = colnames(df)) stat[,'mean'] <- as.data.frame(sapply(df, mean, na.rm=true)) stat[,'sd'] <- as.data.frame(sapply(df, sd, na.rm=true)) i have tried both operations @ single time using below code. #sapply return more 1 value stat[,c('mean','sd')] <- as.data.frame(t(sapply(c(1:length(df)),function(x) return(c(mean(df[,x]), sd(df[,x])))))) as failed remove na values in latest function, getting output na both mean , sd . can please give idea on how remove na ...

c++ - Return multiple variables to JavaScript from COM -

i have com function in disp interface shown below, [id(1)] hresult multiplereturn([out]bstr* arg1, [out, retval] bstr* arg2); implemented stdmethodimp somecoolobject::multiplereturn(bstr* arg1, bstr* arg2) { *arg1 = sysallocstring(l"test1"); *arg2 = sysallocstring(l"test2"); return s_ok; } in python can call import comtypes.client cc obj = cc.createobject('somecoolobject') = obj.multiplereturn() print(a) # gives (u'test1', u'test2'), python, see don't bite :) same in javascript var obj = new activexobject("somecoolobject") // gives error, kind of obvious // 'wrong number of arguments or invalid property assignment' // var val = obj.multiplereturn(); var = "holaaa!"; var val = obj.multiplereturn(a); alert(val); // gives "test2" alert(a); // gives "holaaa!", may have given "test1" this proves, javascript won't play ball. why? if not, how retu...

ingres - UNION clause in embedded SQL -

i'm using ingres 10s sql, , i'm trying write following sql statement in embedded sql c program. works fine standalone sql script, compiling esql program gets error %% error in file localtask.sc, line 498: e_eq0244 syntax error on 'union'. insert nr301_tab2 (authority_id) select a.authority_id nrremdets a, nrstatus_hierarchy z a.authority_id = z.authority_id union select a.authority_id nrsumsamts a, nrsumsdets b a.authority_id = b.authority_id; (line 498 union line) what's wrong union clause? just slight tweak of query , should work. try this: insert nr301_tab2 (authority_id) select authority_id (select a.authority_id nrremdets a, nrstatus_hierarchy z a.authority_id = z.authority_id union select a.authority_id nrsumsamts a, nrsumsdets b a.authority_id = b.authority_id) result the idea union result sets, create new result set inserted once in table. adding parenthesis make sure happens.

swift - How to make UIScrollView scrolling all content inside it -

i have uitextview , uiimageview , uilabel inside uiscroll view. made uitextview height equals content , made scrollenabled = false . uiscrollview scrolling not content. want uiscrollview scrolling content inside it. want make detailviewcontroller in news applications. how make it? i found solve, ctr-drag uitextview height constraint detailviewcontroller , made following @iboutlet weak var textviewheight: nslayoutconstraint! { didset { self.textviewheight.constant = self.textview.sizethatfits(cgsizemake(self.textview.frame.size.width, cgfloat.max)).height } }

ios - Scene Kit: projectPoint calculated is displaced -

Image
i trying draw frame on sphere on parent view of scene, reason points converted scnscene.projectpoint method displaced. to make simple, created sphere @ center of scene 2 radius. sphere attached root node, top left corner on world coordinates @ (-2,-2,0) point. here complete code: func spherewithframe(){ var v1 = scnvector3(x: 0,y: 0,z: 0) var v2 = scnvector3(x: 0,y: 0,z: 0) let topsphere = scnsphere(radius: 2.0) topsphere.firstmaterial!.diffuse.contents = uicolor.greencolor() let topspherenode = scnnode(geometry: topsphere) topspherenode.position = scnvector3make(0, 0, 0) scene.rootnode.addchildnode(topspherenode) topspherenode.getboundingboxmin(&v1, max: &v2) //world coordinates let v1w = topspherenode.convertposition(v1, tonode: scene.rootnode) let v2w = topspherenode.convertposition(v2, tonode: scene.rootnode) //projected coordinates let v1p = scnview.projectpoint(v1w) let v2p = scnview.projectpoint(...

typeclass - Existing constants (e.g. constructors) in type class instantiations -

consider isabelle code theory scratch imports main begin datatype expr = const nat | plus expr expr it quite reasonable instantiate plus type class nice syntax plus constructor: instantiation expr :: plus begin definition "plus_exp = plus" instance.. end but now, + , plus still separate constants. in particular, cannot (easily) use + in function definition, e.g. fun swap "swap (const n) = const n" | "swap (e1 + e2) = e2 + e1" will print malformed definition: non-constructor pattern not allowed in sequential mode. ⋀e1 e2. swap (e1 + e2) = e2 + e1 how can instantiate type class existing constant instead of defining new one? type class instantiations in isabelle introduce new constants parameters of type class. thus, cannot plus (written infix + ) shall same plus . however, can go other way around, namely instantiate type class first , later declare operations on type class constructors of datatype. one such case c...

java - Getting values from multi-dimensional array too slow -

good day, i've been working on update in android project, , came across issue. have read questions sqlite database i've done loading multi-dimensional array shown below in database helper class: public string getsome(int s,int t, string table_name){ string selectquery = "select * " + table_name; sqlitedatabase db = this.getreadabledatabase(); cursor cursor = db.rawquery(selectquery, null); int rows = cursor.getcount(); int num=0; int col = 0; string[][] base = new string[rows][13]; if (cursor.movetofirst()) { { (col=0;col<13;++col ){ base[num][col] = (cursor.getstring(col));} ++num; } while (cursor.movetonext()); return base[s][t]; } return null; } with done, read questions such in question class: public void database_calls(){ setcoursetag(coursetag); my...

c# - AppFabric hosting/management replacement -

with news april microsoft ending support appfabric 1.1 april 2016. can recommend replacement services hosting , management/monitoring of services , workflows. microsoft suggest customers can manually host own services #copout , custom solutions can built produce management , monitoring #copoutagain. i beginning investigate wcf middletier , appfabric seemed ideal. seems such pity going end after 5 years without giving reason. appfabric end of support blog the end of support extended until 4/12/2022. advice on how , migrate recommended in official article of microsoft. talk ncache , new project redisonwindows msopen tech. more information check out msdn blog

MySQL database import error #1064 -

i have sql database want import using phplyadmin getting error. create table `wp_commentmeta` ( `meta_id` bigint( 20 ) unsigned not null auto_increment , `comment_id` bigint( 20 ) unsigned not null default '0', `meta_key` varchar( 255 ) default null , `meta_value` longtext, primary key ( `meta_id` ) , key `comment_id` ( `comment_id` ) , key `meta_key` ( `meta_key` ( 191 ) ) ) engine = aria auto_increment =3843 default charset = utf8 page_checksum =1 delay_key_write =1 transactional =1; mysql said: documentation #1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near 'page_checksum=1 delay_key_write=1 transactional=1' @ line 9 if not using mariadb , change engine=aria engine=myisam (or engine=innodb ) , remove page_checksum=1 , transactional =1 ; find example here

exchange server - How to download >1 MB Email attachment using EWS in C# -

i need download email attachments exchange server using exchange web service api 2.1 tried finditemresults . minimum size of files can download. but, if file size above 1 mb(i tried 2mb file). takes more time , throw time expired exception. know why exception. question is, can download big size of attachments? you should use getitem , not finditem . use finditem id och mail attachment, entire mail getitem . note finditem operation returns first 512 bytes (255 unicode characters) of property; therefore, message header collections longer 512 bytes truncated. you can modify code in great answer suit needs: exchange web services api : mail attachments

xml - XSLT 2.0 Compare sequence of attribute values to variable -

i have elements such as <elem attr1="value1 somevalue" attr2="value2 someothervalue"/> elements variable amount of attributes each have variable amount of values. some of these attributes' names , of values saved in variables beforehand , elements checked against these variables. i need check if element has attributes specified in variable (which got working) , if each attribute, @ least 1 of values 1 of values specified in variable. so if variable contains " value1 value2 " (or more values) the element <elem attr1="value1 somevalue" attr2="value1 someothervalue athirdvalue" attr3="value2 othervalue"/> meets requirements (provided attr1, attr2 , attr3 correct attribute names, check before), element: <elem attr1="value1 somevalue" attr2="anything someothervalue" attr3="value othervalue"/> doesn't meet requirements, because 1 of attributes has no v...

postgresql ERROR: missing FROM-clause entry for table in JAVA query execution -

i read same kind issue here, everywhere there problems query. i facing error error: missing from-clause entry table in query, executing if execute manually, not in java back-end code. this manual query, works when execute in dbms: insert goods (condo_id, item_title, item_descr, item_email, item_phone, item_price) values (3, 'title', 'bfdescr', 'grergeg@mail.com', '54654654654', '4545'); and statement in java: resultset rs = st.executequery("insert goods (condo_id, item_title, item_descr, item_email, item_phone, item_price) values\n" + "(item.condo_id, item.title, item.descr, item.email, item.phone, item.price);"); which doesn't work , on after execution got exception error. this item class. checked, in java back-end, values received , existed. public class item { public int condo_id; public string title; public string descr; public string phone; public string email; ...

android - onclick attribute in LinearLayour not working if containing ImageView -

i have linearlayout horizontally oriented, this: o text where "o" represents imagebutton , "some text" textview. added attribute linearlayout like: android:onclick="dosomething" this triggers if click anywhere on imagebutton. tried making imagebutton clickable specific attribute nothing changes. i'd user able click on inside layout fire "dosomething". my question is: should user can click on inside linearlayout fire "dosomething" ? everything works fine long user doesn't click on imagebutton, in case nothing happens. edit : imagebutton not imageview

Multiline regex match in PowerShell -

i'm trying extract block of lines text file, contains this: ... scountry = "usa" scity = "new york" sstate = "new york" ... scountry = "usa" scity = "los angeles" sstate = "california" where 3 lines repeat throughout text file; want extract lines of text, , put data fields csv, have like "usa","new york","new york" "usa","los angeles","california" ... so far have this: $inputpath = 'c:\folder\file.vbs' $outputfile = 'c:\folder\extracted_data.csv' $filecontent = [io.file]::readalltext($inputpath) $regex = '(?sm)(s[a-z][a-z]+ = "\w*"(\s*$)){3}' $filecontent = $filecontent | select-string $regex -allmatches | % {$_.matches} | % {$_.value} $filecontent = [regex]::replace($filecontent, 'scountry = ', '') $filecontent = [regex]::replace($filecontent, '(?sm)((^\s*)s[a-z][a-z]+ = )', ',') $f...

c# - SOAP Implementation in Forms Project -

i have wsdl shipping service hermes , want use c#. added wsdl project , can use functions within it. ( this wsdl link.) i allready tried no success: hermesweb.props prop; hermesweb.hermeslogin hermeslogin = new hermesweb.hermeslogin(); hermeslogin.benutzername = "***"; hermeslogin.kennwort = "***"; hermesweb.propsuserlogin login = new hermesweb.propsuserlogin(hermeslogin); prop = new hermesweb.propsclient(); prop.propsuserlogin(login); am doing wrong? must i'm newbie @ wsdl. when google tutorials xml , on. need xml? doesn't adding project convert xml c# functions , variables? the error is: fault occurred while processing. fault.exception´1

python - Error with matplotlib when running exmaples of scikit learn -

i learning python, , came across package called scikit learn can use python libraries , custom made codes generate various plots. have installed dependancies , have downloaded , installed scikit learn when trying run example codes getting error in generating plot. code from sklearn import datasets sklearn.cross_validation import cross_val_predict sklearn import linear_model import matplotlib.pyplot plt lr = linear_model.linearregression() boston = datasets.load_boston() y = boston.target # cross_val_predict returns array of same size `y` each entry # prediction obtained cross validated: predicted = cross_val_predict(lr, boston.data, y, cv=10) fig,ax = plt.subplots() ## error comes calling function plt.subplots() ax.scatter(y, predicted) ax.plot([y.min(), y.max()], [y.min(), y.max()], 'k--', lw=4) ax.set_xlabel('measured') ax.set_ylabel('predicted') fig.show() error fig,ax = plt.subplots() traceback (most recent call last): file "<stdin...

angularjs - How to force parent controller to reload data? -

i trying force parent controller reload data after update data in child controller. html : <div ng-controller='parentctr'> {{data}} <mydirective></mydirective> </div> the data in parentctr server calling service this: function parentctr(){ $scope.data=someservice.getdate(); } in mydirective: function childctr(){ // update data , save in same server. someservice.update(data); } what need after someservice.update() success, need parent level refresh data , show update info. you can way. emit message when call success , listen message in parent controller refresh state or page. function parentctr($scope,$state){ $scope.data=someservice.getdate(); $scope.$on('refreshparent', function(){ $state.reload(); //reload state }) } function childctr($scope){ // update data , save in ...

c# - dotMemory snapshot causes wpf to crash -

i'm using dotmemory investigate memory leak in wpf application. however, when try take snapshot, application crashes, , not apparent why. has else have similar experience , reason why might happen? could please submit request our support? can't ask logs or debug without it. thank much! http://dotnettools-support.jetbrains.com/anonymous_requests/new mikhail pilin - profiling core architect, senior software developer in jetbrains s.r.o.

html - How To Edit 'Main Content' Block in CS Cart` -

Image
first time asking question on here. before start - i'm not web dev, web designer or other kind of web pro. know i've taught myself , i'm kinda learning go along. please, if can, make easy poss me! in mind - lets continue. :d i want edit main content block on cs cart website on product pages. i want move add cart button further left can add info banner box @ side of product price etc. see below; look forward hearing suggestions! you can create own product data template: place file design/themes/your_theme_name/templates/addons/my_changes/blocks/product_templates/custom_layout.tpl copy contents of design/themes/your_theme_name/templates/blocks/product_templates/default_template.tpl file, , modify main layout on own. (my example needs changes add-on, please check if enabled in add-on manager)

node.js - Using socket.io modules in other JS files -

the following app.js configured socket.io functionality, things working expected ,but want use socket functionality js file same project, how achieve this? var app = require('express')(); var server = require('http').server(app); var io = require('socket.io')(server); server.listen(8080); app.get('/', function (req, res) { res.sendfile(__dirname + '/index.html'); }); io.on('connection', function (socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); }); just write var io = require('socket.io')(server); in each file want use socket.io module. if want create shared functionality, create module in app socket.io , ie.: var io = require('socket.io')(server); module.exports = function(options) { // code here } if not answer question, please more specific.

c++ - Android NDK: Multiple definition of .o and .c files -

i want implement library java , native code in app project in android studio. everytime when change c++ code, have recompile c++ files changes take effect in app. unfortunately ndk-build command not compile completely... everytime run command, compiles c++ files , when tries create .so-files lots of errors looking (just others classes). changes simple , did not add c++ include headers etc. /users/jenny/appproject/librarywithnativecode/src/main/obj/local/armeabi/objs/librarywithnativecode-mobile-example-app/src/worldpins/worldpinmessage.o: in function `_stlp_alloc_proxy': /users/jenny/ndk/android-ndk-r10e/sources/cxx-stl/stlport/stlport/stl/_string.c:647: multiple definition of `exampleapp::worldpins::worldpinmessage::focussedmodel() const' /users/jenny/appproject/librarywithnativecode/src/main/obj/local/armeabi/objs/librarywithnativecode-mobile-example-app/src/worldpins/worldpinmessage.o:/users/jenny/ndk/android-ndk-r10e/sources/cxx-stl/stlport/stlport/stl/_string.c:647...

visual studio 2013 - MSBuild Error: "The solution file has two projects named ..." -

i'm trying figure out how make msbuild work can set automated builds , appreciate weird error. i'm using visual studio 2013, , web application project. solution has 8 different class libraries. i've got several publish profiles set web project, i've been using these few months , work flawlessly. now i'm trying use msbuild execute 1 of publish profiles. command have @ moment: msbuild "c:\projects\od_cd_mis\release 6.10\source\nccdphpmis_web_build.sln" /p:deployonbuild=true /p:publishprofile="dev intranet" this fails following message: build started 6/10/2015 11:18:01. c:\projects\od_cd_mis\release 6.10\source\nccdphpmis_web_build.sln : solution file error msb5004: t solution file has 2 projects named "nccdphpmis_bll". build failed. c:\projects\od_cd_mis\release 6.10\source\nccdphpmis_web_build.sln : solution file error msb5004: solution file has 2 projects named "nccdphpmis_bll". 0 wa...

Regex PHP find 2 words same position -

i want apply regex find english month when search month string in spanish or other idiom. have array of possible matches: $monthsidioms = array( 'en' => array('jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'), 'es' => array( '/ene/', '/feb/', '/mar/', '/abr/', '/may/', '/jun/', '/jul/', '/ago/', '/sep/', '/oct/', '/nov/', '/dic/' )); but date variable can have format: $date = "24 ene 15:45"; or one: $date = "24 enero 15:45"; so need regex find ene or enero in date , other months: 'es' => array( '/ene|e...

java - javax.persistence.Persistence.getPersistenceUtil()Ljavax/persistence/PersistenceUtil -

in spring-mvc application try use validators. put annotation @notempty , @email on 1 of entity , when try validate error: java.lang.nosuchmethoderror: javax.persistence.persistence.getpersistenceutil()ljavax/persistence/persistenceutil; @ org.hibernate.validator.engine.resolver.jpatraversableresolver.isreachable(jpatraversableresolver.java:33) @ org.hibernate.validator.engine.resolver.defaulttraversableresolver.isreachable(defaulttraversableresolver.java:112) @ org.hibernate.validator.engine.resolver.singlethreadcachedtraversableresolver.isreachable(singlethreadcachedtraversableresolver.java:47) @ org.hibernate.validator.engine.validatorimpl.isvalidationrequired(validatorimpl.java:764) @ org.hibernate.validator.engine.validatorimpl.validateconstraint(validatorimpl.java:331) @ org.hibernate.validator.engine.validatorimpl.validateconstraintsforredefineddefaultgroup(validatorimpl.java:278) @ org.hibernate.validator.engine.validatorimpl.validateconstraints...

junit - Unit testing with Liferay 6.2 -

i using liferay-plugins-sdk-6.2, have created table "patients" , corresponding model , services using service builder. trying create junit test logic. i've looked lot of forum threads regarding this, 6.2 i've created following structure: (btw: using ant) -docroot -test -unit -src -integration -src and part gives me trouble... @test public void testvalidatepatient() throws systemexception { patient patient = new patientimpl(); ... } when run test (from ant test), following exception: java.lang.exceptionininitializererror patientmodelimpl.<clinit>(patientmodelimpl.java:92) validatorutiltest.testvalidatepatient(validatorutiltest.java:29) caused by: java.lang.nullpointerexception @ com.liferay.portal.kernel.configuration.configurationfactoryutil.getconfiguration(configurationfactoryutil.java:27) @ com.liferay.util.service.serviceprops.<init>(serviceprops.java:66) @ com.liferay.util.service.serviceprops....

node.js - How to enable CORS on express.js 4.x on all files? -

i keep receiving cross-origin request blocked: same origin policy disallows reading remote resource @ http://example.com:2013/socket.io/?eio=3&transport=polling&t=1433950808025-0 . (reason: cors request failed). while try access node.js. doesn't work me: app.use(function(req, res, next) { res.header("access-control-allow-origin", "*"); res.header("access-control-allow-headers", "origin, x-requested-with, content-type, accept"); next(); }); @edit: here updated full code: var express = require('express'); var http = require('http'); var expressvar = express(); expressvar.use(function (req, res, next) { res.setheader('access-control-allow-headers', 'accept, authorization, content-type, x-requested-with'); res.setheader('access-control-allow-methods', 'get,head,put,patch,post,delete'); res.setheader('access-control-allow-origin', req.header(...

html - Sliding up content is not working properly -

i newbie in html , css. trying make portion in webpage, want image , text slide side side. used html , css that. here link code in jsfiddle: sliding code /* chrome, safari, opera */ @-webkit-keyframes mymove { 0% { top: 0%; } 20% { top: -0%; } 25% { top: -20%; } 45% { top: -25%; } 50% { top: -45%; } 70% { top: -50%; } 75% { top: -70%; } 95% { top: -75%; } 100% { top: -100%; } } /* standard syntax */ @keyframes mymove { 0% { top: 0%; } 20% { top: -0%; } 25% { top: -20%; } 45% { top: -25%; } 50% { top: -45%; } 70% { top: -50%; } 75% { top: -70%; } 95% { top: -75%; } 100% { top: -100%; } } actually sliding images not showing text. need both. please check updated code. works fine. #image_slider_right { background-color: #ccff00; width: 50%; float: left; height: 250px; margin: 50px ...

javascript - My server request needs to be converted from Http to Https -

actually request in mobile application hit server url(http) not ssl secured. so, mbl application hit server url in secured way.. mean use of ssl protocols https. how convert http https..? on js-side, have remove hard-code http prefixes https. server, need buy ssl certificate , enable ssl running on port 443. https://security.stackexchange.com/a/65007

git has problems with squashing commits once there is "Merge branch" -

i trying squash commits – current git log looks this: https://gist.github.com/knyttl/a2f39cd9376301c78b07 notice "merge branch 'master'" – once shows in log, squashing rebase results in conflicts. git rebase -i zzzzzz what don't understand branch has conflicts resolved, every commit nicely in line, why should these problems emerge? [detached head yyyyy] typo 16 files changed, 192 insertions(+), 83 deletions(-) error: not apply xxxx... typo when have resolved problem run "git rebase --continue". if prefer skip patch, instead run "git rebase --skip". check out original branch , stop rebasing run "git rebase --abort". not apply xxxx... typo i want commits disappear , create 1 instead of of them. do still branch merge ? you can git reset --hard _hash-before-merge_ then git merge --squash your-branch git commit that should squash of commits 1 , merge.

First timer PHP edit to update html, some errors -

this first time using php in real project environment. project pretty simple, take existing, working php site , update html consistent html5. after designing html, inserting php previous site. works of time, few errors. instance: <? $sec = $_get['sec']; if ($sec == "1") { echo ('success!'); } ?> is causing error: notice: undefined index: sec in /file_that_holds_site_build. of course if url doesn't include append tag (=1) alerts message. so question this, missing causes $get when there no $sec ? how eliminate error on first page load? you're getting notice because you're trying access array index doesn't exist in scenarios. here's how should getting data out of request. $sec = array_key_exists('sec', $_get) ? $_get['sec'] : null;

ruby - Search for zero in 2D array and make a corresponding row and col 0 -

this code, works, it's big. want refactor it. req_row = -1 req_col = -1 a.each_with_index |row, index| row.each_with_index |col, i| if col == 0 req_row = index req_col = break end end end if req_col > -1 , req_row > -1 a.each_with_index |row,index| row.each_with_index |col, i| print (req_row == index or == req_col) ? 0 : col print " " end puts "\r" end end input: 2d array 1 2 3 4 5 6 7 8 9 10 0 11 12 13 14 15 required output: 1 2 0 4 5 6 0 8 0 0 0 0 12 13 0 15 i'm surprised matrix class not used more: a = [[ 1, 2, 3, 4], [ 5, 6, 7, 8], [ 9, 10, 0, 11], [12, 13, 14, 15]] require 'matrix' m = matrix.rows(a) #=> matrix[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 0, 11], [12, 13, 14, 15]] r, c = m.index(0) #=> [2, 2] matrix.build(m.row_count, m.column_count) {|i,j| (i==r || j==c) ? 0 : m[i,j]}.to_a #=...

javascript - Getting a div to show a different color when a js show and hide effect is in place -

i have checkout system have created. there 3 different parts checkout flow. of these parts in same page. parts are: shipping info billing info order confirmation basically whenever done shipping info select proceed billing info , shipping info section hides , billing info section shows. same order confirmation. at top of page regardless of section showing, have call section labels: <ul class="checkoutmenu"> <div class="checkoutbutton" id="button1labl">1. shipping information</div> <div class="checkoutbutton" id="btnbillinginfolabl">2. billing information</div> <div class="checkoutbutton" id="button3labl">3. order confirmation</div> </ul> what wanting happen is, in active section customer in, section label different color. so if in shipping info section, section label different color. i show , hide different sections this: $(".shi...

osx - netbsd installation on ibook g4, boot: load-size is too small -

i downloaded netbsd-6.1.5-macppc.iso , burned "disk utitlity" of mac (have german version, don't know extactly how tool called in english versions) cd-rom. on system, planning install os typed following in openfirmware console: boot cd:0 netbsd.macppc i hear sound of cd-drive, this: boot cd:0 netbsd.macppc disc-label: load (noninterposed) notsupported-loadsize=0 adler32=1 load-size small! some powerpc macs quite fussy bootloader, , seem recall there changes cause issues older macs. as test might worth trying netbsd-5 or netbsd-4 iso see if boots you

node.js - MongoDB : querying documents with two equal fields, $match and $eq -

what best way return documents in collection if want document.a == document.b? i've tried db.collection.aggregate([ { $match: { $eq: [ '$a', '$b' ] } }]) but returns no errors or results, because assume literally matching strings "$a" , "$b". there different way specify these fields? db.collection.aggregate([ { $project: { eq: { $cond: [ { $eq: [ '$a', '$b' ] }, 1, 0 ] } } }, { $match: { eq: 1 } }]) the above works, requires additional step of querying again whatever documents found or projecting possible fields. is there better way achieving query? basically, trying perform self join. operation not supported mongodb. concerning $eq operator, guessed: by design, $eq comparison query operator match field against value . but $eq comparison aggregation operator compare value of 2 expressions . i don't know other way perform need using $project step suggested. please note not sig...

python - Pulling date and time from Excel to Pandas and combining it to a timestamp -

final edit (hopefully): oh god solved it! after upgrading pandas 0.15.2, solution seems work: trades['oedatum'] = (trades[['oedatum', 'oeuhrzeit']].apply (lambda x: dt.datetime.combine (x['oedatum'].date(), x['oeuhrzeit']), axis=1)) thank @edchum , @joris i'm trying pull data excelsheet via read_excel pandas dataframe: asset oedatum oeuhrzeit odatum ouhrzeit l/s entrykurs \ trade 1 eurusd 2014-06-12 12:00:00 2014-06-12 12:23:09 l 1.2456 2 usdjpy 2014-11-11 10:15:35 2014-11-11 10:34:50 s 126.6300 3 eurjpy 2014-12-23 13:15:24 2014-12-23 13:25:45 l 114.4600 4 gbpjpy 2014-12-23 14:27:36 2014-12-23 14:35:56 s 156.6000 the values i'm interested in, have following data types: oedatum datetime64[ns] oeuhrzeit object odatum ...