Posts

Showing posts from April, 2014

php - exec convert works on SSH fine but not in script -

i have script convert pdf images $targetpath = 'test.pdf'; $location = "/usr/local/bin/convert"; $randomnum = time(); $nameto = $randomnum.".jpg"; $convert = $location. " -density 150 " . $targetpath . " " . $nameto; exec($convert); where $convert like /usr/local/bin/convert -density 150 path/test-1430326864.pdf path/1430326864.jpg when execute command on ssh, gives desired output, in php script doesn't convert pdf images. same script convert of pdf images successfully, not pdfs images is there issue in script or how can fix this, every pdf convert successfully? update: changed exec code.. in php script exec($convert, $output); echo '<pre>'; var_dump($output); die(); then, got following output array(9) { [0]=> string(32) "error: /invalidfont in /findfont" [1]=> string(14) "operand stack:" [2]=> string(97) " --dict:7/16(l)-- f0 9.

tcp - Simple SMPP Perl Script -

i need help/advices on short script wrote in perl in order send sms via smpp protocol. i got sms gateway working (sending sms via html request or via web interface works), let's gateway has ip 192.168.1.15. smpp service listening tcp 2775 (i can telnet 2775, guess smpp service working on sms gateway) my $smpp = net::smpp->new_transmitter(192.168.1.15, port=>2775, system_id =>"administrator", password =>"passwdexample") or die; $resp_pdu = $smpp->submit_sm(destination_addr => '+400123456789', short_message => 'test message') or die; die "response indicated error: " . $resp_pdu->explain_status() if $resp_pdu->status; when run script, here error got : response indicated error: incorrect bind status given command (esme_rinvbnds ts=0x00000004) @ c:\temp\

android - Cardslib's CardRecyclerView is always null -

i developing cardslib library , implementing this example. although slavishly follow instructions in tutorial when create cardrecyclerview object, object appears null . check code: @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.native_recyclerview_card_layout); arraylist<card> cards = new arraylist<card>(); //create card card card = new card(this);//getcontext() //create cardheader , add header card cardheader header = new cardheader(this); card.addcardheader(header); cards.add(card); cardarrayrecyclerviewadapter mcardarrayadapter = new cardarrayrecyclerviewadapter(this,cards); //staggered grid view cardrecyclerview mrecyclerview = (cardrecyclerview) this.findviewbyid(r.id.carddemo_recyclerview); //**mrecyclerview null here** mrecyclerview.sethasfixedsize(false); //**nullpointerexception here** mrecyclervie

asp.net mvc 5 - The view 'name' or its master was not found or no view engine supports the searched locations -

i'm getting error message, , of advice i've seen not appear applicable; i.e. views, controllers , models in correct folders. more detail: have master view, shows graphical flowchart-like interface interacting application. user selects "open study" symbol, , redirect view allows user select study work with. the openstudycontroller code retrieves selected study , redirects master view: public actionresult selectstudy( guid? id ) { // code elided clarity return redirecttoaction( "activatestudy", "home" ); } homecontroller has method called activatestudy(...), invoked appropriate environment: public actionresult activatestudy() { // code elided clarity return view(); } as said, views, controllers , models in correct folders. when "return view()" code in activatestudy() executed, error message occurs: server error in '/' application. the view 'activatestudy' or master not found or

ios - Storing access token and refresh token in KeyChain -

i know how store access token, refresh tokens , expirations in ios keychain. all examples have seen seem store 1 key-value combination. how store multiple key values 1 keychain identifier? if there better way store above, please let me know. you first want build nsdictionary key/values want. next, use lockbox store nsdictionary keychain, using provided setdictionary:forkey: interface. update: change values stored in dictionary, have pass nsmutabledictionary (that's common way of doing): nsmutabledictionary *mutabledict = [[lockbox dictionaryforkey:@"yourrefreshtokendictionarykey"] mutablecopy]; mutabledict[@"access_token"] = @"newaccesstoken"; [lockbox setdictionary:mutabledict forkey:@"yourrefreshtokendictionarykey"]; fyi, nsmutabledictionary subclass of nsdictionary , it's safe save directly keychain!

functional programming - Is it possible to get the infinite kind error in Haskell 98? -

i implementing kind system new functional programming language , writing function unify 2 kinds. there 4 cases 2 consider: +---------+---------+-------------------------------------------------------+ | k1 | k2 | action | +=========+=========+=======================================================+ | var | var | k1 := k2 ^ k2 := k1 | +---------+---------+-------------------------------------------------------+ | var | non var | if (!occurs(k1, k2)) k1 := k2 | +---------+---------+-------------------------------------------------------+ | non var | var | if (!occurs(k2, k1)) k2 := k1 | +---------+---------+-------------------------------------------------------+ | non var | non var | ensure same name , arity, , unify respective args | +---------+---------+-------------------------------------------------------+ when both k1

How to make a disabled select box look like a normal text box(css only) -

i tried change inline css of select box below .chosen-disabled .chosen-single { cursor: default; color: #000; border: 1px solid #444; } the select box appeared faded need normal text field(but still disabled). please me here , in advance. thank @christoph , @carine, override chose disable class giving inline css .chosen-disabled { opacity: 1 !important; } now working fine, once again support.

.net - How to flash a spark core from C# -

i trying flash spark core c# application. keep getting { error: nothing do? } response. below code var url = string.format("https://api.spark.io/v1/devices/{0}", sparkdeviceid); using (var client = new httpclient()) { client.defaultrequestheaders.authorization = new system.net.http.headers.authenticationheadervalue("bearer", accesstoken); using (var formdata = new multipartformdatacontent()) { httpcontent filecontent = new bytearraycontent(encoding.ascii.getbytes(rom)); //client.sendasync() formdata.add(filecontent, "file", "file"); var response = client.putasync(url, formdata).result; if (!response.issuccessstatuscode) throw new exception("an error occurred during rom flash!"); var responsestream = response.content.readasstreamasync().result; using (var reader = new streamreader(responsestream, true)) { var result = reader.r

swift - How many rows an iOS table view should contain when I use pagination? -

i have load news inside table view. i know have use pagination or lazy loading, because there may thousands of news @ point. my question is: if have instance 10000 news, should return number inside: func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int { return totalnumberofnews } ? or, maybe should return smaller number, let's 200-300, , whenever user scrolls , down reset offset of table view i know cells reused, , never keep 10000 cells in memory. wondering if return 10000 or 1 million in method affect performance in way. thanks in advance! you use count of news articles you've downloaded. user scrolls down, @ point request more, add them existing news articles, , reload table view sees new count.

Python, get windows special folders for currently logged-in user -

how can windows special folders documents, desktop, etc. python script? need win32 extensions? it must work on windows 2000 windows 7. you can pywin32 extensions: from win32com.shell import shell, shellcon print shell.shgetfolderpath(0, shellcon.csidl_mypictures, none, 0) # prints c:\documents , settings\username\my documents\my pictures # (unicode object) check shellcon.csidl_xxx other possible folders. i think using pywin32 best way. else you'd have use ctypes access shgetfolderpath function somehow (other solutions might possible these ones know).

javascript - google heatmaps including count of points -

i have working code google heatmap. quick overview of does: 1) queries mysql db pull lat/long records (initially) 2) drop down select box allows filtering (basically amends sql query in php) 3) heatmap json array (using php json_encode($sql_results)) so code have right works - however, wish add more map. my question - possible pull count of results particular location (i'm using postal code generate lat/long) , display them on heatmap? an example ; 100 results location x ... , zoom in , dissipate heatmap, amend number. i have tried looking similar functionality can find information on adding markers/images results - need dynamic numbers displaying results. any help/advice appreciated. here's relevant code used create heatmap: <?php $latlng = "select inp.lat, inp.long locations inp"; $results = db_query($latlng); $mapcoords = mysqli_fetch_all($results, mysqli_assoc); ?> <script type="text/javascript"> var places = []; var

computer vision - Near Focusing Camera Pose Estimation -

my project required calculate accurate pose near focusing camera (1-3 inches). that, need know z-value of interesting points , triangulate them 3d space. try consider sensors such primesense 3d depth camera, directly give depth map of sensor's minimum distance above 30 cm. there way accurately z-value in close distance?

PHP Mysql Error? -

i want log in user on website php . below alert not working: else { echo 'you must enter pass'; } the below code works when required fields empty, if password correct or not, alert not working. <?php require 'core.inc.php'; if(isset($_post['email1']) && isset($_post['sifre1'])){ $username=$_post['email1']; $password=$_post['sifre1']; if(!empty($username) && !empty($password)){ $query="select e-mail,sifre kullanıcı e-mail='$username' , sifre='$password'"; echo mysql_error(); if($query_run=mysql_query($query)){ echo 'invalid13'; $query_num_rows = mysql_num_rows($query_run); if($query_num_rows==0) { echo 'invalid'; } else { echo 'ok'; } } } else { echo 'you must enter pass'; } } ?> part of problem comes lack of separation of concerns. lets see basic algorit

javascript - local AJAX-call to remote site works in Safari but not in other browsers -

i maintaining website uses javascript. script uses jquery , loads content server @ site hosted. just convenience while maintaining site, run local copy of site on imac. works fine when use safari. firefox, opera , chrome refuse work. guess because of cross-domain-policy. (i couldn't test ie, because ie has run in virtual machine on imac, reason not possible access local files) is there setting within firefox , other browsers can tell browser ok ajax-load files located on remote server local html-page local javascript? in nutshell: html-page: <!doctype html> <html> <head> <meta charset="utf-8"> <title>some title</title> <link rel="stylesheet" type="text/css" href="../css/stylesheet.css"> <script src="../js/jquery-2.1.3.min.js"></script> <script src="../js/myscript.js"></script> </head> <

Teamcity and Unit Testing Windows Store apps -

i've been struggling make teamcity 9 compile , run unit tests visual studio solution. i have windows phone 8.1 (winrt, not silverlight) project , "myproject.common.dll" portable class library common functionality. i created " windows phone unit test app " project. if run vs, runs on emulator , runs unit tests. ok. if want run unit tests console use command: "c:\program files (x86)\microsoft visual studio 12.0\common7\ide\commonextensions\microsoft\testwindow\vstest.console.exe myproject.tests_1.0.0.1_x86.appx /inisolation /settings:runonemu.runsettings" it works. launches emulator, deploys appx , run unit tests. now problem : using teamcity 9, configure command line build step runner using same command , , error: error: not start test run tests windows phone app: unit tests windows store apps cannot run service or non interactive process. please run unit tests interactive process.. is there way bypass error? in

android - Cordova app doesn't get data from webservice on device but works in the emulator -

hello i've built cordova application gets data angular webservice this: var req = { method: 'post', url: 'http://mywebservice.com', headers: { 'content-type': 'application/json; charset=utf-8' }, data: { data}, crossdomain: true }; $http(req). success(function(data, status, headers, config) { callback(data); }). error(function(data, status, headers, config) { console.log("error: "+json.stringify(status)); }); in ripple emulator or ios emulator works great , data shown. if run app on device no data webservice. in config.xml have tag: <access origin="*"/> to give access internet. found these permission in androidmanifest.xml: <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /&

markdown - how to add table of contents to doxygen generated html file? -

i have c-project documented doxygen , want add table of contents shows sections , subsections. tried \tableofcontents , [toc] described in doxygen manual, nothing happens. here small example: /***********************************//** * \file bsp.c * \brief example * * \tableofcontents * * \section sec1 section 1 * blabla * * \section sec2 section 2 * blabla * * \subsection ssec21 subsection 21 * blabla ***********************************/ /***********************************//** * \brief * * \section sec1func funcsection 1 * blabla ***********************************/ void func() { } here in html: link output of example what do wrong? in advance every hint! the documentation doxygen says, @tableofcontents works on pages ( @page , @mainpage ), not in regular documentation blocks. you can still build own table of contents using @ref , bit of html (though isn't nice using builtin command).

c++ - std::shared_ptr in QList does not delete content on deletion -

this question has answer here: does calling free or delete ever release memory “system” 8 answers the following places bunch of shared_ptr s containing arbitrary object in qlist. curly braces create stack, triggers deletion of list when instruction pointer leaves it. somehow shared_ptr s not deleted. why? track memory consumption in gnome-systemmonitor , htop. { qlist<std::shared_ptr<qchar>> l; (int =0; i< 1024*1024*10; ++i) l.append(std::make_shared<qchar>('h')); } qdebug() <<"done"; sleep(10); i tested it. same problem qsharedpointer, not regular types (non [shared] pointers). small memory allocations come heap managed within process, not directly operating system. tools measure process's memory usage won't see them being deallocated, since memory still allocated process.

mysql - SQL query to only select row if specific condition is met -

consider following sql query: select friends.name friendname, friends.surname friendsurname, friends.number friendnumber, friends.gender friendgender, clients.name clientname, clients.surname clientsurname friends inner join clients on friends.clientid = clients.id datetime(friends.creationdate, 'localtime') >= datetime('some_test_time') , datetime(friends.creationdate, 'localtime') <= datetime('some_test_time') both friends , clients tables have number column want compare in query: if friends.number in clients ' table ( clients.number column) don't select particular row anymore. how possible accomplish in 1 query? example: table clients: -------------------------- id name surname number 1 john smith 55555 2 sam wesker 12345 3 adam nye 48745 -------------------------- table friends: ---------------------------------- id name surname number clientid 1 abcd qwert 88888 2 2 dddd asdfg 487

vba - Macro Removal When Submitting Documents -

i edit , format large proposals , started working macros speed process. however, proposal submissions have electronic. worried file may rejected if there macros attached. if copy , paste text new word document after using macros, remove trace of them? macros stored in word template , not in normal.dot. unless leaving in word document, "was done via vba" or that. creating new word document text copied , pasted not copy on macros. you use macros well. have them open new document , copy , paste it. macros not copied on unless create code it.

jquery - Bootstrap popover override title and keep style -

it might simple question couldn't find answer. how can hide , show title in popover? var = 1; function showhidetitle() { if (i == 1) { $('#txt2').attr("data-original-title", "error"); $('#txt2').attr("data-content", "message error"); $('#txt2').attr("data-trigger", "hover"); $('#txt2').attr("data-toggle", "tooltip"); $('#txt2').attr("data-placement", "bottom"); $('#txt2').popover({ container: 'body' }).popover('show'); = 2; } else { $('#txt2').attr("data-original-title", ""); $('#txt2').attr("data-content", "message good"); $('#txt2').attr("data-trigger", "hover"); $('#t

jQuery click function exception -

i displaying container <div class="expand"> - when clicked on - expands section below it: html: <div class="expand"> <div class="container1"> <div class="container2"> <a class="view">view</a> <a class="download">download</a> </div> </div> </div> <section class="hidden"> ... </section> jquery: $('.expand').click(function () { var $this = $(this); $this.next().show(); }); as can see, there "download" button child element of <div class="expand"> . download button should element in container not trigger said section shown. so this: $('.expand').not(".download").click(function () { ... }); or $('.expand').except(".download").click(function () { ... }); you'll need include function

Rails 4 new form defaults from params -

i using form_for in _form.html.erb view in order create form both edit , new actions, per standard scaffold. i have model owner has_many pets. i put html link on views/owners/show.html.erb create new pet said owner. link point new action of pets_controller.rb when accessed render view in pets/new.html.erb what want happen the owner_id passed link in url new action of pets_controller.rb , used default collection_select in pets/new.html.erb so have link create new pet because link on specific owner page, want form create new pet have owner set, user not have select list. this has done without changing behaviour of edit action/view in pets. i know can pass arguments access them in controller via params, create variables in action passed view. can manually check default , set in view. not need assistance in coding if solution. is there better way this? format can pass params such view pick them up? without manually editing controllers , views? while person

ios - adding total sum with floating points -

in xcode utilizing 4 utitextfields following chart user enter whole number, chart following: total | win | place | show 34 | 4 | 5 | 3 my algorithm chart following: -for total win * 1 -for total place * .5 -for total show * .25 -add 3 totals new float value (identified as, float totaltrackalltogether) -divide totaltrackalltogether total column (identified as, int tracktotalcolum) -display sum on onofflabel.text here code portion not seem work , crashes -(void)trackrecordmath { int trackwincolum = [trackwin.text intvalue]; int trackplacecolum = [trackplace.text floatvalue]; int trackshowcolum = [trackshow.text floatvalue]; int tracktotalcolum= [tracktotal.text intvalue]; int trackwintotal = trackwincolum * 1; nslog(@"%d", trackwintotal); int trackplacetotal = trackplacecolum *.5; nslog(@"%d", trackplacetotal); int trackshowtotal= trackshowcolum *.25; nslog(@"%d", trackshowtotal); float totaloftrackcolums = trackwintotal

Bootstrap .form-inline but keep label above fields -

<div class="form-inline"> <div class="form-group has-feedback"> <label for="id_first_name">first name</label> <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> <input class="form-control" id="id_first_name" name="first_name" type="text" /> </div> </div> <div class="form-group has-feedback"> <label for="id_last_name">last name</label> <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> <input class="form-control" id="id_last_name" name="last_name" type="text" />

javascript - Change class according to array -

i've got array: var size = [small, medium, large]; and element: <div class="wp-one wp-two wp-small"></div> how change size class looping through size array in jquery on pressing button ? example if element has wp-small , change wp-medium , forth looping through array. .wp-small { color: #f00; } .wp-medium { color: #0f0; } .wp-large { color: #00f; } <div class="wp-one wp-two wp-small">fdgbfbfnghn</div> <button>change class</button> you can this: var size = ['small', 'medium', 'large']; var button = document.getelementbyid("button"); var id= document.getelementbyid("sentence"); var = 0; button.onclick = function(){ sentence.classlist.remove("wp-"+size[i]); (i == size.length - 1) ? = 0 : i++; sentence.classlist.add("wp-"+size[i]); } jsfiddle it tidied i'm no js wizard. basically, first 4 li

Has anyone interfaced Neo4j to Knime? -

has interfaced neo4j knime ? i asked them if they'd interested in technology integration.

php - Catch exception and redirect -

i'm making installation script laravel application , i'm trying create admin account 1 of installation steps. when error arises, application should redirect same page alert message, laravel shows error message , stops application: public function postadmin() { $validation_rules = array( 'username' => 'required|min:4|alpha_dash|unique:users', 'email' => 'required|email|unique:users', 'password' => 'required|min:4', ); $validator = validator::make(input::all(), $validation_rules); if ($validator->fails()) { return redirect::to('install/admin') ->withinput() ->witherrors($validator); } else { try { $username = input::get('username'); $email = input::get('email'); $password = hash::make(input::get('password')); $admin_user = new user; $admin_user->username = $username; $admin_user->email = $email; $adm

Oracle SQL Developer: How to transpose rows to columns using PIVOT function -

i'm attempting create query transpose rows columns using pivot function. this contact table want transpose rows: partyid contacttext contacttypecd ---------- ------------ ------------- 100 0354441010 1 100 0355551010 2 100 0428105789 3 100 abc@home.com 4 my intended result: partyid phone fax mobile email ---------- ------------ ------------ ------------ ------------ 100 0354441010 0355551010 0428105789 abc@home.com my query: select * ( select partyid, contacttext, contacttypecd contact partyid = 100; ) pivot ( max(contacttext) contacttypecd in (1 phone, 2 fax, 3 mobile, 4 email)); errors i'm getting: error starting @ line 9 in command: contacttypecd in (1 phone, 2 fax, 3 mobile, 4 email)) error report: unknown command the reason problem because oracle database version (oracle9i) did not supp

java - Set custom subject for mail in log4j SMTPAppender -

i want every time message logged being sent mail, different subject should set. below log4j config smtpappender log4j.appender.email=org.apache.log4j.net.smtpappender log4j.appender.email.smtphost=localhost log4j.appender.email.smtpport=25 log4j.appender.email.from="user@mydomain.com" log4j.appender.email.to="user@mydomain.com" log4j.appender.email.subject="test" log4j.appender.email.layout=org.apache.log4j.patternlayout log4j.appender.email.layout.conversionpattern=%d{yyyy-mm-dd hh:mm:ss} :: %-5p :: %c{1}:%l :: message :: %m%n i know smtpappender should extended, can't find satisfactory info how can write class accept subject when log event triggered. example logger.error("sample message"); for log message subject should accepted. how achieve this? you're right, face reload properties issue. doubt work on concurrent system (2 errors raised @ same time). instead create dedicated service send emails without using log4j

android - Getting all contacts GMAIL -

how can contacts gmail? there library facilitates process ? not want contacts device addressbook gmail . you can't gmail, because gmail uses contacts provider of phone. need read contacts provider , filter google account. to need rights: read_contacts , read_accounts. look here: how phone contacts in android

ssh - Using git without X11 forwarding -

when try use git on remote machine (via ssh), complains of not being able connect display. since i'm using ssh connection within screen environment different machines, cannot use x11 forwarding. however, not want graphical interface typing in password. command: $ git pull connect localhost port 6010: connection refused (gnome-ssh-askpass:7316): gtk-warning **: cannot open display: localhost:36.0 version: $ git --version git version 1.7.1 how can around need graphical connection here? please read gitcredentials(7) manual page (you can run git credentials read locally). it explains how git manages problem of obtaining credentials. namely, usage of git_askpass environment variable might of interest you. alternatively, allow ssh client forward connection local agent (the thing keeps keys) git running in remote session use same identities. of coure, use if applicable (that is, identities same). in case, ssh won't supposed

cocos2d x 3.0 - Get the size of wrapped text in Label -

Image
if create label in 500x500 area wordwrap, how can find out height of wrapped text ? i'm looking yellow height, not salmon height. answer of @idrise doesn't work system font , here give more flexible answer . assume want create text/label has fixed width , dynamic height according text's length. can use below code: label *lbl = label::createwithsystemfont("aaa aaa aaa aaa aaa aaa", "arial", 50); lbl->setdimensions(fixed_width, 0); // "0" means don't care wrapping vertically, hence `getcontentsize().height` give dynamic height according text's length //// auto dynamicheight = title->getcontentsize().height; // according text's length :) and fixed height can similarly. hope :]

spring - file-pattern option in int-ftp:outboundgateway not work in recursive mode? -

thanks attention, defined int-ftp:outbound-gateway adapter ls command in spring integration project, want filter recursively .op extension files in ftp directories , set file-pattern *.op nut not worked, code is: <int-ftp:outbound-gateway id="gatewayls" session-factory="ftpsessionfactory" request-channel="inbound" command="ls" filter="ftpfilter" filename-pattern="*.op" remote-directory="" command-options="-r" expression="payload" reply-channel="tosplitter"/> update: @gary, used filename-regex option instead of filename-pattern ([foo]|.*\.op) (for example) , it's work. filter multiple subdirect

ios - Cannot invoke 'functionName' with an argument list of type '([(nameOfClass)])' in Swift xcode 6.3.1 -

im learning swift , having following problem please help.. i have 3 classes- tableviewcontroller broadcastmodel broadcastrequest following error (the line of error marked comment) cannot invoke 'requestfinished' argument list of type '([(broadcastmodel)])' import uikit public class tableviewcontroller: uitableviewcontroller { var broadcasts = [broadcastmodel]() //mark: viewcontrollerlifecycle override public func viewdidload() { super.viewdidload() //maybe use 2d array sections of broadcasts.. broadcastrequest().requestnewbroadcasts() } public func requestfinished(requestedbroadcasts: [broadcastmodel]) { self.broadcasts = requestedbroadcasts \* here error *\ self.tableview.reloaddata() } public class broadcastrequest { func requestnewbroadcasts() { var broadcasts = [broadcastmodel]() ..... ..... broadcasts.append(broadcast) tableviewcontroller.requestfinished(broadcasts) } } public class broadcastmodel: nsobject

random forest - randomForest prediction issue in r -

i have been using randomforest package classification model categorical factors predictors. predict function fails when there new levels in test not in training. overcome that, have added missing levels follows: mname<-get(model) ( k in 1:ncol(dataframe)) { col<-names(dataframe[k]) modellevels <- mname$forest$xlevels[[col]] orig<-levels(dataframe[,k]) misses <-setdiff(modellevels,orig) origordered <- orig[order(match(orig,modellevels))] # not sure if ordering matters missordered <- misses[order(match(misses,modellevels))] # not sure if ordering matters if(length(misses) > 0) { levels(dataframe[,k]) <- as.character(c(origordered,missordered)) } } prediction <- data.frame(predict(mname,dataframe,type = "prob"))$x1 this prediction returns different values same input vector depending on size of dataframe provided prediction. for example, if send dataframe 2 rows returns values of 0,0 whereas if pass bigger dataframe same 2 r

php - Magento System error on change currency -

when want change currency in magneto system > configuration > change currency i error the error is: invalid config field backed model: xmlconnect/adminhtml_system_config_backend_currency_default trace: #0 /mnt/web2/d1/07/51763507/htdocs/gelecto.nl/includes/src/mage_adminhtml_block_system_config_form.php(328): mage::throwexception('invalid config ...') #1 /mnt/web2/d1/07/51763507/htdocs/gelecto.nl/includes/src/mage_adminhtml_block_system_config_form.php(229): mage_adminhtml_block_system_config_form->initfields(object(varien_data_form_element_fieldset), object(mage_core_model_config_element), object(mage_core_model_config_element)) #2 /mnt/web2/d1/07/51763507/htdocs/gelecto.nl/includes/src/mage_adminhtml_block_system_config_form.php(164): mage_adminhtml_block_system_config_form->_initgroup(object(varien_data_form), object(mage_core_model_config_element), object(mage_core_model_config_element)) #3 /mnt/web2/d1/07/51763507/htdocs/gelecto.nl/inc

azure - BindingRedirect not being honored within cloud service -

i'm receiving exception when initializing cloud service: system.io.fileloadexception: not load file or assembly 'microsoft.windowsazure.storage, version=2.1.0.0, culture=neutral, publickeytoken=31bf3856ad364e35 understanding have version 4.3.0.0 installed, have added following redirect app.config worker: <dependentassembly> <assemblyidentity name="microsoft.windowsazure.storage" publickeytoken="31bf3856ad364e35" culture="neutral" /> <bindingredirect oldversion="0.0.0.0-4.3.0.0" newversion="4.3.0.0" /> </dependentassembly> when run locally within local emulator resolves issue. when packaged through cspack app.config , worker.dll.config included in package.xml , both have binding redirect included. 'microsoft.windowsazure.storage' included, both .dll , .xml . so far see it, required during runtime has been supplied. unfortunately, exception telling me redirect has not been

mysql strips unicode slash while loading data -

this csv file data sample. separated '}' q402342}aho\u2013corasick string matching algorithm q8071262}zhu\u2013takaoka string matching algorithm q8819520}category:string matching algorithms after importing in mysql , shows |q402342 | ahou2013corasick string matching algorithm | 8071262 | zhuu2013takaoka string matching algorithm | 13 | category:string matching algorithms after stripping '\' how fix ..?? following load command used load data infile 'ids_articles.csv' table wikidata_terms character set utf8 fields terminated '}' escaped '\\' lines terminated '\n'; check out https://dev.mysql.com/doc/refman/4.1/en/string-literals.html in mysql \ character known escape character if wish enter \ in string need put 2 \ in string mysql knows not trying escape string get: q402342}aho\\u2013corasick string matching algorithm

ios - Event handling in tableView -

what i'm trying handling touch events when screen getting touched, want take action. example changing background color things tried: // subclassed table view controller override func touchesended(touches: nsset, withevent event: uievent) { tableview.backgroundcolor = uicolor.orangecolor() } that didn't work, suspected tvc may not first responder table view handles touch events. tried: override func viewdidload() { super.viewdidload() tableview.resignfirstresponder() } also tried: override func becomefirstresponder() -> bool { return true } override func canbecomefirstresponder() -> bool { return true } none of them work. how can handle events ? i'm missing? edit the selected answer in terms of native swift code: override func viewdidload() { super.viewdidload() var tapgesturerecognizer = uitapgesturerecognizer(target: self, action: "tap:") tapgesturerecognizer.cancelstouchesinview =

c# - ASP.NET malfunction when signing up to an event -

we 2 students trying develop website asp.net functions. have come issue: we have booking page logged in user can sign events, have made separate tabel handling sign ups. in table have member_id session, , event id. we continue check member_id , event_id in database make sure same member cant sign same event twice. protected void page_load(object sender, eventargs e) { if (session["medlems_id"] == null) response.redirect("medlemslogin.aspx"); if (!ispostback) { if (session["redirectedmessage"] != null) { lblmessage.text = session["redirectedmessage"].tostring(); session["redirectedmessage"] = null; } } } protected void gridview1_rowcommand(object sender, gridviewcommandeventargs e) { // få fat hold_id fra den valgte kolonne og gem det variablen varhold_id var varhold_id = gridview1.rows[convert.toint32(e.commandargument)].cells[6].text; //d

Existing GIT Repos over Samba don't work from Cygwin -

i have set of git repos on samba server seems can no longer use 1 of cygwin installations i've been using them from. i have been using same server few years without touching os @ all. did update cygwin setup few days ago. $ git --version git version 2.1.4 a little while ago made edit, committed it, , attempted push. got output: $ git push origin master fatal: '//host/path/to/repo.git/' not appear git repository fatal: not read remote repository. please make sure have correct access rights , repository exists. i've been using said repo on year can't in .git/config on either side. i read git on samba cannot fetch/add/commit anymore seems have concluded diagnosis kernel bug needed patch (on client side?). since client side cygwin, not apply case. since server side has not changed (still 2.6.27) regression on side not logical possibility. there couple of other questions here started same error messages through different circumstances, , lead same con

debian - 2 servers 1 subdomain -

today have 1 debian server serving videos 1 of sites. domain name video.mysite.com. but it's getting huge amount of traffic i've installed new debian server, placed want host , running rsync between 2 debian machines. my questions is; can have video.mysite.com randomly choose file 2 records or something? i have not tried far know start.

assembly - Changing c++ for loop into x86 -

currently learning x86 assembly 1 of uni modules, have program written in c++ takes string of 6 characters , encrypts them based on encryption key. the code encrypt_chars : void encrypt_chars(int length, char ekey) { char temp_char; // char temporary store (int = 0; < length; i++) // encrypt characters 1 @ time { temp_char = ochars[i]; // __asm { // push eax push ecx lea eax, ekey push temp_char push eax call encrypt21 mov temp_char, al add esp, 8 pop ecx pop eax } echars[i] = temp_char; // store encrypted char in encrypted chars array } return; } i love on how change loop @ top of code assembly language, thank you. read jmp , reading variables byte after byte saving registers. give example, read variable var(,%esi,4) var name of yor var

java - UI freezing while application making some calculations -

i have java fx application many tableviews. how knows in javafx tableview there databinding, working in 2 directions. when application making calculcations data tableviws ui freezing, because application updates data tableviews(observablelist). did tried use platform.runlater, didn't helped me. ideas? platform.runlater delays runnable - yet again run on ui-thread hence block every user input during execution. the solution quite simple, use worker thread : task task = new task<void>() { @override public void call() { static final int max = 1000000; (int i=1; i<=max; i++) { if (iscancelled()) { break; } updateprogress(i, max); } return null; } }; progressbar bar = new progressbar(); bar.progressproperty().bind(task.progressproperty()); new thread(task).start(); although advisable use executorservice class since allows more controlled behaviour : http://java-buddy

version control - Mercurial difference between changesets and revisions -

i'm new mercurial , trying understand how things work. i wonder difference between changesets , revisions ? thanks. none. from understanding mercurial page: when commit, state of working directory relative parents recorded new changeset (also called new " revision ")... and further down page: mercurial groups related changes multiple files single atomic changesets , revisions of whole project. (emphasis mine)

Batch file problems with IF statements and parantheses -

i trying batch start experiments. need redo of them not all. ones (s==1000 , r==0.5 , (c==1 or c==25 or c==75)) have been done ok can skipped (they take long time run). ever since introduced if statements, way parentheses parsed giving errors. keep getting unexpected ( or ). i've tried rewriting whole thing, no avail. i know lot 'please check code bugs' question, @ wits end here. set dotest=1 %%s in (1000,2000) ( %%r in (0.5,0.75,1) ( %%c in (1,25,75,100) ( if (%%s==1000) ( if (%%r==0.5) ( if (%%c==1) (set dotest==0) if (%%c==25) (set dotest==0) if (%%c==75) (set dotest==0) ) ) if (%%dotest==1) ( echo "hello world!" ) ) ) ) @echo off setlocal enabledelayedexpansion %%s in (1000,2000) ( %%r in (0

WordPress Plugin Customize menu and submenu -

i made pretty menu , sub menu in word press when click on menu (jobify) says url not found . sub menus working fine . <?php //adding custom admin menu add_action("admin_menu", "addmenu"); // function of custom admin menu function addmenu() { add_menu_page("jobify menu", "jobify", "manage_options", "jobifyadminmenu",'', null, 3); add_submenu_page('jobify.php', 'user', 'user', 'manage_options', 'usersubmenu','user_manage'); add_submenu_page('jobify.php', 'jobs', 'jobs', 'manage_options', 'jobssubmenu','jobs_mangae'); add_submenu_page('jobify.php', 'setting', 'setting', 'manage_options', 'settingsubmenu','setting_manage'); } function user_manage() { include plugin_dir_path( __file__ ) . 'user.php'; } ?> you forget menu slu

javascript - Page shifts to right when a hidden div is displayed -

i using css3, html5 , javascript build page. there div hidden @ start , visible when user selets check box. happenning when select check box whole page shifts right , on deselecting checkbox returns normal position (shifts left). encountering on both chrome , ie. not sure whats causing margin, border , padding appears same when selecting checkbox. when open developer's console pressing f12, shifting not happen. ocurs when page maximized. code is: javascript $('#ispropertyhandedover').change(function () { if ($(this).prop('checked')) { $('#handoveryesdiv').prop('hidden', false); } else { $('#handoveryesdiv').prop('hidden', true); } }); css textarea.form-control{ height: 20em; } input[readonly] { cursor: default !important; } textarea[readonly]{ cursor:default !important; } #addednote{ height: 10em !important; resize: none; } .field-validation-error{ color:red } fieldset.scheduler-b

problems using Grand Central Dispatch IOS Swift Xcode 6.3.1 -

i'm learning swift , having hard time understanding multithreading issues.. specific problem im having i'm loading data internet , trying return array ("broadcasts") containing data while using dispatch_async . my problem return execution empty array happens before array filled data (this line "println(broadcasts)" happens array returns empty.. ) here code: import uikit public class broadcastrequest { func requestnewbroadcasts() -> [broadcastmodel] { var broadcasts = [broadcastmodel]() var sectionsofbroadcasts = [[broadcastmodel]]() datamanager.getbroadcastsfrom׳tweeterwithsuccess { (youtubedata) -> void in dispatch_async(dispatch_get_main_queue()) { () -> void in let json = json(data: youtubedata) if let broadcastsarray = json["result"].array { broadcastdict in broadcastsarray{ var broadcastid: string? = br