Posts

Showing posts from May, 2012

php - [Resloved]Font size won't grow big -

i have been trying make fonts size bigger in website. trying css,html , php not work. need big,i have tried coding in other website website won't work in website,am doing wrong or missing something? here code trying add in css body { background-color: #d0e4fe; } h1 { color: orange; text-align: center; } p { font-family: "times new roman"; font-size: 2100; } which works in other website not in my. html <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>spelling bee 2015</title> <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> <?php $usernames = filter_input(input_get, "words"); switch($usernames){ case '1': echo "<

Shibboleth with Azure -

i trying follow documentation on integrating shibboleth idp 3 azure sso purposes, , in application receive exception when try acquire token (acquiretoken()): an unhandled exception of type 'microsoft.identitymodel.clients.activedirectory.adalexception' occurred in microsoft.identitymodel.clients.activedirectory.dll additional information: missing_federation_metadata_url: federation metadata url missing federated user. user type unsupported. i trying understand telling me. best can tell it's expecting me upload metadata in acs (access control service) not see documented anywhere. means? if so, how can right metadata upload? in shibboleth, can find boilerplate metadata. if i'm going down wrong path, clarify? edit: please note i'm doing investigation, , i'm pretty new setting federated setup. may doing totally wrong. i've done far, , issues i've identified. set domain in azure, , connected onprem domain using azure connect t

android - Go back to previous fragment -

btw second fragment. appear once press button in first fragment. in fragment, if press button on phone, go previous fragment. need guys. in advance. public class listalldoctorfragment extends fragment { button close; @nullable @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view view = inflater.inflate(r.layout.listalldoctor, container,false); close = (button) view.findviewbyid(r.id.button); close.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { android.app.fragmentmanager fm = getfragmentmanager(); fragmenttransaction ft = fm.begintransaction(); shit f2 = new shit(); ft.add(r.id.content_frame, f2); ft.addtobackstack(null); ft.commit(); } }); return view; } } assuming want g

matrix - Elementwise median of list of matrices in R -

given list of matrices: temp <- list(matrix(c(1,8,3,400), 2), matrix(c(5,2,300,14),2), matrix(c(100,200,12,4),2) ) temp # [[1]] # [,1] [,2] # [1,] 1 3 # [2,] 8 400 # # [[2]] # [,1] [,2] # [1,] 5 300 # [2,] 2 14 # # [[3]] # [,1] [,2] # [1,] 100 12 # [2,] 200 4 i want element-wise median of matrices: [,1] [,2] [1,] 5 12 [2,] 8 14 can done without explicit loops? first, put array: library(abind) <- do.call(abind, c(temp, list(along=3))) then use apply : apply(a, 1:2, median) # [,1] [,2] # [1,] 5 12 # [2,] 8 14 as @richardscriven suggests, can build a without abind package: a <- array(unlist(temp), c(2, 2, 3)) # or <- array(unlist(temp), c(dim(temp[[1]]), length(temp)))

regex - regexp accepts either all numbers or all letters -

i need regexp works this: accepts strings made of numbers or letters (for example: "111111111111","aaaaaaaa", not "aaaaa11111"). i tried /(^[0-9]+$) | (^[a-z]$)/.test('111111111111') , not working though. what's right way ? first, remove spaces, , second, [a-z] lacking + . so, working version is: /(^[0-9]+$)|(^[a-z]+$)/

java - Alternative way to replace 'Thread.sleep(5000)' -

is there alternative way replace 'thread.sleep(5000)'? currently, commentsbutton clicks once , move on codes repliesbutton though there other elements commentsbutton? thought because of 'thread.sleep(5000)' page not done loading. if(commentsbutton.size() > 0) { commentsbutton.get(0).click(); //click on button if found thread.sleep(5000); //pause 5 seconds } else clickmore = false; if(repliesbutton.size() > 0) { repliesbutton.get(0).click(); //click on button if found thread.sleep(5000); //pause 5 seconds } else clickmore = false; if(seemorebutton.size() > 0) { seemorebutton.get(0).click(); //click on button if found thread.sleep(5000); //pause 5 seconds } else clickmore = false; } you can use loop this, have understand

autohotkey - Eclipse window doesn't activate if it's minimized -

i'm using following code works fine; swaps front if it's behind other windows, opens if it's closed. doesn't swap front if it's been minimized. !j:: if winexist("ahk_exe eclipse.exe") { winactivate } else { run, "c:\program files (x86)\eclipse\eclipse.exe" } return i have same code other programs works fine if window's been minimized. why isn't working eclipse , how can make work? found working method: !j:: wingettitle, title, ahk_class swt_window0 if instr(title, "eclipse") { winactivate, ahk_class swt_window0 } else { run, "c:\program files (x86)\eclipse\eclipse.exe" } return

html - Javascript conversion not working -

when click on mbtc , try click btc doesn't work. if go bit or sat , btc works fine. don't understand why isn't converting mbtc btc. maybe convertmbtc function? var sat = 0.00000001; var bit = 0.000001; var mbit = 0.001; var btc = 1; var currentunit = btc; function changecolor(div) { document.getelementbyid('satoshibox').style.background = '#29b8ff'; document.getelementbyid('bitbox').style.background = '#29b8ff'; document.getelementbyid('btcbox').style.background = '#29b8ff'; document.getelementbyid('mbtcbox').style.background = '#29b8ff'; document.getelementbyid(div).style.background = '#ed546a'; } function satoshiconvert(input) { if (currentunit != sat) { input.value = (convertbtc(input.value) / sat).tofixed(0); currentunit = sat; changecolor('satoshibox'); btcconvert(input); } } function bitconvert(input) { if (currentunit

c# - How do I real time communicate a Universal Windows App with a older .Net 4.5 app in the same solution. IPC? -

Image
i have been struggling on month, learning. here have: c# solution 3 projects -universal windows platform app (cortana voice support) ::above shows floating png image , cortana enabled -universal windows service (cortana background service) ::needed cortana support -.net 4.5 c# app html dom automation ::automates locating elements , clicking of website i can't re-code .net app's functionality in universal app because of libraries uses won't install. (ghostdriver, phantomjs, , hotkey library provided via nuget. installing on universal platform fails on 3 libraries). what needed: -master universal windows app or service sends signal .net app -.net app receives signal , calls method/function providing functionality. i've never tried calling methods in other apps within same solution , wondering if there few-code workaround. need think method of inter process communication or events, can't find examples of uwp. .net communicating other older non unive

Running a Java Program Referencing OpenCV's Jar File -

i'm finding impossible run program that's relying on opencv jar file. have compiled "javac -cp opencv-300.jar *.java", trying run java program meant couldn't find main class, ran java program.program threw exceptions regarding finding opencv classes. i tried java "-djava.library.path=". -jar opencv-300.jar returned "no main manifest attribute, in opencv-300.jar". tried uncompiling jar , running java -cp . program.program , returned "unsatisfiedlinkerror: no opencv_java300 in java.library.path", seems terrible path. does have clue how can make damn thing run? trying on windows 8 , ubuntu 14.04lts, identical results on both. please help! edit: can upload public dropbox link people can see if help. you need package static library jar file, load static library temperory file, , load static library path. make folder in resources named opencv , place .dll , .dylib , .so files in respective folders. public class load

wso2 am - javax.servlet.jsp.JspException: IO Error executing tag: JSPException while including path '/generic-sts/sts.jsp' -

enviroments: wso2 api manager 1.9.1 os: ubuntu 12.08 jdk: 1.7 problem: when tried add service provider on carbon web console , enabled saml2 web sso configuration , clicked configurate had error next message: [2015-10-27 17:32:42,713] error - applicationdispatcher servlet.service() servlet bridgeservlet threw exception java.io.filenotfoundexception: /sso-saml/add_service_provider.jsp @ org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:463) @ org.apache.jasper.servlet.jspservlet.service(jspservlet.java:378) @ javax.servlet.http.httpservlet.service(httpservlet.java:848) @ org.wso2.carbon.ui.jspservlet.service(jspservlet.java:155) @ org.wso2.carbon.ui.tilesjspservlet.service(tilesjspservlet.java:80) @ javax.servlet.http.httpservlet.service(httpservlet.java:848) @ org.eclipse.equinox.http.helper.contextpathservletadaptor.service(contextpathservletadaptor.java:37) @ org.eclipse.equinox.http.servlet.internal.servletregistratio

php - codeigniter CSRF error -

i'm trying use codeigniter csrf protection enabled. i've read answered solutions here , here didnt seem resolve issue. @ point "action requested not allowed" error solved, doesnt load form validation helper. throws 'unable load requested file: helpers/form_validation_helper.php` must have gone wrong? here's controller file: class home extends ci_controller { function __construct(){ parent::__construct(); $this->load->helper('form'); } public function index(){ $data['title'] = "home"; $data['main_content'] = 'frontend/index'; $this->load->view("frontend/includes/template", $data); } public function contact(){ $data['title'] = "contact us"; $data['main_content'] = 'frontend/contact'; $this->load->view('frontend/includes/template', $data); } //submit functions public function contact_submit(){ $sen

Updated Excel sheet through Eclipse IDE -

i have placed excel file in eclipse (luna) work space appears in folder structure of ide. if try update sheet through ide changes don't saved. there anyway can save changes when sheet opened eclipse? this problem not occur me spring tool suite 3.3.0 , edit seen outside of sts. it's either configuration issue or bug. have tried right click , open system editor? launch excel external ide.

c# - Fibonacci's recurrence relation loss of precision on big digits -

i'm trying use binet's formula solve fibonacci's n th number o(1) time complexity. class application { static void main(string[] c) { console.writeline($"fib(15) : expected 610 got : {fibonacci(15)}"); console.writeline($"fib(20) : expected 6765 got : {fibonacci(20)}"); console.writeline($"fib(100) : expected 354224848179261915075 got : {fibonacci(100)}"); console.readkey(); } private static biginteger fibonacci(int n) { double sqrt5 = math.sqrt(5d); return new biginteger((1/sqrt5)*math.pow((1 + sqrt5)/2, n) - (1/sqrt5)*math.pow((1 - sqrt5)/2, n)); } } the following example works charm first 2 tests, fails quite huge amount third test (result 354224848179263111168 vs. 354224848179261915075 . i guess might problem math.pow((1+sqrt5)/2,n) part of formula, tried using formula using decimal , double , float , biginteger itself, , result never one. is

regex - Can i get a appropriate regular expression for the following string in java with the following condition -

the test string is it test data %warning: portfast should enabled on ports connected single host. connecting hubs, concentrators, switches, bridges, etc. interface when portfast enabled can cause temporary bridging loops. use caution test test. the string invalid if string has % symbol in it. valid if % followed following sequence of characters, "%warning: portfast should enabled on ports connected single\n host. connecting hubs, concentrators, switches, bridges, etc. this\n interface when portfast enabled can cause temporary bridging loops.\n use caution".even in case '%' symbol can present once. my code is: public class abc { public static void main(string[] args) { string reg="%(warning: portfast should enabled on ports connected single\n host. connecting hubs, concentrators, switches, bridges, etc. this\n interface when portfast enabled can cause temporary bridging loops.\n use caution)([^%])"; string str = "%wa

php - How add balance in mangopay wallet? -

i have been working on mangopay php sdk. have created normal/legal users using same sdk. but stuck in transfer api. can not perform transaction. have crated multiple users , corresponding wallet can see sandbox dashboard . cannot add balance in wallet user. can please me out , clear me mangopay flow. i found 1 more dashboard , don't know how related sandbox. each time try transfer money 1 user user error : no sufficient balance in wallet. (of course because can not add amount particular user) please me out here. thanks. looking in mangopay sample code, functionality this. have make sure wallet ids valid. $mangopayapi = new \mangopay\mangopayapi(); $mangopayapi->config->clientid = "mangopayuser"; $mangopayapi->config->clientpassword = "mangopaypassword"; $mangopayapi->config->temporaryfolder = "cache/dir/path"; $transfer = new \mangopay\transfer(); $transfer->authorid = $authorid; $transfer->debitedfun

How to get the number of forks of a GitHub repo with the GitHub API? -

i use github api v3 forks count repository, use: get /repos/:owner/:repo/forks the request bring me 30 results if repository contain more, googled little , found due memory restrict api return 30 results per page, , if want next results have specify number of page. only me don't need information, need number of forks. there way number of forks? because if start loop page per page script risque crash if repository contain thousand results. you can try , use search query. for instance, repo vonc/b2d , use: https://api.github.com/search/repositories?q=user%3avonc+repo%3ab2d+b2d the json answer gives me "forks_count": 5 here 1 more 4000 forks (consider first result, meaning 1 " full_name " " strongloop/express ") https://api.github.com/search/repositories?q=user%3astrongloop+repo%3aexpress+express "forks_count": 4114,

java - Round Double value in Swing -

i have mentioned code given below.my question @ data.setvalueat(28.7567, 1, 1); value should displayed 28.757 taking 28.7567000000000 jtable.class adding zero's or other class there consider value double , how resove problem? import java.awt.color; import javax.swing.imageicon; import javax.swing.jframe; import javax.swing.jscrollpane; import javax.swing.jtable; import util.leveleditor.components.letablemodel; public class jrtest { public static void main(string args[]) { object[][] datal = new object[30][30]; object[] titles = new object[30]; letablemodel model = new letablemodel(datal, titles); jtable data = new jtable(model); data.setfillsviewportheight(true); data.setautoresizemode(jtable.auto_resize_off); data.setshowgrid(true); data.setgridcolor(color.black); data.settableheader(null); jframe frame = new jframe("test"); frame.add(new jscrollpane(data)); data.setvalueat(28.7567, 1, 1); frame.pack(

php - Google drive api add shared folder to my files -

i'm creating php script create folders within google drive account. once folder created then share using permissions, other users of google apps domain. i've created part successfully, need add function can done througth ui, can't find way via api: want add folder files section of users (possibly in sub folder) throught ui can done going "files shared me" section, right clicking , selecting "add file" how can programmatically? there's way? edit i want programmatically in users directory http://i.stack.imgur.com/ii3q6.png at moment, can create file , folder in users directory, don't know how add folder shared other users i've found answer question. left here, if need ;) to add shared folder of user a, in user b "my files", need access drive api using user b, shared folder (it has same id has in user instance), , add parent of folder root dir, or folder inside user b drive. $about = $userbserviceinstance-

javascript - MVC - Add / Remove a style when the user arrives on, or leaves, the home page -

i have mvc app, _layout.cshtml page looks follows (only showing relevant part): <body> <div id="wrapper"> <div class="navbar navbar-inverse navbar-fixed-top container" style="background-image: url(/images/headerbar.png); background-size: cover;"> <div class="container"> <div class="navbar-header"> when user leaves home page, want style see in div present. however, when user arrives on home page, want style removed. there clean , simple way this? in _layout.cshtml can check viewcontext.routedata["action"] or viewcontext.routedata["controller"] or viewcontext.controller.gettype() values , conditionally something. for example: <div class="navbar navbar-inverse navbar-fixed-top container" id="sidebar" style="@(viewcontext.controller.gettype() == typeof (homecontroller) ? "background-image: url(

Android: While doing Wi-Fi authentication showing issue with NEXUS -

i doing wifi authentication below code: string networkpass = constants.password; wificonfiguration conf = new wificonfiguration(); conf.ssid = "\"" + myssidname + "\""; conf.presharedkey = "\""+ networkpass +"\""; wifi.addnetwork(conf); list<wificonfiguration> list = wifi.getconfigurednetworks(); wifi.disconnect(); for( wificonfiguration : list ) { if(i.ssid != null && i.ssid.equals("\"" + myssidname + "\"")) { wifi.enablenetwork(i.networkid, true); break; } } wifi.reconnect(); it working fine , no issue htc , motorola when trying authenticate nexus(motorola nexus 6 & 7),its not working. idea appreciated.thank :)

Facebook Javascript SDK: Why do I need a 'app-id' when invoking FB.init()? -

on this page there quickstart of facebook's javascript sdk. don't understand why there has "app-id" in parameter. trying build share button on page using javascript sdk, don't have facebook app. using app id allows facebook track , manage usage of sdk. anytime you're making call service, want/need way identify call coming , how it's being used. creating app id simple, though. go https://developers.facebook.com/ , click on myapps @ top. there option in drop-down add new app. need add couple pieces of info started , app id generated. can add more info page or site if want to. if want add share button without messing that, use normal button configurator: https://developers.facebook.com/docs/plugins/like-button

amazon ec2 - Mount s3 bucket in ec2 windows instance -

i have website configured on ec2 windows instance. want mount s3 bucket windows ec2 instance without using third party paid tools. suggestions? you can follow steps given here: http://sharadchhetri.com/2013/03/08/how-to-mount-s3-bucket-in-linux-ec2-instance/ http://juliensimon.blogspot.in/2013/08/howto-aws-mount-s3-buckets-from-linux.html why don't rather host website directly s3 if content static? btw s3fs pretty solid implementation.

html - CSS class selectors not changing anything -

this question has answer here: which characters valid in css class names/selectors? 8 answers i'm having problems css. should set colour of div class (for countdown), colour of text isn't changing. i've tried numerous fixes, can't working. here relevant css: .10seconds, .9seconds, .8seconds, .7seconds, .6seconds { color: #00b200 ;} .5seconds { color: #adff2f ;} .4seconds { color: #e5e500 ;} .3seconds { color: #ffa500 ;} .2seconds { color: #ff5719 ;} .1seconds { color: #ff0000;} and relevant html: <div id='timer' class='10seconds'>10</div> #timer has no set rules in css file. full css here . thanks in advance. it's because class names begin number, not allowed in css. revert name , number, eg: .sec5{ color: green; } <div class="sec5"> 5 sec </div> look @ ques

node.js - Change from child process exec to spawn dont work -

i use child process exec , need switch child process spawn this working me. var child = child_process.exec("npm install express --save" options, function (error, stdout, stderr) { ..... }); when switch spawn doesnt work got error var child = child_process.spawn("npm install express --save" options); error: spawn npm enoent @ exports._errnoexception (util.js:746:11) @ process.childprocess._handle.onexit (child_process.js:1053:32) @ child_process.js:1144:20 i try var child = child_process.spawn("npm", ["install express --save"], options) ; and doesnt work me, can issue? i guess on windows environment. so, have enter terminal , use commands want. we see in node.js docs child_process.exec() method has spec in options default according operating system. shell string shell execute command (default: '/bin/sh' on unix, 'cmd.exe' on windows, shell should understand -c switch on un

http - Listen to multiple port httpd fedora -

how set httpd listen multiple port in apache ports.conf i wanted add virtual host available on ports edit default config file: vim /etc/httpd/conf/httpd.conf <-- requires root privileges and add: listen 80 listen 81 .... listen 8x now, vhosts: <virtualhost *:80> servername server1 <-- needs in /etc/hosts file documentroot /var/www/project1 </virtualhost> <virtualhost *:81> servername server2 <-- needs in /etc/hosts file documentroot /var/www/project2 </virtualhost> after this, make sure restart httpd: /etc/init.d/httpd restart <-- requires root privileges finally, access 2 sites like: http://server1:80 , http://server2:81 update: fedora requires update selinux policy, allowing httpd access non-default ports (like 90, instance): semanage port -a -t http_port_t -p tcp 90 <-- requires root privileges

width - Why table's tr don't want to be 100% in thead when its position absolute -

help me please. need table's thead fixed. cant change html, have 1 problem. why tr don't want 100%, width content. must save same style , html code. .row { margin: 0; width: 100%; height: auto; overflow: hidden; flex-grow: 0; flex-shrink: 0; position: relative; padding-top: 50px; box-sizing: border-box; overflow: hidden; margin-top: 7px; } .content_body { display: flex; flex-direction: column; flex-wrap: nowrap; flex-grow: 0; flex-shrink: 1; width: 100%; height: 100px; overflow: auto; padding-bottom: 5px; } table{ width: 100%; border: 1px solid #dcdcdc; box-sizing: border-box; border-collapse: collapse; } table tr { width: 100%; } table thead { color: #a2a1a1; background: none; vertical-align: middle; } table thead th { font-size: 1.2em; font-weight: normal; text-align: center; border: 1px solid

ggplot2 - "Regions defined for each Polygons" when mapping shp with R -

i'm trying visualize land polygons natural earth landdata2<-readogr("/home/pavel/documents/studium/hiwi/maps/ne_10m_land", "ne_10m_land") landgg2<- fortify(landdata2) after second line message "regions defined each polygons" i fortified post of no use why ggplot give blank page message "regions defined each polygons"? i got data http://www.naturalearthdata.com/downloads/10m-physical-vectors/ used simple (not scale ranked) polygons does know means? best regards pavel ok, went fast. following post filling polygons of map using ggplot in r the problem seems fortify not transfer id numeric variable simply adding landgg$id <-as.numeric(landgg$id) helps still not sure why message comes out , why true parts of data frame after "hole" variable (id, piece , group variable) problem fortify works. thought i'd leave here instead of deleting

keyboard - Letters/digits are being deleted as I type. Why? -

this isn't development issue, had no idea other turn here: issue whenever type, whatever have typed dissapears. i working on getting c++ sdl lazyfoo working android development, when halfway through process laptop's keyboard started acting up. deleting commands typing in cmd, deleting code, etc. know it's not issue 'insert' key, that's out of question. does know issue here can be? looking on google gives me issues people having pressed 'insert' while typing in ms-word. i'll try usb keyboard in sec , update in on issue. did spill on keyboard? maybe delete key sticking. my laptop had battery swell , interfere keyboard. it's possible maybe battery going. the usb keyboard sounds thing try. may still happen if laptop keyboard being triggered somehow though. good luck!

java - FATAL exception, application stopped error -

i getting fatal exception error in logcat , application stopping when run. java package com.example.parth.editcal; import android.os.bundle; import android.support.v7.app.appcompatactivity; import android.view.view; import android.view.menu; import android.view.menuitem; import android.widget.edittext; import android.widget.button; import android.widget.textview; public class mainactivity extends appcompatactivity { public static int a,b,x,t1,t2 ; public static edittext tt ; public static textview ans ; /* int p = { , b ,x } if (p[4] == 0 && p[5] == 0){ p[1] = p[3]; p[4] = 1; } else if(p[4] == 1 && p[5] ==0 ){ p[1] = p[3]; p[5] = 1; } if (p[4] == 1 && p[5] == 1){ p[2] = p[3] ; p[1] = p[1] + p[2] ; p[5] = 2; } p[3] = 0 ; */ public static int logica(){ if (t1 == 0 && t2 == 0){ = x; t1 = 1; } else if(t1 == 1 && t2 ==0 ){ = x; t2 = 1; } i

sql server - Column name or number of supplied values does not match table definition during execution plan on -

Image
currently facing issue when executing stored procedure keeping include actual execution plan - on . otherwise stored procedure executing fine , returning results expected. reason kind of behavior? i have went through links error different here occurs when have kept include actual execution plan - on . link1 link2 sample code (proc1) - create procedure proc1 (blah blah blah) begin begin try ------------- code -------------- -----issue code----- insert #temptable (col1,col2,.....) execute proc2 ------------- code -------------- end try begin catch --------- raiserror(............); end catch end sample code (proc2) - create procedure proc2 begin begin try --------------- code --------------- select col1,col2,col3,..... #innersptemptable end try begin catch -------------------- raiserror(); -------------------- end catch end note: proc2 returns exact same number of columns have taken care while inserting #temptable do let me know if furth

tags - How to collect Usernames from instagram hashtag -

Image
now i'm organising completion on instagram , created hashtag, lets use #cars example. want take copy username of people posted images contain hashtag because far have 100+ username winners , need make draw, there way usernames using kind of application or instead of copying them manually ? problem instagram has reached 400 millions users few weeks ago. hashtag #cars broad search query, when want examine each photo including poster's username. currently, hashtag #cars has 12,377,506 posts . solution make competition's hashtag unique names, numbers, year (be creative!) limit posts amount while analysis. 1 thing point, question off-topic because it's not programming.

c# - Reset Auto Increment by day in visual studio - SQL -

i´m looking solution reset auto increment id day change. let's have order , want store 2 identification numbers... daylie order number , order itself. e.g. order#123123 orderday#3 article#something, etc. the order number auto increment , primary while day id counter see how many orders company got in day. the day counter has reset new day. i´m working on windows forms project local sql server database. thanks in advance you can schedule job resets day id 1 each day: msdn sql server - schedule job

visual studio 2012 - Error In OpenCv -

Image
i installed opencv , configure tutorials, when trying code implementing it, related opencv shown error shown in figure. can please me? need #include "stdafx.h" #include <opencv2/highgui/highgui.hpp> #include <iostream> using namespace std; using namespace cv; int main( void) { cvcapture* capture = 0; // start capture webcam capture = cvcapturefromcam( cv_cap_any ); if( !capture ) { cout << "no camera detected" << endl; } // create new window cvnamedwindow( "my opencv webcam", cv_window_autosize ); if( capture ) { cout << "webcam in capture" << endl; for(;;) { // captured image , show in new window // can save or filter iplimage* iplimg = cvqueryframe( capture ); // use filter image //cvnot(iplimg, iplimg); cvshowimage( "my opencv webcam", ipli

c# - Is there a way to hide the posted Form data when the form submit is intercepted in Burp Suite or any similar tool -

Image
is there way hide keys , values posted on form submit.as these key values can tampered hacker using security testing tools such burp suite? while https used secure data in transit, there no practical way prevent user tampering data on machine. pretty every modern browser has built-in or add-on developer tools allow user pause script execution, change client script variables, modify html, , on. one method can used data round-tripped , forth client server , doesn't change (such userid) encrypt data prior sending, , decrypt when returns server. mechanism take of round-trip values aren't expected change , compute hash against them stored in hidden field on page. when return, recompute hash , make sure matches up. "boblimiteduser" couldn't change username "administrator" manipulating html without breaking hash. all of being said, underlying fact should consider data coming system not under control untrusted. final input validation shou

c# - skip white space by reading characters -

i want skip white space between characters. example, have this: abc def ghi , output has be: a = 1 b = 1 c = 1..etc but get: "" = 2. because there 2 white spaces between characters. i try this: sorteddictionary<char, int> dictionary = new sorteddictionary<char, int>(); console.writeline("enter string: "); // prompt user input string input = console.readline(); // input // split input text tokens char[] letters = regex.split(input.tochararray().tostring(), @"\s+"); just omit spaces array: using system.linq; // other code char[] letters = input.where(c => c != ' ').toarray(); a string inherently char array, don't need cast call.

android - RecyclerView Item drawable states not working -

i using recyclerview. has gridlayoutmanager , contains/displays grid of images using glide/picasso library. item in recyclerview has following layout. <?xml version="1.0" encoding="utf-8"?> <framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/item_recycler_view" android:clickable="true" android:focusable="true" android:foreground="@drawable/item_recycler_view"> <imageview android:id="@+id/savedphoto" android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustviewbounds="true" android:scaletype="centercrop" android:transitionname="imagescale" /> i have set following states drawable(item_recycler_view) parent framelayout. <?xml vers

.net - OutOfMemoryException issue : Exception while having plenty of space and no LOH fragmentation -

Image
i'm having weird outofmemory exception. we have application, draws charts data coming hardware devices. if run application memoryprofiler, after time, got outofmemoryexception . know same exception happens of our customers, without debugger. the weird part: we have still plenty of free memory space when having exception, application only using 360mb we using nevron library draw charts, exception is: system.outofmemoryexception: out of memory. @ system.drawing.graphics.checkerrorstatus(int32 status) @ system.drawing.graphics.drawimage(image image, int32 x, int32 y, int32 width, int32 height) @ nevron.graphicscore.nbitmapgdirendersurface.paint(object sender, painteventargs e, l1ll11il1 contentpainter) @ nevron.chart.winform.ncontrolview.paint(object sender, painteventargs e) @ nevron.chart.winform.nchartcontrol.onpaint(painteventargs e) @ system.windows.forms.control.paintwitherrorhandling(painteventargs e, int16 layer) @ system.windows.forms.

javascript - FullCalendar: Jump to first event -

the default view fullcalendar setup agendaweek. want set when calendar loads, doesn't start on current date. i'd to automatically jump first week containing events. possible? i've gone through docs , if is, sure haven't seen how. :) thanks! have tried setting defaultdate first event in calendar? docs fullcalendar.io here

c++11 - Is there a way to cast Template's Type to shared_ptr<T>? -

recently, working school's assignment construct simple polynomial expression using class , object. don't have construct parse function , construct normal expression there's lot codes needed write , hard discern when there's many codes. thought maybe context try c++ template ( i'm fresh man c++, not experienced template , not sure if in condition use it.) example, need implement operatorplus declaration correspondant is std::shared<expression> operateurplus(std::shared<expression>, std::shared<expression>) . want create template<typename t, typename m> std::shared<expression> plus(t lhs, m rhs) wrapper response different passed-in parameters. , follow clause in language add type limitation utilizing enable_if . code this: template<typename t, typename m, typename = std::enable_if<( std::is_same<unsigned int, t>::value || std::is_same<char,

javascript - Change color of a row on onclick of that particular row -

i creating html table dynamically follows: var table = document.getelementbyid("mytable"); var rowcount = document.getelementbyid("mytable").rows.length; var row = table.insertrow(rowcount); var cell1 = row.insertcell(0); var cell2 = row.insertcell(1); var cell3 = row.insertcell(2); var cell4 = row.insertcell(3); var cell5 = row.insertcell(4); cell1.innerhtml = rowcount; cell2.innerhtml = "a"; cell3.innerhtml = "b"; cell4.innerhtml = "c"; cell5.innerhtml = document.getelementbyid("select_product_name").value; the last column in row ie, cell5 contains id i want function in such way onclick of row in table should id ie, value of cell5 , full row should change color red. note: use javascript not jquery var table = document.getelementbyid(&quo

javascript - Pass value from a table into a function using jquery -

i trying pass variable thecode , in table using jquery function named getcomments() . code has following. first have jquery script this: $(document).ready(function(){ $("#comment_process").click(function(){ if($("#comment_text").val() != ""){ $('.post_loader').show(); $.post("comments_business.php?action=post", { comment: $("#comment_text").val() }, function(data) { $(".comments").hide().html(data).fadein('slow'); $("#comment_text").val(""); $('.post_loader').hide(); }); } }); }); next have following script html , php: <!--- more code @ top----> <?php $auto = $profile_data_business['business_code']; ?> <table> <textarea rows="3" id=&quo

html - Getting text align: left to work on an excerpt in CSS for Ultimate Posts Widget for Wordpress -

i have been attempting text-align excerpt in widget titled "to-do list" on left sidebar. i have attempted turn excerpt text display text-align left not working. in separate instances, have targeted p tag in .widget_ultimate_posts, .uw posts in css standard code: text-align: left; . it not seem work. you can see mean here: a link ! (look right sidebar widget title "to-do list". any appreciated. thank you! in style-editor paste below code @ bottom of css file. #sticky-posts-2 p {text-align:left;} or .entry-summary p {text-align:left !important;}