Posts

Showing posts from April, 2013

javascript - rich text with non editable content, angularjs -

i use directive textangular format email notification text , stuck while task when need add non editable html inside rich text. added custom directive on textangular directive. custom directive replace special characters in string html span tags param contenteditable='false' , param doesn't work , content still editable. in case have 2 questions: how can setup non-editable html inside content textangular directive? how can concat variable string desire place (currently concats end of string) i appreciate help. plunker problem my custom directive: app.directive('removemarkers', function () { return { require: "ngmodel", link: function (scope, element, attrs, ngmodel) { element.bind('click', function (e) { var target = e.target; var parent = target.parentelement; if (parent.classlist.contains('label-danger')){ parent.remove() ...

css - HTML: making iframe height fixed -

i have page included inside iframe on domain. issue iframe loaded vertical scrollbar. checked markup , here how include iframe: <iframe class="plugin-frame js-plugin-frame" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="auto" sandbox="allow-scripts allow-forms allow-same-origin allow-popups allow-top-navigation" src="https://mydomain/mypage.html"></iframe> if change above to: <iframe class="plugin-frame js-plugin-frame" frameborder="0" marginheight="0" marginwidth="0" width="100%" min-height="600px" sandbox="allow-scripts allow-forms allow-same-origin allow-popups allow-top-navigation" src="https://mydomain/mypage.html"></iframe> it works. is there can on page make work. need rid of vertical scrollbar , have no control on third party markup. there needed in markup of i...

javascript - Angular 4 show popup onclick by other component -

i'm struggling problem , can't figure out. need show popup div situated in page clicking menu entry in navbar.component. i added property "show" in popup prints "show" class on div using ngclass (with if) directive. can working if action button inside popup component cannot print show class clicking on component. property in object updated class not printed. i'm using angular 4 ng-bootstrap. tried both services , parent/child emit event. this is situation: app.component.html <app-nav-bar></app-nav-bar> <app-login></app-login> <router-outlet></router-outlet> <app-footer></app-footer> navbar.component.html ... <button class="dropdown-item" (click)="showpopup()">login</button> ... navbar.component.ts import {component, eventemitter, input, oninit, output} '@angular/core'; @component({ moduleid: module.id, selector: 'app-nav-bar', ...

vba - Retrieving weights from scales to excel -

Image
i have connected weighing scale pc via rs-232 usb converter cable. goal create command button in excel 2007 place weight scale selected cell. got work using following code in userform. private sub xmcommcrc1_oncomm() static sinput string dim sterminator string dim buffer variant ' branch according commevent property select case xmcommcrc1.commevent case xmcomm_ev_receive buffer = xmcommcrc1.inputdata ' use input property mscomm sinput = sinput & buffer if worksheets("settings").range("terminator") = "cr/lf" sterminator = vbcrlf else sterminator = vbcr end if if right$(sinput, len(sterminator)) = sterminator xmcommcrc1.portopen = false sinput = left$(sinput, len(sinput) - len(sterminator)) select case left$(sinput, 2) case "st", "s " activecell.value = cdbl(mid$(sin...

Protractor + Appium hide android keyboard in chrome -

macos sierra 10.12.4 node - v6.9.5 appium - 1.6.0 protractor - 5.1.2 i new using appium , got basic setup working android emulator running google chrome browser. problem i'm running soft keyboard believe in way simple action logging in doesn't work off bat b/c when types in credentials keyboard in way doesn't click sign in button. workaround found clicking text field after sending keys rid of soft keyboard. hoping there easy way disable keyboard automated testing. other option hope don't have overloading sendkeys function check if it's on mobile , click textfield after sending keys. or suggestions on how solve issue appreciated. possible solution i have found extendedwebdriver info protractor api reference page i'm having difficulty finding examples of implementing use function hidesoftkeyboard alright couldn't work using protractors implementation of extendedwebdriver. said can use wd-bridge // configuring wd in onprepare // wdbri...

php - Database Design for students marks per paper -

earlier i've asked question attendance system . in same system, i'm having separate table store students marks. now, before question show i've done far: in every semester there 2 papers. there 6 semesters complete course. in first paper student can have maximum marks of 75 , second paper marks of 25. now, i've build simple table students_marks follows: name | type ------------|------- marks_id | int s_id | int sem_id | int sessionyear | varchar(11) paper_one | decimal(11,0) paper_two | decimal(11,0) now, marks_id primary key , while s_id , sem_id foreign keys 2 other tables student_info , semester . to output marks obtained this: select * `student_marks` join `student_info` on student_marks.s_id = student_info.s_id student_info.deleted = ? , `sem_id` = ? , `sessionyear` = ? order `class_roll` what didn't realize on 5th , 6th semester there 4 papers each paper maximum marks of 50. if add 2 more column above table re...

iphone - iOS - Wireless Ad-hoc distribution -

i used ad-hoc provision profile export ipa manifest file testers download web server. uploaded .ipa, .plist, images , index.html server location, like this: /var/www/html/apps/demopad.ipa /var/www/html/apps/manifest.plist /var/www/html/apps/image.png /var/www/html/apps/image-full.jpg /var/www/html/apps/index.html i send url testers ( https://www.example.com/apps/index.html ) but when open in iphone browser (safari) download, prompts message "cannot connect www.example.com" here plist contents <?xml version="1.0" encoding="utf-8"?> <!doctype plist public "-//apple//dtd plist 1.0//en" "http://www.apple.com/dtds/propertylist-1.0.dtd"> <plist version="1.0"> <dict> <key>items</key> <array> <dict> <key>assets</key> <array> <dict> <key>kin...

noindex - Android deeplinks in search results -

i have deeplinks implemented in android application using google search console, can see deeplinks works correctly in app. these fixes live , test see working correctly. when google search page, can't seem see deeplink results. know pages contain correct url mentioned above. how can test deeplinks? one thing note implemented firebase app indexing. wanted limit google crawler searching our entire site updated noindedx file , included our entire site. i have funny feeling doing causes deeplinks not appear. any appreciated.

python - Cannot open shared object file: No such file or directory error while using yara module in Virtualenv -

problem: i tried install yara in virtualenv , succesful while running app error keep on coming , tried sys link missing library error not rectified. log: (venv) root@corpus:/var/www/flaskapp/flaskapp# python __init__.py failed import '/var/www/flaskapp/flaskapp/venv/lib/libyara.so' path = /var/www/flaskapp/flaskapp/venv/bin:/var/www/flaskapp/flaskapp/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin;/var/www/flaskapp/flaskapp/venv/lib traceback (most recent call last): file "__init__.py", line 26, in <module> yara_scanner_kiran.yara_detect import yaraclass file "/var/www/flaskapp/flaskapp/ya/ya.py", line 10, in <module> import yara file "/var/www/flaskapp/flaskapp/venv/local/lib/python2.7/site-packages/yara/__init__.py", line 7, in <module> yara.rules import compile file "/var/www/flaskapp/flaskapp/venv/local/lib/python2.7/site-packages/yara/rules.py", line 17, ...

php - Error: Call to a member function setPayrollperiodid() on null -

i'm trying count number of payroll week matches payroll period entered. returns correct number won't add database instead says there's no match in database. when make changes error: error: call member function setpayrollperiodid() on null. i have outlined have far. can tell me went wrong. i have made updates question no longer error record isn't adding instead it's saying doesn't match did go wrong in controller. repository class payrollweekrepository extends entityrepository { public function findbystartdateandenddate($startdate, $enddate) { $repository = $this->getentitymanager() ->getrepository('comtwclagripayrollbundle:payrollweek'); $qb = $repository->createquerybuilder('pw'); $qb->select('pw'); $qb->where('pw.startdate=:startdate'); $qb->andwhere('pw.enddate=:enddate'); $qb->setparameter('startdate',...

php - can't wrap my head around this SQL syntax error -

hei.. can't wrap head around problem here might be. if (!$vote['vid'] , $rq['submitpoll'] , $rq['answer'] , $rq['pid']){ $my->my_query ("insert ".tbl_pf."votes (pid, aid, ip) values (".$rq['pid'].", ".$rq['answer'].", ".ip2long($_server['remote_addr']).")"); $vote['vid'] = true; the error is insert qwerty_votes (pid, aid, ip) values (1, 10, ) you have error in sql syntax; check manual corresponds mysql server version right syntax use near ')' @ line 1 maybe can enlighten me? thank much!

hadoop - Why Spark driver without executors completes an application unexpectedly after 24 hours -

we have spark application submit @ our amazon emr yarn cluster. app uses executors read input , continues job on driver container (executors shutdown within several minutes after app starts). 24 hours , near 5 minutes more after executors shutdown driver unexpectedly starts last job ( saveastextfile in our case) while data processed still remain. (i know app designed incorrectly , doesn't fit spark ideology. , know spark applications should utilize executors calculation on data.) i can't figure out causes spark or yarn drop data being processed , start last job of app. seems there 24 hours long timeout spark's or yarn's setting somewhere causes behavior described. can't find setting if exists actually. the final state of application finished , final status succeeded in hadoop cluster web ui. behavior described repeats every submit of app.

excel vba - How to save to SharePoint URL from MS Project using VBA? -

i writing macro in ms project prompts user input box containing active projects full file path. user able edit part of file path save new title or in new folder. macro saves ms project , ms excel version new file path. macro runs excel macro on newly created excel version. want macro save these files sharepoint url. my code able save sharepoint. how it? sub formatandsave() dim myvalue variant dim default dim filename string dim sharepointaddress string dim localaddress string dim wb object filename = application.activeproject.fullname 'save excel path default = filename myvalue = inputbox("your file path", default, default) if myvalue = vbnullstring msgbox ("user canceled!") exit sub end if 'show subtatsks activeproject.tasks(1).outlinehidesubtasks activeproject.tasks(1).outlineshowalltasks 'remove filters filterapply name:="all tasks" filterclear 'save project , excel under same name , path filesaveas name:=myvalue + ...

multithreading - Firebase Database Tasks do not execute after signing with Firebase Auth in Unity -

so set firebase authentication (with email , password) described in documentation. have account, can sign in , works fine long do. set realtime database. can write , read , works fine long do. except if want use 2 things together. if sign in can not write database. nothing happens. delegate passed argument continuewith method not execute. can not debug way. here do: void awake(){ firebaseapp.defaultinstance.seteditordatabaseurl( "https://****.firebaseio.com/" ); firebasedatabase db = firebasedatabase.getinstance( "https://****.firebaseio.com/" ); auth = firebase.auth.firebaseauth.getauth( firebaseapp.defaultinstance ); dbref = db.rootreference; } this setup, simple testing purposes only. avoid other issues changed read , write rules true in firebase database. i copied log in function docs. public void login( string email, string password ) { print( "logging in" ); auth.signinwithemailandpasswordasync( email, password...

Python Tkinter - Anaconda using wrong tkinter version. How to change it? -

i have gui crashes when use scroll bar, appears error: http://bugs.python.org/issue10731 it seems problem has been fixed newer versions of tkinter. when write conda list , list shows tk version 8.5.18 however, when write in code print(tk().eval('info patchlevel')) , prints version 8.5.9 i believe means interpreter not using newer version 8.5.18. couldn't find way change newer one. how can achieve this?

c# - How do I make my Web API project actually see the System.Data.SqlClient NuGet package? -

there seem number of questions related this, haven't found solution problem yet. apologize if answer here , haven't found it. i'm trying create web api project gives me middle layer between html page uploading file , sql database stores files. know it's bad approach store files in database, i'm trying make smaller test app me diagnose bigger problem in existing database can't change. i can set controller path "api/docs/save" fine, saving file in database has become of nightmare. can't seem reference "system.data" or "system.data.sqlclient" work in project. i've tried nuget packages no luck. tried making class library using normal c# .net, adding reference class library doesn't work either. how set web api project can use data base access methods i'm used to? as side note: don't have access existing front end code app, can't add test page there. need create can run locally through visual stud...

javascript - Shedulig service invokation in nifi -

i have 1 generateflowfile processor have 2 attributes userid(equals=1) , parameter (equals=5) , have service should give me repsonse each userid from(1 5) need call 5 times ,what want genreate 5 flowfile in execute script invoke service 5 times related id have tried code below doesn't work me give me advice should ? var outputstreamcallback = java.type("org.apache.nifi.processor.io.outputstreamcallback"); var standardcharsets = java.type("java.nio.charset.standardcharsets"); date.prototype.isvalid = function () { return (object.prototype.tostring.call(this) === "[object date]") && !isnan(this.gettime()); }; var flowfile = session.get(); if (flowfile != null) var userid= flowfile.getattribute('userid') //equals 1 var parameter=flowfile.getattribute('parameter')//equals5 var i=0; while(parameter<i) { var flowfile = session.get(); if (flowfile != null) flowfile = session.putattribute(...

Android Options Menu in Fragment -

i trying add item options menu group of fragments. i have created new menufragment class , extended fragments wish include menu item in. here code: public class menufragment extends fragment { menuitem fav; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); sethasoptionsmenu(true); } public void oncreateoptionsmenu(menu menu, menuinflater inflater) { fav = menu.add("add"); fav.seticon(r.drawable.btn_star_big_off); } } for reason oncreateoptionsmenu appears not run. call super method: @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); sethasoptionsmenu(true); } @override public void oncreateoptionsmenu(menu menu, menuinflater inflater) { // todo add menu entries here super.oncreateoptionsmenu(menu, inflater); } put log statements in code see if method not being called or if menu not being ...

python - OpenCV - Disable all pixel alteration when saving as JPEG -

i'm writing utility least significant bit (lsb) steganography in python (2 , 3 compatability) opencv-python package ( opencv-python==3.2.0.8 ). seems work flawlessly numerous png files i've tested, i've noticed that, seemingly no matter what, jpeg files have pixels altered every time call cv2.imwrite . here's save method lsbcodec class: class lsbcodec(object): # ... def save(self, filename): ext = filename.split(".")[-1].lower() # assumptions made if ext in ("jpg", "jpeg", "jpe"): args = [[int(cv2.imwrite_jpeg_quality), 100]] elif ext in ("png",): args = [[int(cv2.imwrite_png_compression), 0]] else: args = [] cv2.imwrite(filename, self.img, *args) however, still alters pixels. altering them 1 bit throws off entire program (since least significant bits used data , metadata storage). for example, first 3 bits should either 0...

Android Sqlite database is not updating the data?? -

i using code update values this code working without error there no error in query when show data after updating showing old data?? this code using updating data in sqlite. @override public void onclick(view v) { if (v == update) { try { contentvalues cv = new contentvalues(); cv.put("cname", editname.gettext().tostring()); cv.put("mobileno", editmobile.gettext().tostring()); cv.put("phone", editlandline.gettext().tostring()); cv.put("address", editaddress.gettext().tostring()); cv.put("email", editemail.gettext().tostring()); cv.put("picture", editbytes); db.update("contacts", cv, "cname=" + v,null); intent = new intent(ctx, contactlist.class); ctx.startactivity(i); // db.execsql("i...

Python loop through every pixel of image -

how can make below loop(s) faster? pixel pixel loop, , when run it, string of 2 print statements after loop , if-else block respectively. for in xrange(0, ncols, 1): p = img[i, row] #image[column, row] if withinrange(p): #if pixel color, or within range of colors pixelcount += 1 #print "count after initial row loop is: ", pixelcount print 'time after initial row loop ', time.time() if pixelcount == 0: # in other words, no pixels found in whole row #- take average middle row each line of text in xrange(0, ncols, 1): img[i, row] = 255 else: start = row print 'time after start = row loop', time.time() does have tips on how might optimise this? the withinrange() function boolean, looks @ whether color intensity (i'm working grayscale images) between 2 specific values, e.g. if img[x, y] between 242 , 254, true. i looked @ couple of answers seem similar, not quite this. faster way loop...

sorting - I am trying to generate 52 cards from a list and sort them in a specific order -

i trying output 52 cards in deck, , sort them in order (a-k, hearts, diamonds, clubs, spades). far have been able generate random choices, repeated cards, , sort alphabetical. here code far: import random my_deck = [] def selsort(my_deck): n = len(my_deck) bottom in range(n-1): mp = bottom in range(bottom + 1, n): if my_deck[i] < my_deck[mp]: mp = my_deck[bottom], my_deck[mp] = my_deck[mp], my_deck[bottom] while true: = input("hit enter card: ") cardnumber = random.choice( ('ace of ', '2 of ', '3 of ', '4 of ', '5 of ', '6 of ', '7 of ', '8 of ', '9 of ', '10 of ', 'jack of ', 'queen of ', 'king of ') ) suit = random.choice( ('hearts', 'diamonds', 'clubs', 'spades') ) yourcard = cardnumber + suit my_deck.append(yourcard) print(yourcard...

ajax - Passing variables inside react components then to DFP -

i building component in react - inside of component first make ajax call service , take part of response (and other variables) , use inside of function advertisement through dfp. calls dfp working expected without problems - problem in ajax response , sending correct data on dfp. i need lineitem set inside fetch , passed setpageleveltargeting() import react 'react'; import proptypes 'prop-types'; import { gpt, applygptattributes, getmediamapping } './dfphelper'; class pubadrecs extends react.component { constructor(props) { super(props); // iu_szs in request header this.sizemapping = this.props.sizemapping || getmediamapping(this.props.adsize || this.props.adname); this.setgptattributes(); this.state = { mydata: [], adrecs: false }; this.setpageleveltargeting = this.setpageleveltargeting.bind(this); this.lineitem = '123'; } componentdidmount() { const channelff = 'firefly'; const size = 'fluidx1200x100x728x90x970x90...

sql - Storing data in two CSV strings vs two db tables for fastest comparison -

the scenario have 2 lists: a: 23,45,g5,33 b: 11,12,45,g9 we want fastest mechanism in sql server see if of values b available in a, in example 45 in must return true. the solution should describe way store lists (csv, tables etc.) , comparison mechanism. each list relatively small (average 10 values in each) comparison being made many many times (very few writes, many many reads) if stuck delimited string, consider following: example: declare @yourtable table ([cola] varchar(50),[colb] varchar(50)) insert @yourtable values ('23,45,g5,33' ,'11,12,45,g9') ,('no,match' ,'found,here') select * @yourtable cross apply ( select match=isnull(sum(1),0) [dbo].[udf-str-parse-8k](cola,',') b1 join [dbo].[udf-str-parse-8k](colb,',') b2 on b1.retval=b2.retval ) b returns cola colb match 23,45,g5,33 11,12,45,g9 1 no,match ...

html5 - php - formatting a link correctly -

i have question optical problem have php. i'm echoing filename function: echo $name."<a href='download.php?dow=$path'>download</a><br>"; the download link appears directly behind file name test.txtdownload . how add spaces there or how possible put download link 'next column' there listed correctly among themselves? you can play around this: <?php echo $name."<a class='link' href='download.php?dow=$path'>download</a><br>"; ?> style: <style type="text/css"> a.link { margin-left: 10px; } </style> or : <?php echo $name." <a class='link' href='download.php?dow=$path'>download</a><br>"; ?> but suggest use css can managed, while normal space not.

java - Why JLabel has zero height when using SpringLayout? -

Image
i new in java ui design , try use springlayout create form. put jlabel in jframe , added constraints. need jlabel stratches jpanel width. has 0 height. , small width. here code fragment: imagecontainer = new jlabel(); imagecontainer.setborder(borderfactory.createlineborder(color.black)); filterbutton = new jbutton("filter"); filterbutton.addactionlistener(filter); layout.putconstraint(springlayout.west, imagecontainer, 5, springlayout.west, this); layout.putconstraint(springlayout.north, imagecontainer, 5, springlayout.north, this); layout.putconstraint(springlayout.east, imagecontainer, 5, springlayout.east, this); layout.putconstraint(springlayout.west, filterbutton, 5, springlayout.west, this); layout.putconstraint(springlayout.north, filterbutton, 5, springlayout.south, imagecontainer); layout.putconstraint(springlayout.south, filterbutton, 5, springlayout.south, this); and result where did go wrong? how stretch jlabel size parent container? ...

javascript - Canvas getImageData returning incorrect data on certain mobile devices -

Image
i working on canvas video player special features based on frames of video. overcome unreliable timing in video html5 tag videos using have barcode embedded in each frame indicating current frame number. using canvas getimagedata method can grab pixels , read barcode frame number. works great , have jsfiddle demonstrating works (i couldn't around cors in fiddle serve video canvas see working you'll have download example video locally upload via button. not ideal works). on mobile devices (only android far) logic breaks. getimagedata returns incorrect values. it works correctly on samsung galaxy s5 v6.0.1 fails on google pixel running android v7.1.2. i'll try collect more data on devices/os versions fails on. for example, when playing on desktop first iteration of getimagedata returns: uint8clampedarray(64) [3, 2, 3, 255, 255, 255, 255, 255, 246, 245, 247, 255, 243, 242, 243, 255, 241, 239, 241, 255, 242, 240, 242, 255, 242, 240, 242, 255, 242, 240, 242, 255, 24...

php - Laravel image not shown on server and working fine on my local machine -

on local machine project working file when uploaded on server images not shown, , notfoundhttpexception error when hit full image path browser. mypath project as /public_html/offlinemall/public and below filesystems.php 'disks' => [ 'local' => [ 'driver' => 'local', 'root' => storage_path('app'), ], 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), 'url' => env('app_url').'/storage', 'visibility' => 'public', ], 's3' => [ 'driver' => 's3', 'key' => env('aws_key'), 'secret' => env('aws_secret'), 'region' => env('aws_region'), 'bucket' => env('aws_bucket'), ], 'featured' ...

javascript - How to access a local variable inside a callback to outside the function -

this question has answer here: how return response asynchronous call? 21 answers why variable unaltered after modify inside of function? - asynchronous code reference 6 answers im using npm plaid , want able have access variable trans outside plaidclient.gettransactions . thanks var trans; var startdate = moment().subtract(30, 'days').format('yyyy-mm-dd'); var enddate = moment().format('yyyy-mm-dd'); plaidclient.gettransactions(accesstoken, startdate, enddate, { count: 250, offset: 0, }, function(error, transactionsresponse) { if (error != null) { console.log(json.stringify(error)); return response.json({ error: error }); } var trans = transactionsresponse }); var trans //should work here ...

events - Issue with @Output in angular -

Image
​hi trying throw 1 event second component first component not able event in first component , able catch event in app component.is there limitation of can catch event child app component only.thanks in advance. i catching event ​ <second-app (newevent) = "onemit($event)"></second-app> please find folder structure: second.component first.component app.component you can use @output event processing communication between nested (child) component , parent component. to communicate between sibling components or unrelated components, can use service. have example service here: https://blogs.msmvps.com/deborahk/build-a-simple-angular-service-to-share-data/ the plunker here: https://plnkr.co/edit/kt4jlmpcwgbm2xdzqei9?p=preview the service looks this: import { injectable } '@angular/core'; @injectable() export class dataservice { servicedata: string; }

python 3.x - Efficiently reading multiple csv files into Pandas dataframe -

i trying read 3 years of data files (one each date), , portion interested quite small (total ~1.4 million rows), compared parent files (each 90mb , 1.5 million rows). below code has worked pretty me in past smaller number of files. 1095 files process, crawling (taking 3-4 seconds read 1 file). suggestions making more efficient/fast? import pandas pd glob import glob file_list = glob(r'c:\temp2\dl*.csv') file in file_list: print(file) df = pd.read_csv(file, header=none) df = df[[0,1,3,4,5]] df2 = df[df[0].isin(det_list)] if file_list[0]==file: rawdf = df2 else: rawdf = rawdf.append(df2) iiuc, try this: import pandas pd glob import glob file_list = glob(r'c:\temp2\dl*.csv') cols = [0,1,3,4,5] df = pd.concat([pd.read_csv(f, header=none, usecols=cols) .add_prefix('c') .query("c0 in @det_list") f in file_list], ignore_index=tru...

calculator - Splitting calculations in a stack C++ -

i trying learn c++. have created calculator allows 1 line text input, splits string , performs calculation depending on operator. syntax 5*2 of course return 10. next step allow multiple operators in same line i.e. 5*2/4 advise on how might this? imagine looping or push/pop have no idea route work best. understand there many calculators such reverse polish notation wondered if me 1 in particular. thanks. #include <iostream> using namespace std; int main() { while (true) { string str; float eq1; float eq2; cout << "request: " << flush; cin >> str; if (str.find('/') != string::npos) { int pos = str.find("/"); string sub1 = str.substr(0, pos); eq1 = stof(sub1); string sub2 = str.substr(pos + 1); eq2 = stof(sub2); cout << eq1 / eq2 << endl; } else if (str.find('*') != ...

windows 10 - Why is the project "Rename..." button grayed out? -

Image
i wanted rename projects in rider rename... button in context menu inactive. doing wrong? shortcut ctrl+r,r doesn't work. it's asp.net core project , i'm using rider has been released. solution created visual studio 2017 , added other projects rider new projects cannot renamed. works on files not on projects or solution folders. because not implemented: https://youtrack.jetbrains.com/issue/rider-1224

JavaScript function inside HTML display in browser -

i have problem regarding javascript code. i'm trying output sum in browser, doesn't work. tried every way of displaying message in javascript: console.log() , document.write() , document.getelementbyid() . none of seems work. code looks okay, won't output anything. can me, please? <!doctype html> <meta charset="utf-8"> <html> <head> <script type="text/javascript"> var sum = 0; for(var = 0; < 1000; i++){ if(i%3 === 0 || i%5 === 0) { sum += i; } console.log('the sum is' + " " +sum); } </script> </head> </html> this code works fine here. i'm running ie11 , sum displays in console no problem. see snippet below; nothing has been changed. maybe need open dev console? f12 in ie/edge, or settings > developer tools > console in chrome (i think). <!doctype html> <meta charset=...

html - Display div right next to centered text -

i have following html code <div id='main'> question title <div id='tooltip'>?</div> </div> question title centered inside of main container. want tooltip div appear right next centered text inside main container, while main container can arbitrarily large. how can achieve this? found similar issues on none of solutions worked case change display property of #tooltip div "inline-block". make appear directly after text on same line

php - Wordpress loop stopping Advanced Custom Fields that run after it -

i'm having problem after have ran while loop thumbnail images advanced custom fields run after loop don't display. i'm assuming fix similar here stackoverflow question cant life of me work out. here's section loop. i'm using inside div can change background of div. anyone know problem? gist here <section id="portfolio"> <h3>projects</h3> <div class="card-container"> <?php global $query_string; query_posts ('posts_per_page=3'); while(have_posts()) : the_post(); ?> <div class="outer"> <div class="target"> <div class="card"> <div class="front"> <div class="thumbnail" <?php if ( $id = get_post_thumbnail_id() ) { ...

php - Wordpress: Getting Posts From A Category Using Category Name/Slug -

i trying display wordpress posts particular category, on non wordpress part of site, retrieving posts category name/slug. please note, cannot use category id, because dynamically matching slug using category structure on non wp part of site. the following works, seems retrieve posts category, rather united-states category. going wrong. <div class="row"> <div class="small-12 columns"> <div class="row small-up-1 medium-up-3 large-up-3"> <?php require($_server['document_root'] . '/blog/wp-load.php'); $args = array( 'category_name' => united-states, 'posts_per_page' => 3 ); $latest_posts = new wp_query( $args ); if ( $latest_posts->have_posts() ) { while ( $latest_posts-...

OAuth with Azure AD v2.0: Missing at_hash claim in Azure AD v2.0 id_token -

according azure ad documentation , azure ad v2.0 id token should contain access token hash, at_hash claim, when id token issued access token. however appears at_hash claim missing id token. after calling azure ad access token request v2.0 endpoint https://login.microsoftonline.com/{my_tenant}/oauth2/v2.0/token , id_token returned azure not contain at_hash claim although access token issued. example of response body returned azure ad v2.0: "token_type": "bearer", "scope": "user.read", "expires_in": 3599, "ext_expires_in": 0, "access_token": "eyj0exaio ...", "refresh_token": "oaqabaaaaaaa9ktklh ..." "id_token": "eyj0exaioijkv1qilc ..." the id_token contained following claims. did not contain at_hash claim. "aud": "... guid ... ", "iss": "https://login.microsoftonline.com/.../v2.0", "iat...

android - Chrome Custom Tabs Initial Okta Auth Not Redirecting Back -

Image
i'm in process of implementing sso on android app in we're using okta identity management while in development. have okta set that, after successful user/password authentication, user has validate password on subsequent logins. i'm using chrome custom tabs open browser url , have set correct intent-filter configuration in androidmanifest. the issue i'm having initial auth screen not redirect app , err_unkown_url_scheme error page. however, when authenticating password validation screen, app scheme recognized , user redirected app. also note: err_unkown_url_scheme error page, if select "open in chrome", app picks redirect , i'm put app. leads me believe may custom tabs issue. the code launch chrome custom tabs looks following: customtabsintent customtabsintent = new customtabsintent.builder(mctsession) .settoolbarcolor(contextcompat.getcolor(mcontext, r.color.colorprimary)) .setstartanimations(context, r.anim.slide_...

machine learning - OpenCV 3.0 RTrees Priors Not working? -

i have binary classification problems , i'm using rtrees train classifier. bias classification towards 1 of classes , documentation appears setting of "priors" allow me so. however, when use different weight class, results arent different when priors set empty mat. could please let me know how priors used , how set them up?

sql server - hard time trying to discover whats wrong with a sp_executesql with params -

i'm trying create stored procedure drop triggers follow name schema basead on table name (after create trigger). so, first, tried use cursor list tables ends __attach , check if table has trigger name starts update_att_name__ , , if exists, drop trigger. my sp: declare @table_name nvarchar(max); declare @trigger_name nvarchar(max); declare tables_cursor cursor select table_name information_schema.tables table_type = 'base table' , table_name '%attach' read only; open tables_cursor fetch next tables_cursor @table_name while @@fetch_status = 0 begin /* check if trigger exists */ set @trigger_name = concat('update_att_name__', @table_name); if (exists(select * sys.triggers object_id = object_id(@trigger_name))) /* drop trigger */ begin declare @sql nvarchar(max); declare @param nvarchar(max); set @sql = n'drop trigger @tn'; set @param = n'@tn nvarchar(max)'; ...

How to find your scripts -

how search google drive google apps scripts? when try use search options, scripts not listed in search type drop-down. finding files bound scripts associated (the script embedded in file) can done looking @ account's permissions. list every file has had sort of permission request. if bound script not require permissions granted, know of no way finding file. see files have granted permission to, use link: https://myaccount.google.com/permissions if scripts not bound file, such spreadsheet, searching type:script give list of stand alone script files.

postgresql - Error while trying to run phoenix server -

i keep getting error whenever try run phoenix server mix phx.server. [error] #pid<0.446.0> running citybuilder.web.endpoint terminated server: 0.0.0.0:8080 (http) request: / ** (exit) exception raised: ** (postgrex.error) error 42p01 (undefined_table): relation "stories_topics" not exist (ecto) lib/ecto/adapters/sql.ex:436: ecto.adapters.sql.execute_and_cache/7 (ecto) lib/ecto/repo/queryable.ex:130: ecto.repo.queryable.execute/5 (ecto) lib/ecto/repo/queryable.ex:35: ecto.repo.queryable.all/4 (citybuilder) lib/citybuilder/web/controllers/post_controller.ex:148: citybuilder.web.postcontroller.set_topics/2 (citybuilder) lib/citybuilder/web/controllers/post_controller.ex:1: citybuilder.web.postcontroller.phoenix_controller_pipeline/2 (citybuilder) lib/citybuilder/web/endpoint.ex:1: citybuilder.web.endpoint.instrument/4 (phoenix) lib/phoenix/router.ex:277: phoenix.router. call /1 (citybuilder) lib/city...