Posts

Showing posts from June, 2010

c# - How to improve selection descendant speed in sitecore? -

i need select children (descendants) items filtered template id, under specific item. can in 3 way: use getdescendants myitem.axes.getdescendants().where(x => x.isoftemplate(myitem.templateid)).select(x => (myitem)x).tolist(); use xpath string q = string.format("{0}//*[@@templateid='{1}']", myitem.paths.path, myitem.templateid); var result = myitem.database.selectitems(q); use sitecore search api i can't use #3 case. let skip case. xpath selector #2 should work faster #1, problem in first call path. by reason first call content tree specific path slow. after first call similar calls works fast, doesn't matter witch style use #1 or #2. sitecore add cache. how improve speed first call ? though there many ways retrieve items (using link databse mark cassidy has suggested, using siteocre search api etc.) issue cache. if query runs quick enough second time around first time it's part of cache being emptied , refil

android - How handle exception while copying files from phone to pc in C#? -

i'm trying copy files connected android device pc. public void copyfiles(folder srcfolder, folder folderimages, folder folderdatabase) { imagefilecounter = 0; sqllitecounter = 0; foreach (folderitem currfolderitem in srcfolder.items()) { if (currfolderitem.isfolder) continue; if (currfolderitem.type.equals("jpg file") || currfolderitem.type.equals("png file")) { folderimages.copyhere(currfolderitem, 4 | 16); imagefilecounter++; } else if (currfolderitem.type.equals("data base file")) { folderdatabase.movehere(currfolderitem, 4 | 16); sqllitecounter++; } } } and want handle copy error when device disconnect while copying files. can know how can that? i found solution. there no way information folder.copyhere() or folder.movehere() final re

machine learning - Training Error -- what's the point? -

what's overall point of training error in goal of regression (i.e, making predictions)? you might like, "well, see, training error can determine model of complexity best use. " and that, say, "no can't. low training error mean model conforming whatever data you're training model with, a.k.a overfitting" what's point of calculating training error if it's not predictive measure of performance? especially when go through , say, hell training error, use validation error.. when ever use training error? low training error can indicative of overfitting.. use of it? training error can bad metric of model performance, have correctly pointed out. however, there no going around fact need train model make meaningful predictions. that why need training, validation , test phases , data sets. overfitting can happen in training dataset can alleviated extent using randomly sub-sampled validation dataset because if have overfitted, mode

numpy - how to calculate np.nanmean of 2d array -

i have dictionary containing 2d arrays. tried calculate mean way not work because, arrays contains nan values also. there simpler ways calculate mean? all = np.zeros(385000).reshape(550,700) in dic.keys(): = dic[i]['data'] avg = (all+a)/len(dic.keys()) it seems trying finding mean considering elementwise across both inputs a , b , ignoring nans . so, 1 way stack 2 arrays np.dstack , stack a , b along third axis , use np.nanmean along same axis. thus, have simple implementation - np.nanmean(np.dstack((a,b)),axis=2) sample run - in [28]: out[28]: array([[ 2., nan], [ 5., 4.]]) in [29]: b out[29]: array([[ nan, 3.], [ 7., 2.]]) in [30]: np.nanmean(np.dstack((a,b)),axis=2) out[30]: array([[ 2., 3.], [ 6., 3.]]) for case when getting 2d arrays dictionary shown in posted code of question, can use loop-comprehension gather arrays 3d array np.dstack , use np.nanmean along last axis, - np.nanmean(np.dstac

.net - Call report from C# class file -

how can call existing crystal report c# class file? my method in class file has parameter string callcrystal(string num) . report in located in d:/reports/employedetails/ displays employee detail passing in string input. the method should send string parameter (num) , call report crystal report. you need crystalreportviewer control. has reportsource property which, inter alia, can set path of existing report, case. in order add parameters, in addition need use parameterfieldinfo member collection of parameterfields. set follows: parameterfields paramflds = new parameterfields(); parameterfield param = new parameterfield(); parameterdiscretevalue paramval = new parameterdiscretevalue(); param.name = "myname"; paramval.value = myvalue; param.currentvalues.add(paramval); paramflds.add(param); i use single "host" form containing 1 control, crystalreportviewer. view report, create instance of form, passing in whatever parameters need (at least para

Publish ASP.NET Core to Azure fails unexpectedly -

i have project based on asp.net core 1.0. can build , run locally without problems, if try publish project azure using publish mechanism in visual studio 2015 (even if try publish locally folder in file system or using ftp) fails unexpectedly without giving me concrete message. if run preview log: "publish" task failed unexpectedly. system.exception: publishing project.web .netframework,version=v4.5.2/win7-x64 @ microsoft.dotnet.tasks.publish.execute() @ microsoft.build.backend.taskexecutionhost.microsoft.build.backend.itaskexecutionhost.execute() @ microsoft.build.backend.taskbuilder.<executeinstantiatedtask>d__26.movenext() if try publish ignoring error or if not try preview this: 1>------ publish started: project: kunato.web, configuration: debug cpu ------ rmdir /s /q "c:\users\thimo\appdata\local\temp\publishtemp\kunato.web54\" environment variables: dotnet_configure_azure=1 path=.\node_modules\.bin;c:\program files (x8

string - Converting QString to utf16 hex representation for non ascii characters -

i going convert qstring hex representation, works fine, until put special characters '€': qstring l_str = "how you"; qdebug() << "hex: " << l_str.toutf8().tohex(); qdebug() << "readable:" << l_str.toutf8(); prints out: hex: "486f772061726520796f753f" readable: "how you?" and easy convert hex values ascii, being 2 values (48 = h etc.) hex representation of ascii char enough iterate , convert every 2 chars. if set l_str = "h€w ar€ you?", , hex € sign in utf8 "e282ac" 6 values, result following: hex: "48 e282ac 77206172e282ac20796f753f" but how can readable string? it better having conversion results in utf16 string: hex: "0048006f20ac00200061007220ac00200079006f0075003f" consider "ho€ ar€ you" string created @ runtime (so no qstringliteral available), , cannot use auto keyword. you can conve

android instrumentation - TestSuiteInstrumentation in Xamarin : Exception of type 'Java.Lang.RuntimeException' was thrown -

i executing android unit tests on emulator using test instrumentation. have used testsuiteinstrumentation class xamarin. getting below error: error : java.lang.nullpointerexception: attempt invoke virtual method 'android.content.res.resources android.content.context.getresources()' on null object reference can me resolve this.?

c++ - -Wundef is not being ignored with pragma in g++ -

given following code: #if macro_without_a_value int var; #endif int main(){} when compiled with, g++ -std=c++1z -wundef -o main main.cpp , produces following warning: main.cpp:1:5: warning: "macro_without_a_value" not defined [-wundef] #if macro_without_a_value ^ i'd keep warning flag enabled, suppress particular instance. apply following: #ifdef __gnuc__ #pragma gcc diagnostic ignored "-wundef" #pragma gcc diagnostic push #endif #if macro_without_a_value int var; #endif #ifdef __gnuc__ #pragma gcc diagnostic pop #endif int main(){} this solves problem in clang++ . the command clang++ -std=c++1z -wundef -o main main.cpp builds without warnings. command g++ -std=c++1z -wundef -o main main.cpp builds same [-wundef] warning before. how can suppress -wundef warnings in g++ ? g++ (ubuntu 5.1.0-0ubuntu11~14.04.1) 5.1.0 clang version 3.8.0 what i've done before when third party headers inducing warnings wrap them

asp.net - Excel is not able to access from C# -

this regarding excel issue facing in production. have asp.net application reading excel shared drive. having issues dcom configuration , security settings on our server preventing complete process. we running process service account defined in dcom identity tab. we have full permission shared drive service account application reading file. still getting error below. (error message : microsoft cannot access file: there several possible reasons: file name or path not exist, file being used program, workbook trying save has same name open workbook ) we have full permission service account on excel location . application run different users cannot change dcom setting ‘interactive user’. business wants application run using on service account. if change ‘interactive user’ working expected , excel opening without issue. service account added com property settings. i created desktop folder under windows\system32\config\systemprofile\desktop , windows\syswow64\config\systemprofi

swift2 - Sticky scroll from cached images in Swift 2 -

i using code display image inside uicollectionview lets cells 25. when go down last cell , try go first images loading again (from cache still shows loading indicator. phone iphone se , dont have many apps , phone running perfect. if load app older iphone many data on scrolling becomes sticky , annoying. how can avoid happening inside collections view function cell item @ index path ??? let cell = collectionview.dequeuereusablecellwithreuseidentifier("recipescell", forindexpath: indexpath) as! recipescell // cover image let mycache = imagecache(name: recipesclass.objectid!) let queue = dispatch_get_global_queue(dispatch_queue_priority_default, 0) let optioninfo: kingfisheroptionsinfo = [ .downloadpriority(0.5), .callbackdispatchqueue(queue), .transition(imagetransition.fade(1)), .targetcache(mycache) ] if let imagefile = recipesclass[recipes_cover] as? pffile { let url

javascript - Problems while displaying nvd3 pieChart in a pop up window? -

Image
i opening nvd3 piechart in popup window. create popup window this: function openpopup(html,pos,style) { var newwindow = window.open(''); newwindow.document.write(html); return newwindow; } function openchartpopup(chartid,charttitle) { divid = "div" + chartid; html = "<p>"+charttitle+"</p><div id= \""+divid+"\"><svg id=\""+chartid+"\"></svg></div>"; newwindow = openpopup(html,"_blank",""); return d3.select(newwindow.document.getelementbyid(chartid)); } then create piechart using following code: de_select = openchartpopup("test_chart","test chart"); var chart = nv.models.piechart() .x(function(d) { return d.label }) .y(function(d) { return d.value }) .showlabels(true) .growonhover(true); de_select.datum(exampledata()); de_select.style({"width":"40

javascript - Why can't I use ' instead of " for JSON string? -

Image
i have basic json string, surprise got error : json unexpected token @ position 1 https://jsfiddle.net/5l2sgr57/ var jsonstring = "{'name': 'john'}"; json.parse(jsonstring); it works if switch ' " reason need since in javascript string ' , " supposedly equivalent ? switch single , double quotation marks var jsonstring = '{"name": "john"}'; json.parse(jsonstring); json not equal javascript json text format language independent uses conventions familiar programmers of c-family of languages, including c, c++, c#, java, javascript, perl, python, , many others. these properties make json ideal data-interchange language. (www.json.org) you can verify allowed json syntax here in syntax-definition string, can see ' is not allowed.

javascript - React - passing props to a component recieved in props -

i'm using react , faced problem. i have component needs accept component prop, , pass same component other props. example: export default class item extends react.component { render() { return (<div onclick={this.props.onclick}>some content.</div>) } } item.proptypes = { onclick: proptypes.func.isrequired } export default class container extends react.component { onclick() { // something. } render() { // render here item , passing onclick method. } } container.proptypes = { item: proptypes.element.isrequired } edit: can use es5 syntax , this: react.createelement(item, { onclick: this.onclick }); but how can achieve in es6? this need do, if need pass props, can use spread operator too. export default class item extends react.component { render() { return ( <div onclick={this.props.handleclick}>some content.> </div> ) } } item.proptypes = { o

sql - show rows with no data in access -

i have following query: select persontotalhours.ma, persontotalhours.year, persontotalhours.calendarweek, persontotalhours.hours, person.name, person.lastname persontotalhours inner join person on persontotalhours.ma = person.ma; which results in following table: ma year calendarweek hours name lastname aa 2000 5 53 aa aa aa 2000 44 175 aa aa ... ... ... ... aa 2001 4 226 aa aa aa 2001 12 87 aa aa ... ... ... ... bb 2000 1 189 bb bb bb 2000 35 65 bb bb ... ... ... ... as can see, there no data calendar weeks. there way can have row calendar weeks(1 53) , hours=0 ones don't exist now? edit have solve temporarily adding missing row table. using function called

Retrieving email over SSL in Foxpro -

i'm trying retrieve emails pop box on ssl, using foxpro. have examples of code using openssl, or have other recommendations how it? i've done own research not found great answers. there's example visual foxpro pop retrieval class here uses windows sockets library , ssl/tls. requires chilkat mail activex control though.

How to replace rails 3 Model.scoped by rails 4 Model.all -

i converting project rails 3 4.2. found scoped deprecated. me scoped confusing. current code in index controller below @customers = customer.scoped @customers = customer.between(params['start'], params['end']) if (params['start'] && params['end']) so how can remove customer.scoped above code still keep same functionality?? as other articles suggested use all instead of scoped . tried this @customers = customer.all @customers = @customers.between(params['start'], params['end']) if (params['start'] && params['end']) i not sure though if converted code okay or not. have tried this @customers = customer.where(nil) instead of @customers = customer.scoped refer https://github.com/lassebunk/dynamic_sitemaps/pull/35

regex - Find strings between << and >> that contain backslashes -

i working in rtf file have insert tags in custom markup language program replaces data. example, in file, have: account number: <<@account.accountnumber>> i editing template in microsoft word 2007 , whenever backspace, microsoft word inserts bunch of rtf garbage in template this: <<@am\hich\af1\dbch\af31505\loch\f1 ount>> instead of: <<@amount>> how find wherever happened? tried writing regular expressions this, don't know how write them well. here's 1 tried: <<.+?\\.+?>> but when pass in phrase: <<where: phrase =\ @value>>\<<hi>>\hi<<hi>> the backslash after "=" should matched, neither backslash between "<<where>>" , "<<hi>>" tags nor "\hi" between "<<hi>>" tags should matched (regex101.com , notepad++ matches them). i not care if backslashes matched or entire tags backslashes in

jquery - What code snippet should i add in my click functiionality code in that when i hover over the message, it sticks there? -

how can make " tick " stick there whenever message viewed in chat inbox show message has been viewed? by when message hovered confirmation tick appears on each message disappears type in textarea new message? /** * clickfunctionality.js */ $(document).ready(function() { $.fn.notify = function(options) { var defaults = { type: 'neutral', message: 'this notification' }; var options = jquery.extend(defaults, options); var notification = '<div class="notify ' + options.type + '">' + options.message + '</div>'; if ($('.notify').size() > 0) { $('.notify').remove(); } $('.channel_post_date').after(notification); } $("body").trigger(); $(this).notify({type:'position', message: '<i><img src="js3/t5.png style="padding-left:7px;padding-bottom:1px;"></i>'}); }); <div

c# - EF Relationship (1 to 0..1) won't be removed -

i have code first model in entity framework version 6.1.1 looks this: public class tinman { public int id { get; set; } public virtual heart heart { get; set; } } public class heart { public int id { get; set; } } this represented in actual database this, heart_id column generated automatically ef creates foreign key relationship between 2 tables: tinmen: hearts: id heart_id id 1 1 1 2 3 2 3 null 3 creating relation none exist, or changing existing relation works fine: using (mydbcontext dbcontext = new mydbcontext()) { tinman bill = dbcontext.tinmen.firstordefault(man => man.id == 1); if (bill != null) bill.heart = 2; tinman bob = dbcontext.tinmen.firstordefault(man => man.id == 3); if (bob != null) bob.heart = 1; dbcontext.savechanges(); } now try remove relation: using (mydbcontext dbcontext = new mydbcontext()) { tinman jebediah = dbcon

java - How to disable all the widgets in android device? -

i trying disable widgets device through application.i using following list of widgets not info widgets,lets have 26 widgets in phone gets 15 items in list gets disabled. private static void disableallwidgets(context context) { appwidgetmanager manager = appwidgetmanager.getinstance(context); list<appwidgetproviderinfo> infolist = manager.getinstalledproviders(); (appwidgetproviderinfo info : infolist) { string providerinfo = "" + info.provider; int startindex = providerinfo.indexof('{'); int endindex = providerinfo.indexof('}'); string[] parts = (providerinfo.substring(startindex + 1, endindex)).split("/"); string packagename = parts[0]; string widgetprovidername = parts[1]; try { mpackagemanager = (packagemanager) context.getpackagemanager(); try {

node.js - Performance penalty in executing native SQL in Strongloop Loopback -

is there disadvantage execute native sql query using either {datasource.connector.execute(sql, params, cb) or datasource.connector.query(sql, params, cb)} using connected models? i have tested same scenario sample data both native sql , connected models. when used native sql noticed mysql connection lost when increase load. same operations performance loopback's connected models , filters, can sustain 4 times load compared native sql connector. loopback don't recommend using native sql connector: this feature has not been tested , not officially supported: api may change in future releases. in general, better perform database actions through connected models. directly executing sql may lead unexpected results, corrupted data, , other issues. - loopback so exact question has noticed disadvantage or performance panalty using of using native sql instead of loopback's connected models? simply put running raw queries(native sql) may faster having

SVG abstract shapes responsive -

so can make following path, need shape flipped flat joining line (x) on bottom. need stretch full width of container. <svg id="bigtrianglecolor" xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100" viewbox="0 0 100 102" preserveaspectratio="none"> <path d="m0 0 l30 50 l100 0 z"></path> </svg> with respect flipping shape, can use transform on path, scaling y-axis -1. flip shape , "out" of view, need translate down. if want end same upper , lower boundaries pre-flipped (as opposed to, say, @ bottom of container, etc.) have translate down height of shape, i.e. 50px in example. with respect wanting stretched full width of container, code in question contains answer, i.e. width="100%" . shown placing triangle div 250px wide. contrast original shape (on left) width of 100 not 100% . div { width: 250px; height: 70px;

Spring interceptor that is activated post handling but the response is not yet commited -

in our project have many controllers receives responses , respond @responsebody. have interceptor capable of changing response headers right after controllers returned object. we tried create such interceptor response commited , cannot re-set header response. any ideas?

android - How to get JSON from server without send JSON request -

i need help. use volley sending json object rest api server. , data api app (json). work fine: jsonobjectrequest mjsonobjectrequest = new jsonobjectrequest(request.method.post, url, jsondata, jsonlistener, errorlistener) ... and want send request without jsondata (i can't set null). global values. there not necessary send data. , dunno how send request. can me? till understand ur problem answer this stringrequest distrequest=new stringrequest(request.method.post, your_url, new response.listener<string>() { @override public void onresponse(string response) { toast.maketext(mainactivity.this, " "+response.tostring, toast.length_short).show(); } }, new response.errorlistener() { @override public void onerrorresponse(volleyerror error) { progressdialog.dismiss(); toast.maketext(mainactivity.this, " "+error.tostring, toast.l

Find one key and value form whole mongodb object -

i have records in mongodb below { "_id" : "aqdhbguesaxfwrzys", "i18n" : { "fa" : { "testimonial" : { "content" : { "1" : { "testimonialtitle" : { "newvalue" : "11111111", "isverified" : false }, "testimonialdescription" : { "newvalue" : "11111111", "isverified" : false } } } }, "companyinfo" : { "companyname" : "red fr" } }, "tr" : { "companyinfo"

Swagger 2 integration with Spring boot application -

getting error while integrating swagger2 spring boot application. stuck implementation. problem implementation or configuration? below configurations have done integrate swagger2. swaggerconfig.java import org.springframework.context.annotation.bean; import org.springframework.context.annotation.configuration; import springfox.documentation.builders.pathselectors; import springfox.documentation.builders.requesthandlerselectors; import springfox.documentation.service.apiinfo; import springfox.documentation.spi.documentationtype; import springfox.documentation.spring.web.plugins.docket; import springfox.documentation.swagger2.annotations.enableswagger2; @configuration @enableswagger2 public class swaggerconfig { @bean public docket api(){ return new docket(documentationtype.swagger_2) .select() .apis(requesthandlerselectors.any()) .paths(pathselectors.regex("/api/.*")) .build() .apiinfo(apii

php - i want the iframe to show only if -

i have iframe, have embedded onto production site. still working on here iframe table results the problem don't want 1 see it, wondering there way add link look's like. http://www.chessbook.net/zulutestingsite/index.php?option=com_chess&id=350**&result** that way when add &result it'll show iframe below iframe code on page <div> <iframe src="http://users.hellzoneinc.com/eric258/preview.php" width="50%" height="300" scrolling="auto" frameborder="0" name="results"> </iframe> </div> you should below: <?php if(isset($_get['result']) or $_get['result'])=='your_some_value'){?> <div> <iframe src="http://users.hellzoneinc.com/eric258/preview.php" width="50%" height="300" scrolling="auto" frameborder="0" name="results"> </iframe> </ifr

javascript - Duplicated declarations in compiled out-file using Babel -

i trying compile 2 es6 files single es5 output file using babel. resulting file seems contain duplicated declarations like: var _createclass = function () { ... } and object.defineproperty(exports, '__esmodule', {value: true}); here files: file1 (./ec6/ec6class.js) export class myclass { constructor(dep1, dep2) { } foo() { console.log('foo') } } file 2 (./ec6/ec6class2.js) import myclass './ec6class'; export class myclass2 extends myclass { constructor(dep1, dep2) { super(dep1, dep2) } bar() { console.log('bar') } } my babel cli command is: babel src/client/ec6 --out-file script-compiled.js how compile 2 file single file single declarations of babel infrastructure? having duplicated declarations not desired behaviour. i think problem telling babel compile files finds in src/client/ec6 , while want single point of entry (in fact, have that). babel compile ec6cl

ios - Good example for using UIAlertControler -

im'm searching example of use uialertcontroller uislider, uisegmentedcontrol, uistepper. i cant't use uialert , uiactionsheet don't know how add slider, segmented control or stepper alertcontroller , display on uitableviewcontroller. i'm programming using swift. let alertcontroller = uialertcontroller(title: "hello", message: "do want save changes?", preferredstyle: .alert) let okaction = uialertaction(title: "don't save", style: .default) { (action) in profileback = "false" self.dismissviewcontrolleranimated(false, completion: nil) } alertcontroller.addaction(okaction) let destroyaction = uialertaction(title: "save", style: .default) { (action) in self.callupdatebasicdetailsapi() } alertcontroller.addaction(destroyaction) self.presentviewcontroller(alertcontroller,

tsql - DateDiff of Logtable Dates Which Have The Same Column in SQL Server -

using sql server 2012 need datediff of dates in log table has same column, example: id | version | status | date ----------------------------------------------------- 12345 | 1 | new | 2014-05-01 00:00:00.000 12345 | 2 | | 2014-05-02 00:00:00.000 12345 | 3 | appr | 2014-05-03 00:00:00.000 67890 | 1 | new | 2014-05-04 00:00:00.000 67890 | 2 | | 2014-05-08 00:00:00.000 67890 | 3 | rej | 2014-05-13 00:00:00.000 i need date diff of sequential dates (date between 1, 2 , date between 2, 3) i have tried creating while no luck! your appreciated! this calculates datediff per query "date diff of sequential dates",if not sequential,it show same date.further please don't use reserved keywords column names select id, [version], [status], [date], case when lead([date]) on (partition id order [version])=dateadd(day,1,[date]) cast(datediff(day,[

caching - Remote Coherence client gives error -

my remote coherence server(with script got coherence 3.6.1 download) getting started ipaddress 169.177.81.97 , port 8088.i have not started weblogic server this.now when try connect client in different machine gives me error: 2016-08-08 15:06:20.423/0.237 oracle coherence 3.6.1.0 <info> (thread=main, member=n/a): loaded operational configuration "jar:file:/c:/test/remotecache/lib/coherence.jar!/tangosol-coherence.xml" 2016-08-08 15:06:20.427/0.241 oracle coherence 3.6.1.0 <info> (thread=main, member=n/a): loaded operational overrides "jar:file:/c:/test/remotecache/lib/coherence.jar!/tangosol-coherence-override-dev.xml" 2016-08-08 15:06:20.429/0.243 oracle coherence 3.6.1.0 <info> (thread=main, member=n/a): loaded operational overrides "file:/c:/test/remotecache/bin/tangosol-coherence-override.xml" 2016-08-08 15:06:20.435/0.249 oracle coherence 3.6.1.0 <d5> (thread=main, member=n/a): optional configuration override "/custo

mysql - SQL Database not updating from a different computer -

i working on website uses database take rsvps guests. when test out own computer, works fine (that is, database updates , shows changes on phpmyadmin). reasons, when else's computer, database doesn't update. i suspect it's because i'm using "localhost", couldn't find host name anywhere. have linux hosting cpanel godaddy. $mysqli = mysqli_connect("localhost, "xxxxx", "xxxxx", "xxxxxx"); you need update server ip mysql host , enable remote mysql databases through cpanel.

c# - Get the connected server of a PrincipalContext for global catalog -

i have method createcontextforglobalcatalog returns principalserver connects global catalog: principalcontext = new principalcontext(contexttype.domain, "forest.name:3268", "dc=forest,dc=name", contextoptions.negotiate, username, password); note: reduced version of method, name , container parameters. with context i'm looping on objects database information global catalog in activedirectory: using (principalcontext principalcontext = createcontextforglobalcatalog()) { foreach (adaccount adaccount in accounts){ log.debug("connected server: " + principalcontext.connectedserver); // information ad here ... } } the log.debug line logs connected server principalcontext. have test setup containing virtual machines. my problem: when disconnect connected server

Bootstrap contianer half normal half fluid -

bootstrap has 2 types of containers: responsive fixed width container , full width container, spanning entire width of viewport. need build container left side if fixed width , right side full width. possible? thanks. bootstrap not designed type of layout since columns widths percentage-based (fluid). you'd need override ride columns widths , media queries. example.. #fixed { background-color:#f5f5f5; padding-top:5px; } @media (min-width:992px) { #fixed { width: inherit; min-width: 585px; max-width: 585px; background-color:#f5f5f5; float: left; height: 100%; position:relative; overflow: auto; } #fluid { width:calc(100% - 585px); } } http://codeply.com/go/scawdd3m0d

javascript - Programmatically resize / adjust dynamic html to fit UIWebView -

the requirement fit html uiwebview fixed size(s) i.e. predefined width x height combinations, these sizes specified developer. html, contains scripts further load other html(s) having dynamic elements, nature of not known @ runtime dynamic html(s) rich media ads (advertisements). have tried among several 100 solutions posted similar questions on so: changing meta viewport width & height of webview ( https://developers.google.com/webmasters/mobile-sites/mobile-seo/responsive-design && http://webdesignerwall.com/tutorials/viewport-meta-tag-for-non-responsive-design ) css update of canvas & div elements width/max-width & height/max-height of webview (based on testing showed these elements being main ones form html) through script tags ( http://codetheory.in/scaling-your-html5-canvas-to-fit-different-viewports-or-resolutions/ , html content fit in uiwebview without zooming out ) javascript injection update canvas & div elements. the issue: regardless o

sublimetext3 - How to add shortkeys in SublimeText2 -

keys such log.: log.withfields(logfields). how can this,i checked in preferences > key bindings found how set keys such ctrl c ... i found solution add in preferences>key bindings user { "keys": ["l", "o","g","."], "command": "insert_snippet", "args": {"contents": "log.withfields(logfields)."} }

firebase - Accessing FCM message logs -

i'm having trouble figuring out whether or not fcm keeps logs of sent fcm push notifications, , if so, how access them. i'm having intermittent issues sending push notifications fcm server iphone app, , love able see @ stage push failing. i found below documentation suggests these logs should kept somewhere: https://support.google.com/googleplay/android-developer/answer/2663268?hl=en ("you can messages sent through firebase cloud messaging registration token or message id.") however, can't seem figure out how access them. since app ios only, don't have app in google play developer console, , firebase console doesn't seem contain such logs. however, based on possible message statuses in documentation above (e.g. accepted, sent apns ), seems google / firebase should store message logs sent ios android. thanks in advance help!

html - Bootstrap gird row same height -

Image
i know question has been asked number of times problem proposed solutions not working. i presenting pdf user in modal along side form. image below. the problem having iframe set @ 100% maximum size go @ 100% per image. if give fixed size of 435px; sizes right aspect screen. need screen agnostic want size self according modal appears in. i have tried using working example here http://www.bootply.com/92230 , example same have seen on web morning. the html <div class="row"> <div id="equalheight"> <div id="loa" class="col-md-6 demo notshown"> <iframe src="\\sqlmuldvwsk06.ukskpre.santanderuk.pre.corp\public\cmcfileupload\loafiles\sra557034_321043.004.pdf" class="mh100percent mw100" frameborder="0" scrolling="no"> <p>it appears web browser doesn't support iframes.</p> <

howto instantiate certain class from string in python project packed by pyinstaller? -

i using getattr, cant make working pyinstaller short summary: python 3.5.1 |anaconda 4.0.0 (64-bit)| (default, feb 16 2016, 09:49:46) [msc v.1900 64 bit (amd64)] on win32 i have project, packed pyinstaller single file i have external text file script (subs.py) my project cant instantiate class subs in subs.py .. before pack project pyinstaller, can create instance of subs subs.py.. can please advise, whats wrong on example below ? in order show problem, prepared simple example. folder structure: root- #folder -to #folder -__init__.py #file -subs.py #file -main.py #file main.py: import importlib myclass = getattr(importlib.import_module("to.subs"), "subs") instance = myclass() instance.test() subs.py: class subs(): def test(self): print("test") at moment, execution return expected: python main.py test but if pack project pyinstaller ( lat