Posts

Showing posts from May, 2010

math - How will be changed the number by dividing the absolute value for storing the result of changing the divider? -

here formula: result = (const + var) % mod result - interger, >= 0 const , var , mod - interger, > 0 question: how calculate var if: mod incremented mod decremented result и const won't changed. not bruteforce. found solution. result = (const + var) % mod let, newmod - incremented or decremented mod . var = newmod - (const - result) % newmod examples. with original formula. (25 + 15) % 16 = 8 const = 25 var = 15 mod = 16 result = 8 incremented: newmod = mod + 1 = 17 var = 17 - (25 - 8) % 17 = 17 - 0 = 17 (25 + 17) % 17 = 8 decremented: newmod = mod - 1 = 15 var = 15 - (25 - 8) % 15 = 15 - 2 = 13 (25 + 13) % 15 = 8 upd: proof. we need substract result both parts. because that's not division (just remainder of division) can this. const + var >= result , result remainder of division (25 - 8 + var) % 16 = 0 => (17 + var) % 16 = 0 in other words (a special case): 17 + var = 16 =&g

multithreading - Python Threading task handling -

i have created 3 threads in python run infinitely. how can check of 3 threads finished processing current task? def 1thread(): global list while true: if len(list) != 0: list.pop() # takes long else: pass on above code, example, want check if 1thread() "doing takes long" or wainting "list" have elements. thinking of method 1thread().busy any ideas? script background processing allows more tasks que.

jquery - Custom Share using Javascript not working as desired -

i working on simple custom share user click on share button show list of share option , user can click on 1 of them share page. i have setup code on codepen not sure why not working. <html> <head> <script src="https://code.jquery.com/jquery-2.1.4.js"></script> <meta charset="utf-8"> <title>js bin</title> </head> <body> <a class="share-btn" href="#">s</a> <div class="share"><a href="http://www.facebook.com/sharer/sharer.php?u=http://domain.com"> f</a> </div> <div class="share"><a href="whatsapp://send?text=the text share!" data-action="share/whatsapp/share">w</a></div> <div class="share"><a href="http://twitter.com/intent/tweet?status=this title+http://domain.com/article/this-is-article ">t</a></div> </body

ios - Pod update has fatally altered app -

Image
my working app used have xcode project navigator shown below. ios 10 requirements meant had upgrade xcode 8.1, meant upgrading entire mac os sierra , translating whole app swift 2.3. needless say, caused errors, 1 of issue pubnub. however, apart new build error app structure same , seemed ok after dealing layout issues. i requested run following steps try solve pubnub pod error despite me warning previous attempts deal pod file caused fatal errors unrecoverable. install ios simulators after xcode update open xcode preferences (cmd+,) , navigate ”locations” tab shown path ”deriveddata” folder click on small circle arrow on right side of shown ”deriveddata” path open in finder quit xcode remove ”deriveddata” folder clean cocoapods (if integrated it) caches entering in terminal: rm -rf ~/library/caches/cocoapods from project root (where podfile located) run in terminal: pod deintegrate myapp.xcodeproj remove project root (where podfile located) podfile.lock file fro

Not able to crop image in android -

i have choose image either gallery or capture camera, want crop image have got, so, using following code call crop intent, intent cropintent = new intent("com.android.camera.action.crop"); //indicate image type , uri cropintent.setdataandtype(imageuri, "image/*"); //set crop properties cropintent.putextra("crop", "true"); //retrieve data on return cropintent.putextra("return-data", true); try { startactivityforresult(cropintent, request_code_for_crop_done); } catch (activitynotfoundexception actionnotfoundexception) { log.e(tag, actionnotfoundexception.getmessage(), actionnotfoundexception); toast.maketext(fragment.getactivity(), fragment.getresources().getstring(r.string.crop_not_available), toast.length_short).show(); } i using nexus 6p device , seems on device facing issue. this gives me toast message saying can not crop image below 50 x 50. may know missing? this com.android.camera.action.cr

apache spark - Databricks Twitter streaming analysis scala -

hi trying run databricks twitter_classifier github code @ local system. but these below code lines in examineandtrain.scala , getting encoder error. val texts = sqlcontext.sql("select text tweettable").map(_.tostring) // cache vectors rdd since used kmeans iterations. val vectors = texts.map(utils.featurize).cache() after using import sqlcontext.implicits._ val texts = sqlcontext.sql("select text tweettable").map(_.tostring) // cache vectors rdd since used kmeans iterations. val vectors = texts.map(utils.featurize).cache() encoder error mapping text-> string resolved while mapping string -> vector still showing. here featurize() function takes string , returns vector note - using spark version 1.5.2 thanks.

java - how to get json from inside a json -

i've below json data. { "restresponse" : { "messages" : [ "more webservices available @ http://www.groupkt.com/post/f2129b88/services.htm", "total [249] records found." ], "result" : [ { "name" : "afghanistan", "alpha2_code" : "af", "alpha3_code" : "afg" }, { "name" : "Åland islands", "alpha2_code" : "ax", "alpha3_code" : "ala" }, { "name" : "albania", "alpha2_code" : "al", "alpha3_code" : "alb" }, { "name" : "algeria", "alpha2_code" : "dz", "alpha3_code" : "dza" }] } } here need loop through country names , print in console. i'm trying below code. objectmapper mapper = new objectmap

php - Trying to implement Maxmind downloadable database with WordPress -

i trying implement maxmind downloadable databases within wordpress theme form want detect , print visitor's country automatically. i followed tutorial: http://slicejack.com/implementing-geoip-functionality-wordpress-theme/ , did steps. try print county <h4><?php echo $geoip2_country_code; ?></h4> it's doing nothing. don't know doing wrong, great.

Edit path of image file in Image viewer in C# / XAML -

i using below code : string filepath = e.fullpath; image.source = new bitmapimage(new uri(filepath)); filepath output is: file:///c://folder//location//name.jpg which throwing error image.source required path format image : c:/folder/location/name.jpg please help, thank in advance try this: string filepath = e.fullpath; image.source = new bitmapimage(new uri(filepath).localpath);

vscode extensions - Visual Studio Code not matching html tags -

Image
i using visual studio code writing html doesn't have feature of identifying closing tag current selected one. how can achieve same? here how looks on vs code: can suggest extension or how can achieve this? vs code 1.7.1 i think chose php or else "language mode", change on html

javascript - Unable to get email address onclick function -

this question has answer here: get value of input in jquery 5 answers <div id="divform" class="fancybox" style="display:none;"> <form id="frm_step1" action="download1.php" method="post"> <label>enter email</label> <input type="email" name="email" id="email" value="" required /> <input type="button" name="submit" id="submit" value="submit" class="form-submit" target-form="frm_step1" onclick="test();" /> </form> </div> function test() { var email = $('#email').text(); alert(email); $.ajax({ type: "post", datatype: "json", url: 'download1.php?email' +

asp.net - Entity Framework 6 - Null value in nested query with select -

i facing problem in ef6. when execute query select return value. when add select returns null. the code here: the (w) not null here... var list = db.x.include("y").include("z.w") .orderby(c => c.id) .skip(pagesize * page) .take(pagesize) .tolist(); here, w value null... var list = db.x.include("y").include("z.w") .select(a => new { a.id, a.z}) .orderby(c => c.id) .skip(pagesize * page) .take(pagesize) .tolist(); please :) update 1 public class academy { public int id { get; set; } [stringlength(255)] [index(isunique = true)] public string name { get; set; } public string logo { get; set; } [required] public owner owner { get; set; } public list<location> location { get; set; } } public class location { public int id { get; set; } publ

.net - Image path on ASP.NET doesn't work -

image path on publish project in asp.net doesn't work. this image path: var imgsrc = "~/images/markers"; in markers folder, have icons want display depending on logged-in user. works fine on local it's not working when publish project on iis. two reasons : 1. give path "/images/markers" instead of "~/images/markers". or 2. check @ published directory image exist or not,some time after publish image not copied so.

python - Downloading file from FileField in Django with a HTTP link in a HTML file -

i create link when user press it, download pdf file media folder in django users machine. i tried different methods wrong me. tells me file can not found, or code running file corrupted. my html link: <td> <a href="/download/">download</a></td> my url pattern links view: url(r'^download/$', views.downloadpdf), my filefield this: upload_pdf = models.filefield() following snippet code view downloads corrupted pdf: def downloadpdf(request): filename = '/home/user/pycharmprojects/myproject/media/invoice_template.pdf' response = httpresponse(content_type='application/pdf') fileformat = "pdf" response['content-disposition'] = 'attachment; filename=thisismypdf'.format(fileformat) return response so, have make working ? with open(os.path.join(settings.media_root, 'invoice_template.pdf'), 'rb') fh: response = httpresponse(fh.read(), content_type="applic

firefox - Find text (ISBN) on page and attach link on it in JS -

for browser (firefox) addon need find isbn's on pages (such as: amazon.com, book.com). i need find dom elemets containing isbn , manipulate them link, sends isbn rest webservice further logic. since i'm new javascript don't have idea how because homepages differ in how display isbn. this current implementation: var self = require("sdk/self"); // dummy function, show how tests work. // see how test function, @ test/test-index.js function dummy(text, callback) { callback(text); } exports.dummy = dummy; var tag = "body" var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var pagemod = require("sdk/page-mod"); var data = require("sdk/self").data; var button = buttons.actionbutton({ id: "mozilla-link", label: "visit mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "

vb.net - how to use select (col array())from table -

public overloads function setdata(table tables, col() string) statuez dim dd new dataset, state new statuez try dd = r.dset(table, "select **col()** " & table.tname & " username='" & table.user & "'") dg.datasource = dd.tables(0) state.done = true catch ex exception state.done = false state.message = ex.message end try return state end function *** col() string array holds names of columns needed is there way select column array out typing every member of array ? you can this: dim result string = string.join(",", col) then use result in select statement. aside this, perhaps should @ parameterizing statements vulnerable sql injection.

What does version astericks (*) mean in bower? -

so i'm looking through project , noticed says: "library": "*" i know * wildcard in cases, * same writing latest ? or any? assume 1.* take latest 1.x := >=1.0.0 <2.0.0 version.. right?

node.js - How to make use of Function Apps for Azure IoT Hub? -

so i've been trying generate small function app (in js) responds message sent azure iot hub. output simple console log. however, unable load event hub compatible end point of iot hub trigger (the option available create new event hub). how proceed? code device send azure' iot hub working , able view messages via device explorer tool. you need create new event hub connection , use event hub-compatible endpoint iot hub messaging section. need change match service bus connection string format - "endpoint=[your iot hub compatible end point];sharedaccesskeyname=[your key name];sharedaccesskey=[your key];entitypath=[your event hub compatible name]" key name , key can taken "shared access policy" section. good luck

c# - Method error, with mysql -

this question has answer here: what nullreferenceexception, , how fix it? 29 answers i have coded function following, , getting error, trying items details db method returns string. public static string getitemdetails(int i_id, string i_name) { mysqlconnection sql_con = new mysqlconnection(vpconfig.sql_conns); string[] itemdata = null; i_name = i_name == null ? string.empty : i_name; i_id = i_id == 0 ? 0 : i_id; try { if(i_id != 0) { //get item details id string query = "select * items id="+i_id; mysqlcommand xv = new mysqlcommand(query, sql_con); sql_con.open(); mysqldatareader rdr = xv.executereader(); while(rdr.read()) { itemdata[0] = rdr.gets

algorithmic trading - How to setup a period of time in an MQL4 source code? -

i using mql4 . currently, using [expert advisor]-s in mt4.strategytester, , set period-of-time build-in pull-down calendar gui-elements. what want setup period-of-time straight in mql4 -source code. if realized, example, can compare result 'from 2011/01-to 2011/12' to 'from 2012/01-to 2012/12' and on. there easy solution requirement, added value automated, large-scale hyper-parameter optimisations inside said mt4.strategytester tool, using proposed pair of parameters ( astartfromdate , aruntilldate ) as iterable tuple, harnessed tradingstrategy robustness cross-validations of release-candidates on sweeping/sliding calendar window-of-time. extern datetime astartfromdate = d'2010.01.01 00:00'; extern datetime aruntilldate = d'2345.01.01 00:00'; void ontick(){ if ( time < astartfromdate || time > aruntilldate ){ ignoreticksoutsidethegivenperiodoftime(); return;

javascript - Hide table columns depend on button in multiple dynamic json array key based in angularjs -

hide table columns depend on button in multiple dynamic json array,when click on color button need hide color column (color value present in dimensioncheck key). have created dynamic variable values in loop,in myfunc trying hide columns depend on variable status. var app = angular.module('plunker', []); app.controller('mainctrl', function($scope,$filter) { $scope.headers = [{value:"color",hide:false}, {value:"fit",hide:false}, {value:"packagecontents",hide:false}, {value:"dimdim",hide:false}, {value:"style",hide:false}, {value:"title",hide:false}, {value:"wash care",hide:false} ]; $scope.checkobject=function(object,list){ /*var myredobjects = $filter('filter')(list, { prod_value: "dismdim" }); console.log(myredobjects);*/ var value =$filter('filter')(list, { dimensioncheck: object }); if

javascript - Unable to open url from nodejs -

i not able open url http://192.xxx.xxx.22:9200 nodejs application. using angularjs front end , nodejs backend. if replace xxx.xxx.xxx.xxx localhost able see content of http://192.xxx.xxx.22:9200 . here pasting code. here app.js var express = require('express'); var app = express(); var http = require('http').server(app); ..... app.post('/home',function(req,res){ }); http.listen(8082,'0.0.0.0',function(){ console.log('listening on 8082'); }) my home.html page. <div ng-controller="ctrl" class="row"> <div class="col-sm-3"> <div class="sidebar"> <div ui-view='sidebar'></div> </div> </div> <div class="col-sm-9"> <div class="first_div"> <label>enter url : <input type="text"

Insertion of text between List of data in android -

i have no idea of how done in android. image provided its ux created in html , wanted same in android . thing thought can attached in recycler view , coded in way: public class fourfragment extends fragment { recyclerview rv_notify; myadapter adapter; arraylist<player> players=new arraylist<>(); textview notify_count_tv; context c; public fourfragment() { // required empty public constructor } @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); } @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view v = inflater.inflate(r.layout.fragment_four, container, false); c=v.getcontext(); notify_count_tv=(textview) v.findviewbyid(r.id.profile_notification_count); imageview imageview = (imageview) v.findviewbyid(r.id.profile_imageview); bit

Spring Data Elasticsearch use String as id -

when using spring data elasticsearch this: @document(indexname = "app_rec_by_content_1", type = "user_rec") public class userrec { @id public string id; public int userid; public int iid; public int modelid; public date timestamp; } i got exception: exception in thread "pool-3-thread-1" mapperparsingexception[failed parse [id]]; nested: numberformatexception[for input string: "1-245"]; dose spring data elasticsearch support string field @id?

php - date() expects parameter 2 to be integer, string given - Help Me -

my laravel 5.2 code $this->timestamp=date('y-m-d',intval($timestamp)); $datetime=date('y/m/d', $timestamp); date() expects parameter 2 integer, string given that error occur. error show when choose day 31, not on other days (1 30). other days ok. when change code that $this->timestamp=date('y-m-d',intval($timestamp)); $datetime=date('y/m/d', intval($timestamp)); error solved date show not correct. date show 1970/01/01 please me, how fix this? since you're using laravel, can carbon: carbon::parse($timestamp)->format('y-m-d');

jsf - Primefaces datatable: multiple selection list is in another list -

i have question, how map datatable multiple selecion in list element of list: <p:datatable id="subdatatable#{index}" value="#{objectbean.subdatamodels.get(index)}" selection="#{objectbean.selectedlists.get(index)}" var="subrowtable" rowkey="#{subrowtable.primarykeyobj.tostring()}"> with index int variable, , in objectbean private list<list<object>> subdatamodels; // , getter, setter private list<list<object>> selectedlists; // , getter, setter i got error: javax.faces.facesexception: multiple selection reference must array or list datatable i need solution case or related topic it. help.

ios - Multiple intervals in single switch-case using tuple Swift 3 -

i new programming , trying switch multiple conditions. have label takes temperature in celsius or fahrenheit in dependence of 1 set, need take value , attribute settings based on temperature interval. how can manage in 1 switch (if possible), know how using 4 switches, it's long code... tried smth : let todaystringcomponent = double(templabel.text!) let fahrstringcomponent = double(templabel.text!) let yesterdaystringcomponent = double(yesterdaylabel.text!) switch (celsunitbuttonbool, todaystringcomponent!) { case (true?, -100 ... -40) : // gradientimageoutlet.image = uiimage(named: "thermo_01.png")! if uidevice.current.userinterfaceidiom == .pad { temperatureviewcenteraxiscnstr.constant = 315 gradientheight.constant = 0 animatechanges() } else if uidevice.current.userinterfaceidiom == .phone { temperat

visual studio - Microsoft Edge prompts for authentication when debugging -

i'm using visual studio 2015 on windows 10 machine in domain environment not local admin on development pc. when press f5 start debugging mvc project microsoft edge windows security prompt asking credentials. enter domain account credentials (the 1 logged pc with) , page displays. as understand it, iis express uses local credentials anyway why being prompted username , password every time press f5? it's frustrating , gave , decided use internet explorer instead have new pc , still have issue i'm wondering if there checkbox can tick somewhere before go insane. press “windows+x” , go “control panel”. click on “credential manager” , go “web credentials” , "window credentials" remove password , read credentials. ** remove window credentials corresponding ip showing on edge:- fore more detail:- https://answers.microsoft.com/en-us/windows/forum/apps_windows_10-msedge/edge-message-server-asking-for-username-and/32e06d1f-7462-4b1a-8eef-33e5581542b5

php - SQL join left and right -

Image
this query: select distinct * purchase_records inner join purchase_items b on a.id = b.purchase_id left join transactions c on a.id= c.purchase_id it fetches records 2 tables. left gets 1 record, , right gets number of records more one. the issue when table returns record, matches exact record repeat right side of row according left side of row. how can 1 record in left , many records in right? want left join show 1 record, , right show many records there in database. you can try as.... select a.*,b.add1,c.add2 from( select 1 id,'a' name union select 2 ,'b' union select 3 ,'c' union select 4 ,'d') left join (select 1 id,'a' name,'z' add1 union select 5 ,'b' ,'zz' union select 6 ,'c' ,'zzz' union select 4 ,'d' ,'zzzz')b on a.id=b.id right join (select 1 id,'a' name,'1z' add2 union select 5 ,'

set limit to limitoffset pagination in django rest framework -

i want set limit items in django rest framework using class attributes. before posting question i have tried googling 30 mins achieve this , without luck. have gone through many so posts this , this , this , of course, have gone through drf docs on pagination many times. viewset looks below after aggressively trying achieve limited queryset. class myviewset(listapiview): serializer_class = myserializer queryset = mine.objects.all() pagination_class = limitoffsetpagination default_limit = 2 paginate_by = 2 max_limit = 2 limit = 2 max_paginate_by = 2 page_size = 2 paginate_by_param = 2 i know many of these attributes not needed, wanted try out luck. please note have tried listmodelmixin , not working me. overrode list() also. could not set limit queryset unless limit , offset provided . doing wrong or queryset meant limited using limit , offset? tia

Spring Boot / Spring Cloud / Spring Security: How to correctly obtain an OAuth2 Access Token in a scheduled task -

i have background task (method @scheduled annotation) calls resource server using ribbon/feign. background task running on authorization server. the resource server requires calls authenticated (and present set of authorities) so correct way of obtaining access token calls made scheduled task? my current solution manually generate access token in custom feign requestinterceptor , set authorization header each request performed feign. i tried luck using @enableoauth2client annotation , hoping build oauth2clientcontext there inject feign interceptor (or have work entirely taken care of oauth2feignrequestinterceptor spring-cloud-security jar) i've gathered looking @ tutorial clientcontext built 1 has register web filter in security chain. won't work situation there isn't web request being processed call using feign originates scheduled task.. unfortunately topic not covered of (otherwise commendable) spring docs / examples - far have seen - hoping find answ

swift3 - Swift 3 Result of call to (_:parameters:completionHandler:)' is unused warning and Braced block of statements is an unused closure error -

i have working swift.2.3 project when build , convert swift3 gives me: result of call (_:parameters:completionhandler:)' unused warning. warning. my clear working codes under below, how can convert them true way? inmyclass; private func getmoviesdirectorsfromjson(jsondata: nsdata) throws -> [director] { var directors = [director]() { if let jsonobject = try nsjsonserialization.jsonobjectwithdata(jsondata, options: .allowfragments) as? [string: anyobject], jsonarray = jsonobject["actors"] as? [[string: anyobject]] { in jsonarray { var properties = [string: anyobject]() properties[directorjsonkeys.id] = i[directorjsonkeys.id] properties[directorjsonkeys.firstname] = i[directorjsonkeys.firstname] properties[directorjsonkeys.lastname] = i[directorjsonkeys.lastname] proper

Some sort of simple lookup function in R -

here have super simple question. let's assume have amount of particles placed randomly in water column. have information on depth of each particle (df) , have temperature profile of water column (profile). temp <- seq(4,20,by=(20-4)/90) depth1 <- c(1:91) profile <- data.frame(depth1, temp) id <- c(1:182) depth2 <- c(rep(5:45,3),50:91,1:17) df <- data.frame(id, depth2) what easiest way return ambient temperature of specific particle (e.g id=13) @ given depth? output in case should [1] 6.844444 because temperature @ 17 meters 6.844444 can see in "profile". return needs single value , command should short possible. it's gonna used repeatedly in function() then. there must simple solution using [square brackets] or so... thanks help... robert you can shorten further to profile[df[df$id==13, "depth2"], "temp"] the inner expression evaluates numeric value of depth1 , rather logical vector. or shorter if ta

c# - Missing Referenced Assemblies Folder for .NET 4.0 -

it seems starting .net 3.0, microsoft moved common assemblies c:\program files\reference assemblies\microsoft\framework\xxx in order support effort split out clr 2.0 , clr 4.0 gacs (having added c:\%windir%\microsoft.net\assembly ). however, while have both c:\program files\reference assemblies\microsoft\framework\xxx and c:\program files\reference assemblies\microsoft\framework\.netframework\v4.0 on development machine, latter not exist on server installed .net 4.0. wcf project being deployed there references common dlls folder , cannot find them. what doing wrong? should change these references new 4.0 gac explicitly? why folder not exist on server? reference assemblies folder used visual studio. while actual deployed application use gac in c:\windows\microsoft.net\assembly. assuming didn't install visual studio on server, therefore wouldn't have reference assemblies folder. if hosting wcf on server, need ensure installed .net 4.0 full

What exactly is a NeighboringCell in android. -

what neighboringcell in android. from android developer documentation : list getallcellinfo() returns observed cell information radios on device including primary , neighboring cells. so, basically, neighboring cell unused radio signal 2 sim card.

php - PDOException SQLSTATE[28000] [1045] Access denied for user 'homestead'@'localhost' -

i new in laravel 5.2. i getting following error: [pdoexception] sqlstate[28000] [1045] access denied user 'homestead'@'localhost' (usin g password: yes) while execute following command: php artisan migrate i running application using vagrant on windows pc. please let me know why getting above error. you getting above error because on .env file. if open project base directory following default configuration: db_connection=mysql db_host=localhost db_database=homestead db_username=homestead db_password=secret just change above values according development environment. try again, resolve issue.

ANTLR how to retrieve the type of token with recursion -

i'm using antlr4 framework , fragment of language: r : rn #rnname | 'dlrrelationintersectionof' lparen r comma r rparen #rintersection | 'dlrrelationunionof' lparen r comma r rparen #runion as can see, rn terminal node can process it. r non-terminal node can complex, dlrrelationunionof(rn1, dlrrelationintersectionof(rn2,rn3)). goal process r node , recursively rn. problem once retrive rule r in code like: dlrparser.rcontext recursiverule = ctx.r(); how can recursiverule find out rns? during run parser creates parse tree (if enabled, default). parse tree tree representation of items matched. tree consists of parserrulecontext instances, each children represent matched items in rule in matching order. r context, when matching second alt, can find 6 child nodes (one literal, 1 lparen, 1 first sub r etc.). can use child contexts access subentries. if rn matched hav

java - Realm instance in background thread -

we have long lived issue not able reproduce on our devices. luckily, 1 of our users able reproduce, more, developer , contributed fix . however, fix not obvious me, why changing method static class method fixes issue. java perspective adding 1 hidden parameter , nothing else. can comment might wrong our readintocvs or exportpresenter ? , why proposed fix solving it?

azure - Broken display website caused by ssl certificate apply -

Image
here situation, try apply certificate our website hosted in azure related contents js , css stored in amazon cloudfront in distributions, once certificate applied display broken means css , js not applied anymore. when try inspect broken elements still here, in http mode , not in https questions are is broken display due fact http used instead of https if yes cause, how can integrate purshased ssl ceritficate custom website repair display thank you

Nested for loop through different sets of data in R -

how can create nested loop uses different data sets (each consisting of several data files) input , save results variable- specific? i have written loop subsets different climate data files 1 country , sums values temperature. the data looks , given every day in every region of both countries (one file=one region) date |prec |temperature ----------|-----|----------- 13-01-1992| 1 | 1 14-01-1992| 0 | 1.5 15-01-1993| 0.8 | -0.4 16-01-1993| 0 | -2.2 17-01-1994| 0 | -2.35 13-01-1994| 0.3 | -2.95 14-01-1995| 1 | -8.95 15-01-1995| 2 | -7.25 16-01-1996| 1.5 | -6 17-01-1996| 0 | -8.3 13-02-1997| 1 | -0.3 14-02-1997| 0.1 | -0.15 15-02-1998| 0 | -2.5 16-02-1998| 0.2 | -3.4 17-02-1999| 0.9 | -0.4 16-03-1999| 2.6 | 8.4 17-03-2000| 1.7 | 11 18-03-2000| 4.7 | 4.65 19-03-2001| 1 | 2.95 20-03-2001| 0.6 | 4.7 13-08-2002| 2 | 22.35 14-08-2002| 1 | 20 15-08-2003| 1.7 | 21.4 16-08

PHP SIMPLE DOM - div class -

please can me help? $html = file_get_html('http://www.csfd.cz/hledat/?q=rychle+a+zb%c4%9bsile+2001'); this code: <div id="search-films" class="ct-general th-1"> <h2 class="header">filmy</h2> <div class="content"> <ul class="ui-image-list js-odd-even"> <li> <a href="/film/1616-rychle-a-zbesile/"><img src="//img.csfd.cz/files/images/film/posters/000/001/1619_405078.jpg?h180" alt="poster" class="film-poster-small image" /></a> <div> <h3 class="subject"><a href="/film/1616-rychle-a-zbesile/" class="film c1">rychle zběsile</a></h3> <p>akční / krimi, usa / německo, 2001</p> <p> režie: <a href="/tvurce/2

ubuntu - Gnokii and Nokia 3220 CA-42 Cable: ark3116: don't know how to do software flow control -

im trying setup zabbix server using gnokii send sms. when try identify phone using gnokii, gets stuck in loop. syslog reporting: usb 1-1.2: ark3116: don't know how software flow control i've searched everywhere cant seem fix problem. im running ubuntu 14.04.5 lts vm on esxi. i've added usb controller , usb device in vm settings. can see /dev/ttyusb0 root@sys-zabbix-01:~# gnokii --identify gnokii version 0.6.31 log: debug mask 0x1 config read file /root/.gnokiirc. cannot open logfile /root/.cache/gnokii/gnokii-errors warning: cannot open logfile, logs directed stderr phone instance config: model = 6510 port = /dev/ttyusb0 connection = dlr3p initlength = default serial_baudrate = 19200 serial_write_usleep = -1 handshake = software require_dcd = 0 smsc_timeout = 10 rfcomm_channel = 0 sm_retry = 0 connecting serial device: opening device /dev/ttyusb0 serial device: setting rts low , dtr low serial device: setting rts high , dtr high serial device: setting speed 19

sql - Order VARCHAR AND NUMBER -

this question has answer here: how sort numbers first oracle sql query? 2 answers column : varchar i have select : select column table ae 10000 10005 ad ab ac 10010 and want order them : (number ordered varchar ordered) select column table order column 1 - 10000 2 - 10005 3 - 10010 4 - ab 5 - ac 6 - ad 7 - ae because column character column numbers going ordered binary sort. want order them numerically, means need 2 order clauses a numeric, numeric characters considered a standard binary sort select column_name table order case when regexp_like(column_name, '^\d+$') to_number(column_name) end , column_name the regular expression ^ - anchor beginning of string \d - match numbers + - match previous expression number of times $ - anchor end of string it serves enforce numbers exist prior converting column n

python - How do I get the correct selector from flipkart review page for web scraping? -

the reviews in selector multiple classes "row _3wyu6i _3brc7l". when scraping, response not have above selector instead has "row _3wyu6i _1kvtzt" selector.and selector has empty list.actually classes values "_3brc7l" in flipkart page flipkart page converted classes values "_1kvtzt" in response through scraping. the list of elements when using xpath of parent class . how should resolve issue? the flipkart page generates dynamic content through ajax requests.that reason not correct class selectors. now, changed code per instructions of following answer: to retrieve data through ajax requests . helpful , simple me new scraping , need not use scrapy or casperjs.

as.Date showing character string in unambiguous format even when strptime specified R -

this question has answer here: format date in r yyyymmdd 3 answers i have date column of form: 20160812 20160813 basically yyyymmdd. i converted date using strptime , as.date weather_dataset$date = as.date(weather_dataset$date,"%y%m%d") but get error in chartodate(x) : character string not in standard unambiguous format huh? i've specified format use, still throwing me error reason. appreciate help! :) thank you! your data has character. use workaround: weather_dataset$date <- as.date(as.character(weather_dataset$date),"%y%m%d") another possibility library(lubridate): weather_dataset$date <- lubridate::ymd(weather_dataset$date)

ant - java.lang.SecurityException: no manifiest section for signature file( RSA, SF, DSA files and MANIFEST.MF excluded) -

below ant build jar target : <target name="build jar" depends="compile"> <mkdir dir="${dist.home}" /> <jar destfile="${dist.home}/${app.name}.jar" basedir="${build.home}/classes"> <zipgroupfileset dir="${lib.home}" includes="*.jar" excludes="*.rsa, *.sf, *.dsa, meta-inf/manifest.mf" /> <manifest> <attribute name = "main-class" value = "com.karthik.publisher"/> </manifest> </jar> </target> when run/execute jar command prompt, below error error: jni error has occurred, please check installation , try again exception in thread "main" java.lang.securityexception: no manifiest section signature file entry javax/mail/securitysupport.class @ sun.security.util.signaturefileverifier.verifysection(unknown source) @ sun.secur

javascript - how to align label & date time picker in a row -

Image
i have tried keep controls in same line, not falling 1 line. <div class="form-group"> <div class="col-sm-3" style="float:left" ;> <div class="form-group"> starts on : <div class='input-group date' id='datetimepicker1'> <input type='text' class="form-control" /> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> </div> <div class="col-sm-9"> <label>ends</label> <div class="form-group">

Separate matching strings from title in HTML using CSS or jQuery -

i working on project requires separation of strings titles listed. titles more 500 difficult change it. the list of doctors <div class="dr-title"><h2>dr. nicki mallmann crm 22768</h2></div> <div class="dr-title"><h2>dr. alexandre manoel varela crm 10113</h2></div> <div class="dr-title"><h2>dr. arnaldo laffitte stier junior crm 9475</h2></div> <div class="dr-title"><h2>dr. claudinei colatusso crm 19994</h2></div> all wrapped in html within h2 elements. are there possibilities can separate texts starting crm followed unique number? what looks above. want below .dr-crm { display: block; font-size: 12px; } <div class="dr-title"><h2>dr. nicki mallmann <span class="dr-crm">crm 22768</span></h2></div> <div class="dr-title"><h2>dr. alexan

python 3.x - Better way to replace values in DataFrame from large dictionary -

i have written code replaces values in dataframe values frame using dictionary, , working, using on large files, dictionary can long. few thousand pairs. when uses code runs slow, , have been going out of memory on few ocations. i convinced method of doing far optimal, , there must faster ways this. have created simple example want, slow large amounts of data. hope have simpler way this. import pandas pd #frame data want replace 'id' name df2 df1 = pd.dataframe({'id' : [1, 2, 3, 4, 5, 3, 5, 9], 'values' : [12, 32, 42, 51, 23, 14, 111, 134]}) #frame containing names linked ids df2 = pd.dataframe({'id' : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 'name' : ['id1', 'id2', 'id3', 'id4', 'id5', 'id6', 'id7', 'id8', 'id9', 'id10']}) #my current "slow" way of doing this. #starts creating dictionary df2 #need create dictionaries domain , banners tables link i

c# - Reason for 11 overloads of string.Concat -

i noticed there 11 overloads of method string.concat() public static string concat(ienumerable<string> values); public static string concat<t>(ienumerable<t> values); public static string concat(object arg0); public static string concat(params object[] args); public static string concat(params string[] values); public static string concat(object arg0, object arg1); public static string concat(string str0, string str1); public static string concat(object arg0, object arg1, object arg2); public static string concat(string str0, string str1, string str2); public static string concat(object arg0, object arg1, object arg2, object arg3); public static string concat(string str0, string str1, string str2, string str3); what reason that? both public static string concat(params object[] args); public static string concat<t>(ienumerable<t> values); should needed because same convenient/powerful. msdn doesn't give answer on , if remove 9 "duplica

javascript - Error excute react native -

i new in react native. want run friend project, got error in cmd > react-native run-android js server running. running d:\android\sdk/platform-tools/adb -s 05d6a6ba22d82a6a reverse tcp:8081 tcp:8081 adb server version (32) doesn't match client (36); killing... error: protocol fault (couldn't read status): connection reset peer but got error in cmd :react-native-fabric:preparecomandroidsupportrecyclerviewv72301library failed failure: build failed exception. * went wrong: execution failed task ':react-native-fabric:preparecomandroidsupportrecyclerviewv72301library'. > not expand zip 'd:\android\sdk\extras\android\m2repository\com\android\support\recyclerview-v7\23.0.1\recyclerview-v7-23.0.1.aar'. what problem?