Posts

Showing posts from July, 2013

maid - Move rule based on tags -

i have setup rule in hazel move files specific directories based on tags associated. switch these rules on maid instead. have example on how this? need if maid sees file specific tag runs script file them. script runs brett terpstra , called tagfiler.rb .

Java Garbage Collection Tuning - -XX:GCTimeLimit and -XX:GCHeapFreeLimit not working? -

in our gc logs, seeing sort of pattern extended periods of time (20+ minutes). here small snapshot of full gcs running during time: 2017-08-17t17:40:55.958-0500: 2263.468: [full gc [psyounggen: 200192k->200191k(272896k)] [paroldgen: 698843k->698835k(698880k)] 899035k->899026k(971776k) [pspermgen: 26732k->26732k(26880k)], 0.3358980 secs] [times: user=12.79 sys=0.03, real=0.33 secs] 2017-08-17t17:40:56.294-0500: 2263.805: [full gc [psyounggen: 200192k->200191k(272896k)] [paroldgen: 698835k->698835k(698880k)] 899027k->899027k(971776k) [pspermgen: 26732k->26732k(26880k)], 0.4146470 secs] [times: user=14.99 sys=0.04, real=0.42 secs] 2017-08-17t17:40:56.710-0500: 2264.220: [full gc [psyounggen: 200192k->200191k(272896k)] [paroldgen: 698835k->698835k(698880k)] 899027k->899027k(971776k) [pspermgen: 26732k->26732k(26880k)], 0.3549330 secs] [times: user=14.16 sys=0.03, real=0.35 secs] 2017-08-17t17:40:57.065-0500: 2264.576: [full gc [psyounggen: 2001

selenium webdriver - unexpected error launching internet explorer.IELaunchURL() returned HRESULT 80070005("Access is denied) -

Image
not able launch ie browser through selenium. using ie11 along selenium 2.46. please note cannot check/uncheck settings of enabled protected mode in company because of security reasons. please find code below: public static void main(string[] args) throws interruptedexception { webdriver driver=null; desiredcapabilities capabilities = desiredcapabilities.internetexplorer(); capabilities.setcapability(internetexplorerdriver.introduce_flakiness_by_ignoring_security_domains, true); capabilities.setcapability("ignorezoomsetting", true); system.setproperty("webdriver.ie.driver","c:\\selenium\\iedriverserver_x64_2.46.0\\iedriverserver.exe"); driver = new internetexplorerdriver(); driver.get("https://www.google.com/"); }

javascript - React - dynamic properties from strings -

in test suit, trying generate components props dynamically, end components so: <button primary /> <button secondary /> currently, bit stuck: [ 'primary', 'secondary' ].foreach((buttontype) => { it(`should render '${buttontype}' button`, () => { const button = mount(<button {...buttontype}>click me</button>); // incorrect - not work // rest of test omitted }); }); any appreciated. you should replace cardtype buttontype in function parameter given foreach. then, should use following inside test: const dynamicprops = { [buttontype]: true }; <button {...dynamicprops} /> some elements have been omitted idea. when pass prop without explicit definition, mean someprop={true} , in above case have use primary or whatever property of object, value of true .

javascript - Timeout and redirect on click -

i'm triying redirect page few seconds after submit. i'm using javascript , angularjs. i've found examples, didn't work. here's 1 of them: vm.redirecttime = "1000"; vm.redirecturl = "destination url"; function redirect (){ settimeout("location.href = vm.redirecturl;", vm.redirecttime); } can me example, please? the idea after submit show ng-show success message (wich working), , 5 or 6 seconds later, redirect page. thanx in advance.

objective c - unexpected late AppDelegate method call time on iOS 11 -

i have built , run app on different version of iphone 7. same code executed [appdelegate applicationdidbecomeactive] called delay on ios 11 devices. i did couple tests , method delay reproducible. on ios 10, time elapses between -[uiapplicationdelegate application: didfinishlaunchingwithoptions:] , -[uiapplicationdelegate applicationdidbecomeactive:] around 300ms while on ios 11 around 1300ms i hope know has been added app lifecycle in ios 11.

objective c - iOS Save file to non-private directory -

right working on project uploads files system , wondering if possible save nsdata location not private. when save data right cooresponding url looks this: file:///private/var/mobile/containers/data/application/.../image.jpg but when files uiimagepicker url looks this: file:///var/mobile/containers/data/application/.../image.jpg how can (if possible) save data directory not under private? just reference code have move files far: - (nsurl *)movefiletotemporarymemory:(nsurl *)url { nserror *readingerror, *writingerror; nsstring *filename = url.lastpathcomponent; nsurl *tempurl = [[nsurl fileurlwithpath:nstemporarydirectory()] urlbyappendingpathcomponent:filename]; nsdata *data = [nsdata datawithcontentsofurl:url options:nsdatareadingmappedifsafe error:&readingerror]; [data writetourl:tempurl options:nsdatawritingatomic error:&writingerror]; return tempurl; } there's no difference -- /var symbolic link /private/var , both paths equivalent.

regex - remove the last [blablabla] or (blabla) including [] and () with python -

this question has answer here: remove text between () , [] in python 4 answers how can remove text within parentheses regex? 8 answers i have string in form: sdp_123_cc[comments] i want remove square brackets , content inside of them end of string. output be: sdp_123_cc another example string: sdp_xx_yy(123)_zz(xxxxx) i want remove parenthesis , content inside of them end of string. output be: sdp_xx_yy(123)_zz basically, want remove last square brackets or parenthesis in string, , content in-between them. how can accomplish this? in case there digits or characters inside parenthesis or brackets use: >>> import re >>> s = 'sdp_xx_yy(123)_zz(xxxxx)' >>> re.sub(r'(?:\(\w*\)|\[\w*\])$', '', s) 'sd

How can I add kendo context menu in kendo editor -

i got kendo editor in 1 of page. need add context menu editor. there way this? both working fine individually. need find way can make them work together. both working fine individually. need find way can make them work together. <div class="row"> <div class="col-xs-11 col-sm-11 col-md-11 col-lg-11"> @(html.kendo().editor() .name("emailtexthtmleditor") .encode(false) .htmlattributes(new { style = "width: 100%; height: 400px;" }) .tools(tools => tools .clear() .bold().italic().underline().strikethrough() .justifyleft().justifycenter().justifyright().justifyfull() .createlink().unlink() .insertimage() .viewhtml() .formatting() .cleanformatting() .fontname() .fon

powershell - Extracting Binary Data from MSI -

Image
i'm trying extract binary data msi file using powershell. can other piece of data, can't seem extract binary information. $query = "select data binary name = 'bannrbmp'" $view = $database.gettype().invokemember("openview", "invokemethod", $null, $database, ($query)) $view.gettype().invokemember("execute", "invokemethod", $null, $view, $null) $record = $view.gettype().invokemember("fetch", "invokemethod", $null, $view, $null) $binarydata = $record.gettype().invokemember("stringdata", "getproperty", $null, $record, 1) it breaks on final line, leads me believe issue exists "stringdata", way off target. here table looks when opened in orca. this code complete when extracting textual data below. $query = "select component featurecomponents feature = 'orcahelp'" $view = $database.gettype().invokemember("openview", "invokemethod"

php - How to stop regex match if word is found? -

i have text this: text 786 opq rts appendix title text 123 abc efg appendix b text 456 hij klm and text 786 opq rts appendix title text 123 abc efg text 456 hij klm i'm trying use regex extract text starting appendix a appendix b if appendix b present otherwise appendix a until end (i.e., hij klm ). also, appendix a must appear within 15 words before title . i'm come far: (\b(?:appendix)(?:.){0,15}(?:title)(?:.*)(?:appendix){0,1})/is problem is, capture not stop @ appendix b if appendix b there, captures until end. one way use alternation optional part perl -0777 -wlne' @m = /(appendix .{0,15} title (?: .*?appendix\s\w+ | .*) )/xsig; @m ' input.txt with /g match sections within appendix markers. or capture multiple groups, 1 optional item, test , use accordingly perl -0777 -wne' @m = /(appendix .{0,15} title) (.*? appendix\s\w+)? (.*)/xsi; print join "", ($m[1] ? @m[0,1] : @m[0,2])

javascript - Moving image while scroll down and up on path -

Image
i design ball (images) on website when scrolling down or up, ball gonna stick on path while scrolling. screenshot: but don't know how stick ball on path. i tried if (s > 40 && s <= 60) { if(scrollposition == 0){ position += 2; } if(scrollposition == 1){ position -= 2; } } else if (s > 60 && s <= 80) { if(scrollposition == 0){ position -= 2; } if(scrollposition == 1){ position += 2; } but weird.. here code https://codepen.io/ookangzheng/pen/eeyqjj?editors=0011 thanks i have tried few way solve problem. first of all, think hard use s element in coding guide frequency of increase position because seen different every scrolling. my suggestion here . try use whole height , window height calculate percentage , use it. also, not going use point changing position beca

networking - Knife zero - SSH::Exception remote forwarding request failed -

i have been trying execute knife 0 bootstrap command on machine receive error. add on, can connect directly target server using ssh command. error: net::ssh::exceptionremote forwarding request failed error: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.2/lib/net/ssh/service/forward.rb:178:in `block in remote' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:505:in `call' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:505:in `request_failure' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:466:in `dispatch_incoming_packets' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:222:in `preprocess' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/server.rb:205:in `preprocess' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.

With Angularjs, $http post return response error in Microsoft Edge -

well, while develop admin page test, a weird problem occurred in microsoft edge. here's part of source code fetch response server of loginctrl.js $http({ method: 'post', url: define.apiurl + 'admin/login', data: { user_id: $scope.login_email, password: $scope.login_password } }) .then(function (response) { if (response.data.success) { $cookiestore.put(define.userinfo, response.data.info); $cookiestore.put(define.usertoken, response.data.token); } }, function (data) { console.log('errors!'); console.log(data); }); this works in chrome , ie but in microsoft edge, returns error below data = null status = -1 statustext = "" and below each status of related files. # loginctrl.js ## chrome response status accept

c++ - Arduino unable to match Char data -

i have arduino web server project going. right i'm trying parse url parameters. instance, wish make request http://(localip)/info , have "info" returned , displayed. i don't know if i've been staring @ screen long today, can't seem match simple char single space... shouldn't complex in slightest! advice i've found not work. yet, need break loop on space because indicator url parameter ends. want able use /info /something else. char *data = (char *) ethernet::buffer + pos; string buff; (int x = 5; x<15; x++) { serial.print(x); serial.print(" - |"); serial.print(data[x]); serial.println("|"); if ((data[x] == " ") || (data[x] == char(" ")) || (strcmp(data[x], " ") == 0)) { x = 999; break; } else { buff += data[x]; } delay(5); } serial monitor output. should break on #9 , buff should equal "info" 5 - |i| 6 - |n| 7 - |f| 8 - |o| 9 - | | 10 - |h| 11 - |t|

java - Crypto Miner using - Stratum Mining Protocol -

i newbie , trying write crypto miner in java .. using stratum protocol .. below java code .. not sure how mining job notification? 1) connected pool using - mining.subscribe 2) , requested mining authorization - mining.authorize then how notify response - can please help. stratum protocol says *"server start sending notifications mining jobs server sends 1 job almost instantly after subscription. small engineering note: there's reason why first job not included directly in subscription response - miner need handle 1 response type in 2 different way; firstly subscription response , standalone notification. hook job processing json-rpc notification sounds bit better me."* static boolean connect2pool(string server, int port) { string message1 = "{\"id\":1,\"method\":\"mining.subscribe\",\"params\":[]}"; string authorizemessage = "{\"params\": [\"" + username + "." + wo

ios - Programmatically using constraints on a button that is also programmatically made -

Image
i'm trying facebook login button (top center of screenshot) below "register or login button" using constraints, i'm not sure constraints use , how use them. i'm quite new swift 3 , have not done constraint programmatically yet, welcomed! used x , y position in cgrect place button, noticed on different device, button not in same place, i'm trying use constraints now. it looks this: this code regarding button in viewdidload: let fbloginbutton = fbsdkloginbutton() view.addsubview(fbloginbutton) fbloginbutton.frame = cgrect(x: 0, y: 0, width: view.frame.width - 100, height: 40) self.view.addsubview(fbloginbutton) fbloginbutton.center.x = view.frame.width/2 i tried doing: let verticalspace = nslayoutconstraint( item: self, attribute: .bottom, relatedby: .equal, toitem: fbloginbutton, attribute: .bottom, multiplier: 0.75, constant: 0) but led me error: constraint items must each instance of uiview, or uilayoutguide.

apache - .htaccess - How to redirect from private folder to public folder without https authorization -

i'm finding way redirect user https://.. http://.. tried using .htaccess redirect, however, https:// requires authorized users access (by providing login). so, site redirecting properly, after logged in. but want redirect https://.. http://.. without user having login https://. project structure:  > root   > private     > html     > ...   > public     > html     > ...

wordpress - Multiple taxonomy and child -

i have project use wordpress. use taxonomy , have problem this: my site music , there 4 type: singer, author, album , category. details in article (which defines song details). article belong category (1 or more), article of singer (who sing song), article of author (who write song) , belong album. category ok, i can post new post , set taxonomy singer, author, album , category now. can list article of singer, , can list article of album, author, category. now, want show album of singer in list of article of singer. please me? here code: function msc_register_taxonomies() { $taxonomies = array( array( 'slug' => 'ns', 'single_name' => 'author', 'plural_name' => 'authors', 'post_type' => 'msc', 'rewrite' => array( 'slug' => 'ns' ), ), array( 'slug' => 'singer'

Why use "where 1=2" on a SQL CREATE TABLE syntax? -

create table empl_demo select * employees 1=2; i read statement somewhere on internet couldn't understand where 1=2 . will please, explain this? this type of command used copy structure of 1 table another. in case, empl_demo have same column structure of employees , except keys or constraints . the 1=2 evaluates false prevents copying of rows.

Querying XML Data in SQL Server -

in 1 of table column (nvarchar), data stored in xml format. in example, data looks : <datatype id="76" name="disp_dest" hdl="47/4/sb8_3-910-8243-19/0/76" odobjid="385"> <datatypevalue id="1" name="lowpressurerinse" /> <datatypevalue id="0" name="shortinlet" /> </datatype> i checked few sql server function, need define namespace in order extract values out. formatted can know field retrieve. <datatype id="76" name="disp_dest" hdl="47/4/sb8_3-910-8243-19/0/76" odobjid="385"> <datatypevalue id="1" name="lowpressurerinse" /> <datatypevalue id="0" name="shortinlet" /> </datatype> the expected output be disp_dest, lowpressurerinse disp_dest, shortinlet do think achievable using sql server xml related functions ? thanks. here 1 way using valu

Null check before assigning value in property Linq lambda expression c# -

casedto.extendedproperties = new dictionary<string, string>(); foreach (var eelement in zakkennisgeving.extraelementen.tolist()) { if (eelement.value != null) casedto.extendedproperties.add(eelement.naam.tostring(), eelement.value.tostring()); } how do lambda expression? i've tried this zakkennisgeving.extraelementen.tolist().where(x => x.value != null && casedto.extendedproperties.add(x.naam.tostring(), x.value.tostring()))); but dictionary.add() doesn't return it's not valid statement. you can chaining ienumerable.where , ienumerable.todictionary extension methods casedto.extendedproperties = zakkennisgeving.extraelementen .where(element => element.value != null) .todictionary(element => element.naam.tostring(), element => element.value.tostring());

ios - Localized app crashes only on non-base language and only when not running with Xcode -

our ios (swift) app has english base language, , localized have spanish well. english works charm, in spanish devices, app crashes within seconds of opening when not running along xcode. given happens when xcode isn't running it's been hard debug - idea causing this?

javascript - Handle Query string in routeprovider or any other solution (Help me plz) -

how handle query string (index.php?comment=hello) in routeprovider while configuration in angularjs. example: angular.module('app', ['ngroute']) .config(function($routeprovider, $locationprovider) { $locationprovider.html5mode({ enabled: true, requirebase: false }).hashprefix('!'); $routeprovider .when('/index.php?comment=hello',{ redirectto:'/index.php' }); you can this: your url like: http://www.heycodetech.com/#/viewpage/param1/param2 here router file have code: $stateprovider.state('/viewpage/:param1/:param2', { templateurl: 'partials/partial1.html', controller: 'myctrl' }); and here code of controller can value. .controller('myctrl', ['$scope','$routeparams', function($scope,$stateparams, $state) { var param1 = $state.param1; var param1 = $state.param2; }]); for more here .

Reading Excel file in Google Cloud Dataflow from file stored in GCS -

currently google cloud dataflow not support reading excel file google cloud storage. for work around, tried below things, i trying use app engine tools read excel file , used apache poi , trying convert excel file csv file. below code sample used, gcsservice gcsservice = gcsservicefactory.creategcsservice(); gcsfilename filename = new gcsfilename("testbucket", "test1.xlsx"); gcsinputchannel readchannel = gcsservice.openprefetchingreadchannel(filename, 0, buffer_size); inputstream inputstream = channels.newinputstream(readchannel); and added apache poi read inputstream xssfworkbook workbook = new xssfworkbook(inputstream); xssfworkbook workbook = new xssfworkbook(new fileinputstream(inputfile)); xssfsheet sheet = workbook.getsheetat(0); but received below error, aug 17, 2017 6:58:35 pm com.google.appengine.tools.cloudstorage.prefetchinggcsinputchannelimpl waitforfetch warning: prefetchinggcsinputchannelimpl [filename=gcsfilename(testbucket, test1

jquery - Javascript function not found on certain environments having slow connectivity -

following exact scenario in mvc application: there 1 page (cshtml) having grid. within each row of grid, have button. clicking on button suppose open popup (which partial view). partial view contains kendo grid, in order apply common behavior kendo grids in our application, have created 1 javascript library (customgrid.js) bundled inside "~/javascript/customgrid" bundle. bundle rendering code placed @ top of partial view: @scripts.render("~/javascript/customgrid") within partial view, creating kendo grid columns , all. following javascript written @ bottom of page in order apply common behavior grid. <script type="text/javascript" language="javascript"> $(document).ready(function () { //bind plugin var objgrid = $('#historytrackgriddiv').setupgrid({ loaddefaultview: false, allowpaging: true, allowviews: false, allowcolumnhideshow: false, a

c# - SMO to Azure SQL using multiple threads -

i have multithreaded service, uses smo read table , column names , may alter database. looking azure , proceeded try code there. has been working sql server long time. in azure sql, when using 1 thread, works fine. when 2nd thread starts reading while 1st thread still executing, exception thrown: system.invalidoperationexception: there open datareader associated command must closed first. @ system.data.sqlclient.sqlinternalconnectiontds.validateconnectionforexecute(sqlcommand command) @ system.data.sqlclient.sqlcommand.validatecommand(string method, boolean async) @ system.data.sqlclient.sqlcommand.runexecutereader(commandbehavior cmdbehavior, runbehavior runbehavior, boolean returnstream, string method, taskcompletionsource`1 completion, int32 timeout, task& task, boolean& usedcache, boolean asyncwrite, boolean inretry) @ system.data.sqlclient.sqlcommand.runexecutereader(commandbehavior cmdbehavior, runbehavior runbehavior, boolean returnstream, string met

node.js - How to setup SSL for instance inside the ELB and communicating with a node instance outside the ELB -

i have create architecture on aws (hope should not wrong) using elb, autoscaling, rds , 1 node ec2 instance outside elb. not getting, that, how can implement ssl on architecture. let me explain in brief: i have created 1 classic load balancer. created on autoscaling group. assign instances autoscaling group. and lastly have created 1 instance using node , outside load balancer , autoscaling group. now when have implemented ssl load balancer, inner instances communicating node instance on http request , because node instance outside load balancer request getting blocked. can please me implement ssl architecture. sorry if got confused architecture, if there other best architecture possible please let me know can change architecture. thanks, when have static content, best bet serve cloudfront using s3 bucket origin. about ssl , set ssl @ elb level, follow the documentation . your elb listens on 2 ports: 80 , 443 , communicates asg instances using o

LXC Container, no Internet access -

i'm setting lxc container on opensuse 42.1 host. the host has full internet access container hasn't. container can ping host, nothing else on lan or internet. i think issue how bridge configured on host, can't see how resolve this. the host has eth0 , br0. br0 has been assigned static ip address etc. in yast have default ipv4 gateway 192.168.2.1 , device br0 here network detail host route kernel ip routing table destination gateway genmask flags metric ref use iface default gateway.localdo 0.0.0.0 ug 0 0 0 br0 192.168.2.0 * 255.255.255.0 u 0 0 0 br0 netstat -rn kernel ip routing table destination gateway genmask flags mss window irtt iface 0.0.0.0 192.168.2.1 0.0.0.0 ug 0 0 0 br0 192.168.2.0 0.0.0.0 255.255.255.0 u 0 0 0 br0 ifconfig -a br0 link encap:ethernet hwaddr 08:00:27

java - Copy/Clone Response object -

i tried copy response object of jax-ws. the client tries download pdf file request forwarded kind of proxy. proxy calls target server uses rest well. server returns pdf file, mediatype "application/pdf" , entity body. point of view best way forward message. following solution not work. see pdf if requested not forwarded client. @get @path("invoices/{invoiceid}") public response forwardinvoice(@pathparam("invoiceid") long invoiceid) { return service.connect().downloadinvoice(invoiceid); } this solution work 200 ok + body not 404 not found. @get @path("invoices/{invoiceid}") public response forwardinvoice(@pathparam("invoiceid") long invoiceid) { final response response = service.connect().downloadinvoice(invoiceid); return response.status(response.getstatus()).type(response.getmediatype()).entity(readentity(response)).build(); } the method readentity changes input stream byte array. i didn't want add log

javascript - jQuery save clicked state after refresh -

this question has answer here: jquery $.cookie not function 5 answers i created function change view. add new classes if option clicked. want save state of clicked option , after refresh of page should display option clicked before refresh. implemented jquery option $.cookie looks doesn't work. have error "$.cookie not function" var gridofthree = $('.mh-1on3--grid').on('click', function () { $('.mh-1on3--grid').addclass('mh-filters__right__button--active'); $('.mh-1on2--grid').removeclass('mh-filters__right__button--active'); $('.mh-1on1--grid').removeclass('mh-filters__right__button--active'); $('.mh-margin-bottom-small').removeclass('mh-grid__1of2'); $('.mh-margin-bottom-small').removeclass('mh-grid__1of1'); $('.mh-margin-bo

javascript - Vue Bootstrap Calendar in Laravel -

does know how integrate vue bootstrap calendar in laravel 5.4 ? after installing it, i'm trying on assets/js/app.js: window.vue = require('vue'); vue.component('calendar', require('vue-bootstrap-calendar')); but when run num run dev , error: module build failed: error: couldn't find preset "latest" relative directory "../node_modules/vue-bootstrap-calendar" i tried with: require( 'vue-i18n' ); require( 'vue-i18n' ); window.vue = require('vue'); window.i18n = new vuei18n({ locale: 'en', messages }); vue.component('calendar', require('vue-bootstrap-calendar')); but still same error..

php - Receiving "ATT00001.txt" instead of pdf with the mail function -

i tried send mail attachement mail function, found tutorial jpg , tried modify sending pdf, attachement receive att00001.txt . here programm: <?php // $to = 'mail@test.com'; // subject $subject = 'test pdf'; // random boundary $boundary = md5(uniqid(microtime(), true)); // headers $headers = 'from: test <mail@test.com>'."\r\n"; $headers .= 'mime-version: 1.0'."\r\n"; $headers .= 'content-type: multipart/mixed;boundary='.$boundary."\r\n"; $headers .= "\r\n"; // message $msg = 'this multipart/mixed message.'."\r\n\r\n"; // text $msg .= '--'.$boundary."\r\n"; $msg .= 'content-type:text/plain;charset=utf-8'."\r\n"; $msg .= 'content-transfer-encoding:8bit'."\r\n"; $msg .= 'un message avec une pièce jointe.'."\r\n"; // attachement $file_name = 'test.pdf'; if (file_exists($file_name)) { $fil

html - All images resize except for one -

i building website myself sort of cv. things going pretty well, though have 1 problem. in css targeted images in jumbotron, still, 1 of images won't resize when make browser smaller, rest does. have no idea why after searching , trying, thought maybe guys me out here. what resize icon's social media , contact. doesn't resize, catcolor.img (yeah it's picture of me holding cat in azores, cute , that). .jumbotron { /*background: url('image.jpg') no-repeat center center; background-size: cover;*/ height: 400px; background-color: transparent; margin-left: 7%; margin-right: 7%; } .jumbotron img { display: block; margin-left: auto; margin-right: auto; border-radius: 10px; border: 4px solid white; max-width: 100%; height: auto; } .jumbotron h1, p { color: black; } .jumbotron p { font-size: 18px; margin-top: 40px; } #nopadding { padding-left: 0px; } .btn-default { text-decora

java - ConnectSDK doesn't try to find Chromecast -

all. try create android cast application google chromecast. tryied find chromecast code: public void startdiscoveringdevices() { discoverymanager.init(mcontext); mdiscoverymanager = discoverymanager.getinstance(); mdiscoverymanager.registerdeviceservice(castservice.class, castdiscoveryprovider.class); mdiscoverymanager.setpairinglevel(discoverymanager.pairinglevel.on); mdiscoverymanager.setcapabilityfilters(new capabilityfilter( mediaplayer.any, mediacontrol.any, volumecontrol.any )); mdiscoverymanager.addlistener(this); mdiscoverymanager.start(); log.wtf("castdevicemanager", "discovery manager started"); } after listen discoverymanagerlistener: // ********************* discoverymanagerlistener ********************************** // @override public void ondeviceadded(discoverymanager manager, connectabledevice device) { log.wtf("discoverymanagerlistener", "device add

java - Filling Hashmap without using put too much -

for context: need fill hashmap values corresponding input user gives. 1-20 in height , t in length. user can specifiy these input. my question is, how go around filling hashmap values without repeating below 400 times? hashmap.put(k key, v value) the hashmap looks hashmap<string, square> square being a(empty now) class. why not use loop e.g. for(int i=1; i<=400; i++){ //code insert key , value //insert hashmap hashmap.put(k key, v value); }

java - intent in alart dialog -

intent in alart dialog how pass in next intent alertdialogbuilder .setcancelable(false) .setpositivebutton("ok", new dialoginterface.onclicklistener() { public void onclick(dialoginterface dialog, int id) { string title = edittexttitle.gettext().tostring().trim(); string r=android.get(i).getpassword(); if(title.equals(r)){ view.getcontext().startactivity(new intent(activity,detailview.class)); toast.maketext(view.getcontext()," user name " , toast.length_long).show(); } else { toast.maketext(view.getcontext()," user name not valid &qu

excel - Find value upwards using reverse index+match -

Image
i have find first zero(cell c3) upward in column c cell d7,d12 , d15 how find first 0 value upwards in c column. there way reverse hlookup, index+match. please advise. =lookup(2,1/($c$2:c2=0),$b$2:b2)

javascript - Create CDA document with data available -

i working on health care application has user's health care data. need export data cda document using rails or javascript cda xml. use favourite library (jaxb should available via groovy/java) feed data (from db?) cda. cda schemas , try generate classes need. approach: use templating engine (velocity or like). start sample cda , there try understand intricacies of cda.

php - Page break in long dtynamic table in tcpdf -

Image
i using tcpdf create pdf.i have long dynamic table.this portion of page break.at end of page 1 the row showing without bottom border , rest of showing in next page.i had repeat header used thead tag.how can make more neat?

create dynamic table in powerpoint using openXML with c# and ASP.net -

Image
i have used these links , got working code can use template report(containing placeolders) , generate new pptx report data database. have 4 more placeholders need populate 4 different data tables. using template create new slide , replacing placeholder text tables couldn't figure out. able generate table using below code not in placeholder's location. table appear in center of screen. links used: https://blogs.msdn.microsoft.com/brian_jones/2008/11/18/creating-a-presentation-report-based-on-data/ https://code.msdn.microsoft.com/office/how-to-add-a-table-with-03578dde call button click event: using (presentationdocument presentationdocument = presentationdocument.open(slidename, true)) { //get first slide presentation slidepart intitalslide = presentationdocument.presentationpart.slideparts.first(); addnewslide(presentationdocument, intitalslide, 1045); } private void addnewslide(present