Posts

Showing posts from August, 2013

java - Set value into variable in struts1 -

i can iterate list in struts1 using below code : <logic:iterate name="listmsg" id="listmsgid"> <p> list messages <bean:write name="listmsgid"/> </p> </logic:iterate> but how can set variable within tag. for example want fetch data above tag , initialize in variable. <logic:iterate name="listmsg" id="listmsgid"> <p> <% string firstname = "get data list"; %> list messages <bean:write name="listmsgid"/> </p> </logic:iterate> how can achieve above 1 using struts1 , java. is possible? if yes how? one solution, , imo better one, use jsp jstl. see example below: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%--@elvariable id="messages" type="java.util.list"--%> <c:foreach items="${messages.msglist}" var="message"

how to catch HTTP activity errors only in tibco bw -

Image
in tibco bw project have 1 process has activities mapper, http, jms etc , have caught activity also. want catch errors created http activity not other activity errors . please me on . i can suggest 2 solutions. the first-one consists in catching explicitly exception http activity using "error" branch the second-one consists catch different exceptions throw http activity exceptions (http client exception, http server exception, http communication exception)

no transaction recorded in history with paypal php sdk -

i have used paypal php sdk following code here: http://paypal.github.io/paypal-php-sdk/sample/doc/payments/createpaymentusingpaypal.html however, after successful transaction, , redirection, there no recorded history of transaction. may know issue? thanks.

python - How to convert a tree drawn with ete2 to Newick format? -

i have drawn tree in python using ete2 commands tree(), .add_child(), .add_sister() , on. there way can convert tree corresponding newick format? from ete3 import tree tree = tree() tree.add_child(name="c") tree.add_child(name="b") print tree.write() #(c:1,b:1);

c++ - How to avoid duplicate code -

as shown in pictures, 2 pieces of code same slight differences. each duplicate might create trouble, if encounter such situations, how supposed solve them? example 1 example 2 it depends on case. in general add function knows both ways , return value need in every case. so in case like bool myfuction(bool condition, int i, int k) { if(condition == true) { return (i + min_size + k < ck_size); } else { return (i - min_size - k >= ck_size); } } now can call myfunction(..) the bool condition condition wether decide use first or second way.

performance - Start and end on (near) the route in mysql -

i working on searching system should detect if start , end point on (near 50 km) route. have many routes stored in mysql db points [300k rows]. structure id [primary] | id_route | id_point | lat_lng_point (spatial index) 1 1 1 [geometry - 25 b] 2 1 2 [geometry - 25 b] 3 1 3 [geometry - 25 b] 4 1 4 [geometry - 25 b] 5 2 1 [geometry - 25 b] 6 2 2 [geometry - 25 b] ... ... ... ... question how effectivelly select routes (route_id) on (or near 50 km) start , end points is? i have tryed union [in example] (or inner join) works, query takes around 0.4s much. any idea how optimize? select * ( ( select distinct(id_route) route_path2 st_contains( st_makeenvelope( po

c++ - Different eigenvector and eigenvalues in Eigen and Matlab could generate errors? -

like it's explained here , here orde of eigenvalues (and relative eigenvectors , sign too) library dependent , (according first linked question) shouldn't problem. in addition, eigenvectors relative almost-zero eigenvalues can considered garbage. far good. now, consider matlab code below want rewrite in c++ using eigen library: %supposing k 3x3 matrix [v_k,d_k] = eig(k); d_k = diag(d_k); ind_k = find(d_k > 1e-8); d_k(ind_k) = d_k(ind_k).^(-1/2); k_half = v_k*diag(d_k)*v_k'; and c++ implementation: eigensolver<matrix3f> es (k,true); auto v = es.eigenvalues(); //set 0 if eigenvalues smal, otherwise v^(-1/2) v = (v.array().real() > 1e-8).select(v.cwisesqrt().cwiseinverse(), 0); auto khalf = es.eigenvectors()*v.asdiagonal()*es.eigenvectors().inverse(); the problem k_half values different khafl , can see printed result: matlab: v_k = 0.5774 0.8428 -0.0415 0.5774 -0.3806 -0.7468 0.5774 -0.3806 0.6638 d_k = 17.0000

Check if number is NaN in Ruby on Rails -

i'm trying check if variable have equals nan in ruby on rails application. i saw answer , it's not useful because in code want return 0 if variable nan , value otherwise: return (average.nan ? 0 : average.round(1)) the problem if number not nan error: nomethoderror: undefined method `nan?' 10:fixnum i can't check if number float instance because in both cases (probably, i'm calculating average). can do? strange me function check if variable equals nan avaible nan objects? quickest way use this: under_the_test.to_f.nan? # gives true/false e.g.: 123.to_f.nan? # => false (123/0.0).to_f.nan? #=> true also note floats have #nan? method defined on them, that's reason why i'm using #to_f in order convert result float first. tip: if have integer calculation potentially can divide 0 not work: (123/0).to_f.nan? because both 123 , 0 integers , throw zerodivisionerror , in order overcome issue float::nan constant can useful -

amazon web services - Cloudformation security group set group name -

using cloudformation securitygroup possible set groupname or has provide cloudformation?. the final name format it´s pretty long , not nice, not match use find command line. i know can use tags, still don't understand why aws don't allow add it, guess because they´re lazy , don't want implement validation. regards. [updated jun 26 2017] of apr 28 2017 , possible specify custom name ec2 security group using cloudformation, using groupname property on aws::ec2::securitygroup resource. thanks surenyonjan comment on update. [original answer dec. 23 2016] - no, not possible provide custom name ec2 security group using cloudformation. according aws::ec2::securitygroup resource documentation, there no name or groupname property available. can provide tags using tags property alternative, pointed out. recently, cloudformation resources have started supporting custom names via name property. full list of supported resources in name type secti

php - Insert array batch in codeigniter -

i want insert array array below format, how this, i've try insert batch also, doesn't work. array(4) { ["notification_title"]=> array(2) { [0]=> string(35) "hello! have news you." [1]=> string(35) "hello! have news you." } ["notification_message"]=> array(2) { [0]=> string(81) "now can choose 3 types of advertisers wish collaborate." [1]=> string(95) "saat ini anda sudah dapat memilih maksimal 3 (tiga) tipe iklan untuk dipasang pada mobil anda. " } ["notification_type"]=> array(2) { [0]=> string(1) "1" [1]=> string(1) "1" } ["notification_language"]=> array(2) { [0]=> string(1) "1" [1]=> string(1) "2" } } i've try this, doesn't work public function save($data) { $this->db->insert_batch($this->table, $data);

Unix- Using Grep to get unmatched lines -

i new unix. want grep unmatched pattern file1 provided patterns in file2. real files having more 1000 lines. example: file1: hi(everyone) how(u)people(are)doing? thanksinadvance file2: hi(every thanksi required result: how(u)people(are)doing? i want pattern used ("hi(every") grep.it should return unmatched line file1. this line works given example: grep -fvf file2 file1 the 3 options used above: -f makes grep fixed-string match -v invert matching -f patterns file

r - Venn Diagram from GRanges -

i have granges objects these( showing 2 of four): > upmd_hf3a granges object 398117 ranges , 2 metadata columns: seqnames ranges strand | type ncg <rle> <iranges> <rle> | <character> <integer> [1] chr1 [ 1, 714170] * | pmd 280 [2] chr1 [714171, 732041] * | notpmd 103 [3] chr1 [732042, 762741] * | pmd 109 [4] chr1 [762742, 796127] * | notpmd 264 [5] chr1 [796128, 859047] * | pmd 829 ... ... ... ... . ... ... [398113] chr9 [140133051, 140174235] * | notpmd 1725 [398114] chr9 [140174236, 140176229] * | pmd 187 [398115] chr9 [140176230, 140187041] * | notpmd 219 [398116] chr9 [140967724, 140973103] * | notpmd 15

ios - How to configure bluetooth printer from the app -

i have zebra printer imz series, want check presence of printer , pair through app itself. is, search printer available in vicinity , show list of it. after selecting particular 1 should able pair device. brother, first need download zebra printer sdk , read how configure project official website from here here helping class , project sure , figure out solution problem. zebra-toolkit tizebraprint happy coding. edit please edit plist below <key>uisupportedexternalaccessoryprotocols</key> <array> <string>com.zebra.rawport</string> </array> <key>uibackgroundmodes</key> <array> <string>external-accessory</string> </array> and call default api search printer, , show them in tableview.

python - pandas dataframe: groupby by several columns, apply function and map back the result -

here there example: np.random.seed(1) df = pd.dataframe({"x": np.random.random(size=10), "y": np.arange(10)}) df["z"] = np.where(df.x < 0.5, 0, 1) print df it gives following result: x y z 0 0.417022 0 0 1 0.720324 1 1 2 0.000114 2 0 3 0.302333 3 0 4 0.146756 4 0 5 0.092339 5 0 6 0.186260 6 0 7 0.345561 7 0 8 0.396767 8 0 9 0.538817 9 1 i want add new column mean df mean values computed values of x column grouped y , z columns. know how compute mean values: tmp = df.groupby(["y", "z"]).mean() however can't find out how map results new column mean . use transform add result of groupby operation column, transform returns series it's index aligned original df: in [15]: df['mean'] = df.groupby(["y", "z"]).transform('mean') df out[15]: x y z mean 0 0.423578 0 0 0.423578 1 0.270

azure - [WARNING]: provided hosts list is empty, only localhost is available when inventory exists -

i'm trying list of facts available azure vm running ansible -m setup hostname as described in faq so have ansible -m setup my-vm1 which run machine in azure cloud run ansible commnads (the machine use talk , modify host in question) results in: [warning]: provided hosts list empty, localhost available however have ansible inventory in /etc/ansible/hosts: 40.127.174.129 my-vm1.westeurope.cloudapp.azure.com ansible_sudo_pass=mypassword my-vm2.westeurope.cloudapp.azure.com my-vm3.westeurope.cloudapp.azure.com when run same command using fqdn following: [me@ansible-machine]$ ansible -m setup my-vm1.westeurope.cloudapp.azure.com my-vm1.westeurope.cloudapp.azure.com | unreachable! => { "changed": false, "msg": "failed connect host via ssh.", "unreachable": true what doing wrong? it seems haven't mentioned how authenticating hosts. able ssh in server trying setup ? ansible tries ssh server on port 22 defau

How to use Cumulocity Device mgm / Configuration Repository? -

i upload file on "configuration snapshots repository" page have not found info on how use this. i try use deploy files device, if possible. which c8y_supportedoperation (in java agent: supportedoperationtype) have implement in order able use this? using default devicemangement supportedoperations follows: c8y_downloadconfigfile -> downloading config files cumulocity device (operation contains link binary file). c8y_uploadconfigfile -> request device upload current configuration binary. c8y_configuration -> plain text configuration (stored in device object , not binary). c8y_softwarelist -> (un-)installing files software repository. operation created represents complete list of software should present on device.

html5 - Hiding menu element by permission using AngularJS and Web API -

i have implemented roles based authorization in web api restfull service using owin. what best way hide menu items or buttons based on role user has? want hide items user has no access to. updated i want know best practice controller. this example of want, don't think right way it. second, routing fails because cannot distinguish between 2 actions. [authorize(roles = "somerole")] public class foocontroller : apicontroller { [httpget] public string helloworld() { return "hello world - authorized"; } [httpget] [route("hasaccess")] [allowanonymous] public bool hasaccess() { return user.isinrole("somerole"); } } http://localhost:8080/api/foo/ --> calls helloworld() http://localhost:8080/api/foo/hasaccess --> calls hasaccess() you use ng-if directive. render div if hasrole function returns true. <div ng-if="hasrole('admin')"

ios - loadHTMLString: analoge in SFSafariViewController -

is possible load content sfsafariviewcontroller in uiwebview loadhtmlstring: method? tried find it, seems sfsafariviewcontroller can show internet data, true? you can load url in sfsafariviewcontroller . it's in-app safari.

c# - Declaring private variable inside Main -

class program { static void main(string[] args) { private int panda=3; } } compiler spits 4 errors when this. declaring private variable in main forbidden? why? variables declared inside block (i.e. code between 2 curly braces) visible inside block, there no sense in declaring them private, public or protected. class { private static int x=0;//make sense static void main(string[] args) { private static int x=0; //does not make sense } }

c++ - I am trying to run the following code for quicksort but the output is always a garbage value.What should be the modification in the code? -

this following code #include<iostream> using namespace std; int findpivot(int a[],int startindex,int endindex) { int pivot=a[endindex]; int pivotindex=startindex; for(int i=0;i<endindex-1;i++) { if(a[i]<pivot) { int temp=a[i]; a[i]=a[pivotindex]; a[pivotindex]=a[i]; pivotindex++; } } int temp=pivot;//swapping pivot element position. pivot=a[pivotindex]; a[pivotindex]=temp; return pivotindex; } void quicksort(int a[],int startingindex,int endingindex) { int number; if(startingindex < endingindex) { int returnvalueofpivot= findpivot(a,startingindex,endingindex); //cout<<returnvalueofpivot<<endl; quicksort(a,startingindex,returnvalueofpivot-1);//sorting left quicksort(a,returnvalueofpivot+1,endingindex);//sorting right } } int main() { int number; cout<<"enter total number of elem

Dynamic Dimensions of Arrays -

is possible make dimension of array allocatable? (not size of dimension) i.e., giving: real, dimension(:,:,: ... n), allocatable :: array i mean in array of arrays sense, can preserving fortran's accessible array structure? there this , first answer not satisfy need. second answer uses pointers. work? no, not possible have array variable rank. fortran 2008 standard, cl. 2.4.6 "array": 1 array may have fifteen dimensions, , extent in dimension. size of array total number of elements, equal product of extents. array may have 0 size. shape of array determined rank , extent in each dimension, , represented rank-one array elements extents. all named arrays shall declared, , rank of named array specified in declaration. rank of named array, once declared, constant; extents may constant or may vary during execution. [emphasis mine.] however, have one-dimensional array extent product(extent in each dimension) , , index elements appropriatel

android - background services for getting activity recognition -

i read lot services tried lot of examples unfortunately couldn't understand how keep services running activity recognition api , running. in cases android os killing somehow running service. what tried: i put start_sticky when killed never runs again @override public int onstartcommand(intent intent, final int flags, int startid) { // code here return start_sticky; } started service again when detected service killed. not worked expected. sending broadcast , starting service again. @override public void ondestroy() { sendbroadcast(new intent("youwillneverkillme")); super.ondestroy(); } know foreground services in case there no way can use foreground services. have forget solution. is there other way can suggest me solution? doing there facebook or viber getting messages?

amazon web services - How to create/copy an EC2 sec group in Oregon using one in Virginia? -

i copy security group virginia oregon there no such thing via amazon cli. is there way create ec2 security group follows instead? describe-db-security-groups --db-security-group-name secgroup-virginia >> sg.txt create-db-security-group --db-security-group-name secgroup-oregon --region us-west-2 sg.txt could use json output of security group input in create command?

apache - Setting cookies via mod_rewrite fails -

i'm building site on top of codeigniter. make uris prettier ci uses mod_rewrite rule rewritecond $1 !^(index\.php|img|css|js|fonts|robots\.txt) rewriterule ^(.*)$ /index.php/$1 [nc] now i'd allow people request pages in specific language, i.e. process both normal https://example.com/home , language-specific https://example.com/spa/home . @ stage it's pretty troubling me create new controllers, want set language cookie , rewrite original uri. after reading articles on mod_rewrite, came this rewritecond %{query_string} ^(eng|spa|ger|fre)/(.*) [nc] rewriterule ^(.*)$ %2 [r,nc,qsa,co=lang:%1:.example.com:1440:/] rewritecond $1 !^(index\.php|img|css|js|fonts|robots\.txt) rewriterule ^(.*)$ /index.php/$1 [nc] however, when try access https://example.com/spa/home uri doesn't rewritten, lang cookie not set, , 404 page not found error returned. my guess rule , original codeigniter rule conflicting. they? , mistake? many thanks! upd: apache/2.4.10 tr

c# - Performance impact of static constructor -

update 2 found reason , different: enumexcore defined static constructor this: public abstract class enumexcore<t> t : class { // ... static enumexcore() { if (typeof(t) != typeof(enum)) throw new invalidoperationexception($"{nameof(t)} must {typeof(enum).fullname}."); } // ... } which removed when posting original question in attempt simplify question... apparently static constructors have impact on performance when calling static methods: http://www.codetails.com/2014/10/18/c-static-constructors-and-performance/ im sorry wasting time.. update in reaction usr's comments, put compiling code snippet (console app). in doing noticed, below mentioned effect cannot observed in console app snippet. in debug mode, enumex 2x slower direct call delegate, in release mode take same amount of time (i'd speculate on being due inlining here). in original test case, helper classes ( integer<t> , integer , enumex )

java - Start Mail-Client with Attachment? -

i'm searching way (in java) start default mail client defined receiver, subject , body , predefined attachment. due limitations of rfc java.awt.desktop.mail-method not working attachments. jdic-project dead , jmapi-project rather obscure in building process. (needs 1.4 mozilla-sources) , have build 64 bit systems myself. is there alternative? read articles here using rundl32.dll , such "solutions" aren't want put in production code. there not appear os agnostic method of doing in java not oses provide standard way launch default e-mail application more basic fields new email. on windows, possible use jni interface mapi, provide more control on opening email in mail application. mentioned, 1 such library jmapi - however, appears there many libraries such name similar purposes. discovered 1 maintained , seems straight-forward. includes pre-built binary dll , accompanying java jni-based library. https://github.com/briandealwis/jmapi with code, seem

mysql - mysqldump with multiple triggers -

i using mysqldump create , restore backup onto server. one of features using lot on database triggers. appears if there more 1 trigger 1 action on database restore failing because of dependency on object (the second trigger) not yet created. the reason seems both trigger declarations contain reference each other. executed in sequence, first of these fails. create trigger trigger_one ... precedes trigger_two ...; [and bit further down] create trigger trigger_two ... follows trigger_one ...; i've separated data , structure , separated structure 'just triggers' , 'everything but' following this article on percona blog, yet problem exists , i'd able automate backups , replication. i can't reproduce problem. i don't have clear mysql version used in article of percona mentioned, doubt 5.7 (or @ least 5.7.2). test: mysql> select version(); +-----------+ | version() | +-----------+ | 5.7.13 | +-----------+ 1 row in set (0.00 s

Java: generic Method - add elements to vararg -

i want here, works somehow don't think solution: class a5<t> implements a4<t> { private final t[] elements; a5(t... elements) { this.elements = elements; } public <r> a5<r> map(function<t, r> function) { list<r> liste = new linkedlist<>(); (t element : elements) { liste.add(function.apply(element)); } object[] objects = new object[liste.size()]; int counter = 0; (r element : liste) { objects[counter] = liste.get(counter++); } return new a5(objects); } } for me object[] problem, cannot create r[] array. have solution it? changing ctor , signature of map not looking for. body can changed. you cannot create generic array, unless change t[] list<t> in class a5 need create object[] . your code can simplified bit though. can use java 8 stream map elements , collect them object[] , cast object[] r[

c# - Multiple exactly the same forms -

i have multiple forms same (invoice, priceoffer, order,...) created first form. after thinking this, other forms same. is there technique, or other way prevents me of creating forms on , on again? just create single form class you'd call orderform or that public class orderform : form { } then use create controls on it, , create instance of class every time need show user. best part of if 1 of forms changes (let's invoice) inherit class , change part different: public class invoiceform : orderform { } and create instance of invoiceform when need that. edit answering ops question in comment. let's create bunch of controls in constructor of orderform : public class orderform : form { public orderform { var button = new button() { ... }; var label = new label () { ... }; this.controls.add(button); this.controls.add(label); } } now if you'd create instance of orderform, these controls added for

How create own class helper in Laravel? -

i need create own class methods, want call diverse controllers. what should be: library, provider or helper in laravel? 1: create folder app/helpers 2: in app/providers create new provider file helperserviceprovider.php 3: in file register helpers classes need $this->app->bind('datehelper', function() { return new \app\helpers\datehelper; }); ... etc 4: in config/app.php add new provider 'app\providers\helperserviceprovider', 5: need create facade available use helper in view. find info how create facade on official laravel.com site providers , can read doc source : laravel forums

javascript - jQuery on click toggle siblings -

i trying toggle arrows when click link, on click action working cannot make siblings toggle. have idea missing. thanks html code : <div class="box"> <span class="info-box-title" > <i class="fa fa-thumbs-up"></i> <a class="toggle" href="#yeswebsite"> <b>website</b>: <?php echo $parsedjson1->website; ?> </a> </span> <div class="arrow-up">&#9650;</div> <div class="arrow-down">&#9660;</div> <div id="yeswebsite" class="hidden"> <p>informatiile privind pagina ta cuprind si adresa de website. aceasta trimite vizitatorii direct pe siteul tau pentru afla mai multe informatii. </p> </div> </div> jquery code is $("span>a.toggle").click(function () { console.log('it

javascript - Leaflet Legend not showing -

can tell wrong code? legend, supposed easiest part in not showing , cant figure out why. maybe hidden in other layer? following getcolor , legend code var legend = l.control({ position: 'bottomleft' }); legend.onadd = function(map) { var div = l.domutil.create('div', 'info legend'), grades = [0.2, 0.26, 0.32, 0.38, 0.44, 0.5, 0.56, 0.62, 0.68, 0.74, 0.8, 0.86, 0.92, 0.98, 1.04, 1.1], labels = [], from, to; (var = 0; < grades.length; i++) { = grades[i]; = grades[i + 1]; labels.push( '<i style="background:' + getcolor(from + 1) + '"></i> ' + + (to ? '&ndash;' + : '+')); } div.innerhtml = labels.join('<br>'); return div; }; edit following answer comments: use developer tools (f12 / on mac: cmd + alt + i) read potential console errors. in case, getcolor function not defined in scope of legend.onadd . besides, add 1

Maximize the eclipse editor on open -

when eclipse editor opened i.e if workspace opened first time eclipse editor not occupy full screen. manually user should maximize editor. have option occupy full screen on open itself. instead user manually maximizing editor. you're apparently referring "editor view", not "eclipse editor". the simple answer eclipse keeps track of window layout. if start eclipse, maximize editor view, , restart, you'll find editor maximized on open. i know of no way automatically start maximized editor view, ignoring previous layout.

Regex to match a string not followed by some string -

Image
i have string block below 1. while #enginespeed$b4tgup# 2. while #acceleratorpedal$desddd# <=2 3. while #acceleratorpeda@$desddd# <=2 4. while #acceleratorpe#al$desddd# <=2 5. while #acceleratorp@dal$desddd# <=2 6. while #acceleratorpeda l$desddd# <=2 7. 设置 #acceleratorpedal$y6qs8m#=@acceleratorpedal+0.06 8. 设置 #waitstart$jhx0vu#=11 9. 设置 #waitstart$jhx0vu#^11 10. 设置 #waitstart$jhx0vu#_11 11. 设置 #waitstart$jhx0vu#-11 12. 设置 #acceleratorquora$yd6ba3#=1 13. 设置 #acceleratorquora$yd6bd3#=1 14. 15. check #enginepower# 16. while #enginespeed 17. set #waitstart 18. set #waitstart<13 19. set #waitstart<=13 20. set #waitstart <= 13 now want have regex match substring starts # not followed # or not followed substring $\w{6}# . so in string block above line 16,17,18,19,20 match,in line 16 result #enginespeed ,in line 17 result #waitstart ,the others not match, in line 20 ,the result #waitstart , followed <= 13 ,not followed # or $\w{6}# ,so it's match!

php - Remote Connection from the ssh2_exec to another remote and access to shell of new connection -

i have connected remote server using ssh2-connect , , using ssh2 _exec run command "sshpass -p 'xxxx1248' ssh xx@1x2.1xx.3x.xx " , if connected new remote server want access shell. have task run command on there in second remote server. how ?? $connection = ssh2_connect($sip, $iport); $autherised = ssh2_auth_password($connection, $susername, $spassword); $oresult = ssh2_exec($connection, "sshpass -p 'xxxx1248' ssh xx@1x2.1xx.3x.xx"); how access shell of ip 1x2.1xx.3x.xx . please solve if 1 has done before .... i provide code snippet run "ls" command on target machine. let me know if want. $conn = ssh2_connect($host, $port); ssh2_auth_password($conn, $user, $pass); // runs ls -al command on $targethost $stream = ssh2_exec($conn, "sshpass -p '{$passtarget}' ssh $targetuser@$targethost ls -al" ); // retrieving data stream_set_blocking($stream, true); $output = ssh2_fetch_stream($stream, ssh2_strea

php - mysql query not working gives and error -

this question has answer here: syntax error due using reserved word table or column name in mysql 1 answer hello guys have 2 same querys 1 working , 1 not 1 working fine : <?php require 'mysql.php'; if(isset($_post["email"])){ $email = $_post["email"]; $stmt = $connect->prepare("select email users email=? "); $stmt->bind_param("s", $email); $stmt->execute(); $result = $stmt->get_result(); $rowcount = $result->num_rows; if ($rowcount > 0){ echo "1"; } else if($rowcount == 0){ echo "0"; } } ?> and 1 not working , gives me error " fatal error: call member function bind_param() on non-object in line 8 " <?php session_start(); require 'mysql.php';

wordpress - how to create a development url something like dev.abc.com for development porposes if i have domain abc.com -

i have domain example abc.com how can create development environment dev.abc.com not abc.com/dev thanks time! if actual hosting godaddy, create subdomain in control panel: https://ca.godaddy.com/help/how-do-i-create-a-subdomain-in-simple-control-panel-2290 if hosting else dns hosted godaddy, create record subdomain in godaddy: https://ca.godaddy.com/help/add-an-a-record-19238 value pointing server ip. on server-side, lets assume you're using cpanel, please follow guide add subdomain: http://www.inmotionhosting.com/support/edu/cpanel/cpanel-manage-domains/creating-a-subdomain after creating subdomain there should folder called subdomain (or whatever named subdomain) in root folder or public_html , thats should putting files subdomain.abc.com.

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

i fired windows 7 machine today , attempting start intemgr.exe process terminates immediately. started process under debugger. seems process terminating following exception: system.management.automation.cmdletinvocationexception . dumping exceptions on heap yields following results. heap has few more exception listed below. so based on research exception happens when cmdlet encounters terminating error. method call before processrecord(). provides record-by-record processing functionality cmdlet. windows powershell runtime calls method multiple times each instance of cmdlet in pipeline. how can inspect pipeline debugger? exception object: 0000000002702940 exception type: system.management.automation.itemnotfoundexception message: cannot find path 'c:\windows\system32\windowspowershell\v1.0\modules\applicationserver\applicationserver.dll' because not exist. innerexception: <none> stacktrace (generated): sp ip function 000000001

javascript - Mailgun email validation api not working in my form -

i want use mailgun email validation api in form not giving kind of status. i implementing in laravel 5.2 project. form: http://laravel.io/bin/42yyx [solved] multiple jquery files there

python - How to edit the order of LastName, FirstName in pandas without losing the dataframe -

i have dataset in 2 columns have strings values "lastname, firstname". love replace them "firstname last name". these: conductorname composername conduct_count 0 abbado, claudio berg, alban 2 1 abbado, claudio berlioz, hector 1 2 abbado, claudio bernstein, leonard 1 3 abbado, claudio brahms, johannes 2 4 abbado, claudio bruckner, anton 1 i have tried: data = [" ".join(n.split(", ")[::-1]) n in data["composername"]] this nicely gives me list of composername lose pandas dataframe (here error ----> 1 data.head() attributeerror: 'list' object has no attribute 'head' ) i have tried: for n in data["composername"]: " ".join(n.split(", ")[::-1]) however, not change order of lastname , firstname i love keep pandas dataframe analysis. appreciate assistance. tha

sql - SSIS Generic Error for SP Execution -

in each loop container , each job reference. i running execute sql task list of 21 input parameters stored procedure ( task 1 ). input parameters stored in ssis variables. then have execute sql task run stored procedure, set 21 input paramters , output parameter. ( task 2 ) when running package fails @ task 2 following generic error: error: 0xc002f210 @ run sp_insert_package, execute sql task: executing query "declare @testfaultstageid int declare @testid..." failed following error: "multiple-step ole db operation generated errors. check each ole db status value, if available. no work done.". possible failure reasons: problems query, "resultset" property not set correctly, parameters not set correctly, or connection not established correctly. task failed: run sp_insert_fault2 error: 0xc002f210 @ run sp_insert_package, execute sql task: executing query "declare @testfaultstageid int declare @storeid..." failed foll

ios - How to get the exact dSYM file in crashlytics -

Image
i missing dsym file followed each step given in document still missing file.there option of uploading zip dsym file or drag drop showed me wait , check status afterwards.even debug symbol has been set no.can please tell me going wrong? in project, go build settings , under build options, debug information format add "dwarf dsym file".

c# - Not able to access JSON datas -

i trying loop through json object , create input type dynamically in div here jquery function $(document).ready(function (){ $.ajax({ type: "post", url: "tables.aspx/totatable", contenttype: "application/json; charset=utf-8", datatype:'json', success: function(data) { //var data= $.parsejson(data); $.each(data,function(index,jsonobj) { alert(jsonobj.otid); } ); } }); }); here server side code return json values using json.net framework convert datatable json [system.web.services.webmethod(enablesession=true)] public static string totatable() { logindata ldata = (logindata)httpcontext.current.session["ldata"]; clsdataaccess cdata = new clsdataaccess(); datatable dt = cdata.gettable("select otid,ottableno fboutlettables otoutletid=1"); string val=jsonconvert.serializeobj

Excel VBA: how to solve Index and Match function type mismatch error -

i encounter error in index , match functions when counter of date changes. wrote comment when face error. uploaded sample of data if needed. sample : http://s000.tinyupload.com/?file_id=00243748825638974221 here code : sub regionalaverage() application.screenupdating = false application.displaystatusbar = false application.enableevents = false activesheet.displaypagebreaks = false ' *** change declaration here *** dim aname() string dim rw variant dim col variant dim date_ini date dim date_fin date 'create worksheet ' *** add redim here, index of array start 1 *** redim aname(1 2) date_ini = #1/1/2008# date_fin = #1/2/2008# j = 1 3 conteo = date_ini date_fin = 1 2 sheets(i) application col = .match(j, worksheets(i).range("f2:f23393"), 0) rw = .match(clng(conteo), worksheets(i).range("d2:d23393"), 0) 'error appeas here

Perl JSON validation function -

i'm using perl module, json when handling json data in perl script. i looking use valid_json json::parser module, looks though version i'm using, 2.53 has deprecated this. reading docs 2.53, cannot see validation functions. am rely on decode_json , & encode_json returns tell me json string invalid? you may decode_json in eval , see if trow exception.

.net - vb net update UI controls from separate thread event -

i have 1 class called sftpconnectormanager.vb responsible managing ftp connections server. have form1.vb class main gui. want update progressbar resides on form1 show progress of file transfer. function responsible initiating connection ftp server started on new thread, allows form1 not frozen, good, challenge me being able update progress bar, not working out me @ all. what have tried/done: using delegate update ui separate thread using background worker , using it's progress changed event, thought might on here remembered update ui needs happen during file transfer event, sessionfiletransferprogress, not when raise progress changed event. read on 20 pages worth of documentation in regards multi-threading , event handling, still don't understand guess... what need happen: updates progress bar ui control, update while file transfer in progress, , needs not freeze ui, needs running on separate thread (which have achieved far believe) code using: https://wi