Posts

Showing posts from June, 2014

java - JBoss Hibernate Unable to locate persister error -

i've run bit of trouble again after fixing previous issue . tried many common fixes none seems working me. here relevant files project: hibernate.cfg.xml <?xml version='1.0' encoding='utf-8'?> <!doctype hibernate-configuration public "-//hibernate/hibernate configuration dtd 3.0//en" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!-- database connection settings --> <property name="connection.driver_class">com.mysql.jdbc.driver</property> <property name="connection.url">jdbc:mysql://localhost:3306/accountdb</property> <property name="connection.username">root</property> <property name="connection.password">pass</property> <!-- hibernate properties --> <property name="show_sql">true</property

c++ - std::is_same equivalent for unspecialised template types -

in 1 project have found possibility stay dry lot of code except small parts stay same template specialisations of template. here small working example i'm doing check templated class i'm using: template<typename t> class a{}; template<typename t> class b{}; template<template<class> class c> void do_stuff() { if(std::is_same<a<int>,c<int>>::value) { // stuff } else if(std::is_same<b<int>,c<int>>::value) // stuff b } } int main() { do_stuff<a>(); } what instead using std::is_same<a,c>::value to determine template type. there function me or missing pattern work better in case? i see like template<template<class> class c, typename t> void do_stuff(); do_stuff<a,t>(); but seems wrong way me. you write is_same_template trait partially specialized when 2 template template parameters same: template <template <typename...> clas

java - How to replace a repeating char at only a particular place in String? -

i have string : hi/i/jack/there which contains multiple '/' between values. , these values not of fixed length(can length) and need replace second occurrence of '/' string means output should be.. hi/iamjack/there how should achieve this? tried string.replace , logic it's replacing occurrences need 2nd occurrence replace. , i'm restricted use string only(not stringbuilder or else) count / each element in string string s = "hi/i/jack/there"; for(int i=0,count=0;i<s.length();i++) { if(s.charat(i)=='/')// if i'th element '/' { count++; if(count==2)//it's second '/' { //separate 2 part second '/' , add want @ middle s = s.substring(0,i) + "am" +s.substring(i+1,s.length()); } } }

ravendb - How to migrate NServiceBus Sagas from one Raven database to another? -

i need copy several types of sagas 1 database another. on different servers. i'm going export smuggler this: raven.smuggler out http://localhost:8080/ dump.raven --database=host1 --metadata-filter=raven-entity-name=testsaga and import dump new database. the question is : safe or need care additional things indexes or something? if going point nservicebus server that, need create indexes well

php - Laravel Ajax Search -

Image
i trying create search form, searches record in database table while user typing search field. controller public function search() { // search term $term = input::get('term'); // search members table $members = db::table('members') ->where(concat("members.member_first_name,' ',members.member_last_name"), 'like', "$term") ->orwhere(concat("members.member_last_name,' ',members.member_first_name"), 'like', "$term") ->orwhere(concat("members.member_name_affix,' ',members.member_last_name,' ',members.member_first_name"), 'like', "$term") ->orwhere(concat("members.member_first_name,' ',members.member_name_affix,' ',members.member_last_name"), 'like', "$term") ->orwhere('members.member_first_name&#

selenium - Visual Studio Team Services (was Visual Studio Online) TestResults - Open attachment in browser -

we're using mstest team services (was visual studio online) builds run our selenium tests and, failed ones, i'm taking screenshot in testcleanup added test results using testcontext . now, when i'm checking test results failed tests, , want open attachment (a .png image), team services prompting download instead of displaying in browser, become pain when have new build of app , lot stuff changed causing multiple tests fail. is there possibility force team services or browser open images in browser? i'm open changing type of attachment, potential "hacks" determine team services display image in browser, browser extensions, etc. there isn't option configure @ vsts/vso side now, have submit feature request on vsts user voice, refer link details: open attachments of test result web portal in browser . however, if using firefox, know there open in browser add-on allow open document browser directly.

javascript - Login page with ionic, transaction errors -

i have issue, beginner this. login page ionic, error says : referenceerror: res not defined @ object.loginuser ( http://localhost:8100/js/services.js:41:25 ) @ scope.$scope.dologin ( http://localhost:8100/js/controllers.js:23:22 ) @ fn (eval @ compile ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:27638:15 ), :4:212) @ http://localhost:8100/lib/ionic/js/ionic.bundle.js:65427:9 @ scope.$eval ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:30395:28 ) @ scope.$apply ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:30495:25 ) @ htmlanchorelement. ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:65426:13 ) @ defaulthandlerwrapper ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:16787:11 ) @ htmlanchorelement.eventhandler ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:16775:9 ) @ triggermouseevent ( http://localhost:8100/lib/ionic/js/ionic.bundle.js:2953:7 ) error trans [object sqltransaction] my controllers.js :

WiX Installer removes config file values on repair -

i have created installer copies config.ini , asks user values inserted ini file. works fine during fresh install , major/minor upgrades. <component id="configini" guid="guid-goes-here" diskid="1"> <file id="configinifile" name="config.ini" source="../../artefacts/etc/template-config.ini" keypath="yes"/> <inifile id="valueone" action="addline" directory="etc" section="sectionone" name="config.ini" key="valueone" value="[valueoneproperty]" /> <inifile id="valuetwo" action="addline" directory="etc" section="sectiontwo" name="config.ini" key="valuetwo" value="

vb.net - FileSystemWatcher is not firing events -

as newbie in vb have troubles in filesystemwatcher . ominous reason not fire events. want check files being copied, deleted or edited in directory. i appreciate help!! here code: public class filewatcher public sub run(path string) dim watcher new filesystemwatcher() watcher.path = path watcher.filter = "*.xml" watcher.notifyfilter = notifyfilters.filename or notifyfilters.lastwrite or notifyfilters.creationtime addhandler watcher.changed, addressof onchanged addhandler watcher.created, addressof onchanged addhandler watcher.deleted, addressof onchanged addhandler watcher.renamed, addressof onrenamed watcher.enableraisingevents = true end sub public function onchanged(source object, e filesystemeventargs) string ' returns file name later use console.writeline("monitoring: " + e.fullpath) return e.fullpath end function public function onrenamed(source object, e renamedeventargs) string console

swift - SceneKit error loading skinned character -

whenever try load scene skinned character error: scenekit: error, library deserialization: cannot finalize deserialization of <c3dskin ...> the code generating error: let heroscene = scnscene(named: "art.scnassets/hero.scn")! this includes .dae character file download internet, hero character apple's wwdc slideshow. this seems bug xcode 8. filed bug report apple marked duplicate of "open" report. hope apple's going fix next xcode update. edit: bug has been fixed in xcode 8.2 beta.

angularjs - Hide div if viewbag is true angular MVC -

i have viewbag in mvc controller viewbag.total = true; and want check in razor view angular code , display or hide div <div ng-show="list" class="divlist"> content here </div> update <div ng-show="'@(viewbag.total)'">content</div> i have try angular ng if not working razor syntax doesn't work me. idea? thank you @{ var total= (string) viewbag.total; } <div ng-if="total== 'true'"> </div> updated : please check this @{ var total= (string) viewbag.total; } <div ng-if="total"> </div> use this

r - sorting set of data.frame by paired-row? -

this question has answer here: how sort dataframe column(s)? 15 answers i have 3 data.frame objects, did combine them , remove duplicated instances, seems order not enough, want sort them in natural order. how can make happen more efficiently? toy data foo <- data.frame( start=seq(1, by=4, len=6), stop=seq(3, by=4, len=6)) bar <- data.frame(start=seq(5, by=2, len=7), stop=seq(7, by=2, len=7)) bleh <- data.frame(start=seq(1, by=5, len=5), stop=seq(3, by=5, len=5)) i did combine them follows: out <- rbind.data.frame(foo, bar, bleh) out <- out[!duplicated(out),] but out doesn't have right order, want sort them in correct order row. desired output: (manually pin out) start stop 1 1 3 2 5 7 3 6 8 4 7 9 5 9 11 6 11 13 7 13 15 8 15 17 9 16 18 10

html - Css transition with background-color -

i've got image dark overlay on hover. works, want background slide in . i've tried doing transitions , background shows, doesn't slide in. code html <div class="products_overlay"> <a href="<?php echo $_product->getproducturl() ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(200); ?>" class="hover_test" /></a> <ul> <li> <?php echo $_product->getdata(‘price’); ?></li> <li> <?php echo $_product->getattributetext(‘desc); ?></li> <li> <?php echo $_product->getattributetext('country'); ?></li> </ul> </div> css .hover_test { position: relative; } .products_overlay:hover:after { content: ""; posi

c - What is the underlying mechanism of char array[] = "string"? -

i know in c string assignment must go through char string[4]; strcpy(string, "aaa"); but why , how c allow char string[] = "string"; ? thanks in advance char string[] = "string"; here, right length of string automatically calculated compiler there's enough room string , nul character. char string[4]; strcpy(string, "aaa"); here strcpy may access beyond array bounds if string larger actual string capacity.

hive - HiveServer versus HiveServer2 -

i know hiveserver doesnot support multi-client concurrency , authentication , handled in hiveserver2. i want know how handled in hiveserver2 , why doesnot support in hiveserver. thanks, sree the answer question simple, got know few days ago. each , every client has connected through thrift api in hiveserver or hiveserver2 in turn launches process convert client code hive understandable code launching language specific class libraries. as aware, process can single or multi threaded. in hiveserver1, process launched single threaded class libraries doesnot support multi threads. in hiveserver2, these have been upgraded multi thread class libraries , supports multiple sessions. related security, please refer link below http://blog.cloudera.com/blog/2013/07/how-hiveserver2-brings-security-and-concurrency-to-apache-hive/ thanks, sree

java - How to achieve this type of parallax effect in LibGdx? -

i working in game geometry dash in libgdx , got parallax background , want achieve "front" parallax example in video . i have use different layers? what trick in video? i hope give me idea c: here actual parallax background parallax

authentication - SLO with SAML 2.0 (SP initiated SLO or IDP initiated SLO), which one is good to have in service provider -

we created application (sp), have option login via sso (single sign on) using third party application (any idp). used saml 2.0 complaint sso(single sign on). question : which 1 have in application (sp initiated slo or idp initiated slo)? how many application using sp initiated slo , idp initiated slo? (1 or 2 application(sp) name each integrated third party app) how creating both , keeping slo optional idp? can me there no requirement provide slo. many large service providers not (google apps , salesforce, example). if you're going provide it, it's opinion should support both, not require of sp (make option within sp). enterprise implementations (pingfederate, oam, siteminder, etc.) aware of support both, not require either, on both sp , idp sides.

arrays - Bash - Only go next index when new line occurs, instead of white space? -

i'm parsing json response tool called jq. output jq give me list of full names in command line. i have variable getnames contains json, example: { "count": 49, "user": [{ "username": "jamesbrown", "name": "james brown", "id": 1 }, { "username": "matthewthompson", "name": "matthew thompson", "id": 2 }] } i pass through jq filter json using following command: echo $getnames | jq -r .user[].name which gives me list this: james brown matthew thompson i want put each 1 of these entries bash array, enter following commands: declare -a myarray myarray=( `echo $getnames | jq -r .user[].name` ) however, when try print array using: printf '%s\n' "${myarray[@]}" i following: james brown matthew thompson how ensure new index created after new line , not s

php - Decrypt a video file and stream it to the client on the fly -

i running simple webserver stack php , apache . have system ram , disk space needed -- speed of course welcome not worry about . i able have simple way read local encrypted video file (say, 256-bit aes), decrypt custom input, , send client (e.g browser) if simple video file . i have no idea how start going this. if show me code sample great, if give few pointers happy. i think use output buffering, again not sure. don't know crypto library use -- since apparently if typing word "mcrypt" code, doing wrong. here pseudocode thought up: $key = "[string key]"; $file = "/home/qnx/file.mp4.encrypted"; ($i = 0; $i < [file length]; $i++) { /* get, few bytes of file , decrypt them? dunno */ '... decrypt bytes ...' '... save buffer ? ...' /* send current buffer ? */ } '... close connection ...'

design board using dynamoDB -

i want make board using dynamodb. post have board name , timestamp , info. want receive posts sorted timestamp in specific board name. think model, partition key board name, , range key timestamp. same partition key called. how can make model? i recommend read guide: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/guidelinesfortables.html for questions - depend on how many read/writes.. etc.. believe doc can answer scenario

ios - Using nested reduce in Swift -

Image
i have array contains arrays of double , in screenshot: my goal sum of multiplication of double elements of each array. means, want multiply elements of each array then, in case, have 3 values sum of them. i want use reduce , flatmap ? or elegant solution. what have tried ? totalcombinations.reduce(0.0) { $0 + ($1[0]*$1[1]*$1[2]) } but work when know size of arrays contains doubles. given these values let lists: [[double]] = [[1.1, 2.2, 3.3], [4.4, 5.5, 6.6]] let's take @ several possible approaches solution #1 let sum = lists.reduce(0) { $0 + $1.reduce(1, combine: *) } solution #2 if define extension extension sequencetype generator.element == double { var product : double { return reduce(1.0, combine: *) } } then can write let sum = lists.reduce(0) { $0 + $1.product } solution #3 with extension defined above can write let sum = lists.map { $0.product }.reduce(0, combine:+) solution #4 if define these 2 postfix operators

lotus domino - XPages control is not displaying properly -

Image
running xpages application on redhat enterprise linux server 6.5 notice problem control, example unable open , close section control rich text control(ckeditor) display textbox. see image below: can tell me wrong or need fix problem i don't know redhat know if there os-specific issues. is database set compile specific (older) version of domino? if so, looking specific release's dojo components. newly-installed server have latest dojo version, not historical versions, can explain looking different on 1 server , another. using firebug should confirm dojo version it's looking , whether it's failing find files @ specific location.

angularjs - how to open an angular xeditable input automatically without editable-form -

i'm using angular xeditable text control. want open in edit mode automatically. how can it? my question similar this one however, not using editable-form (not using form element @ all). solutions find using editable-form's $show() function, not have if not have editable-form. while @ it, use functionality provided editable-form's $seterror() function, without using editable-form , not through onbeforesave or onaftersave attributes (i want upon opening xeditable text control, not when user submits). possible ? i not want use editable-form because have 1 xeditable input, , use of form changes things submit, blur, buttons displayed, etc. in ways not want.

c++ - Linking with a g++ library fails -

currently have shared library compiled gcc , have build binary (with g++) uses c shared library. works fine if compile gcc, no loading errors. if compile the shared library g++ , recompile binary uses library g++, @ runtime, complains can't find library if paths correct. this ldd output when library compiled gcc: ldd adas_bin | grep -i ovx /home/ubuntu/working/bin/libovx.so (0xf6e02000) this ldd output when compiled g++ (the file exists @ path): ldd adas_bin | grep -i ovx /home/ubuntu/working/bin/libovx.so => not found this output of file command both library versions: elf 32-bit lsb shared object, arm, eabi5 version 1 (sysv), dynamically linked when running binary library compiled g++ this: ./adasbin: error while loading shared libraries: /home/ubuntu/working/bin/libovx.so: cannot open shared object file: no such file or directory what may go wrong when using g++ version of library ?

php - Warning: Missing argument 1 for Personnage::__construct() -

i receiving following error code. please me out. warning: missing argument 1 personnage::__construct(), called in public_html/pooenphp/index.php on line 24 , defined in public_html/pooenphp/personnage.class.php on line 22 class file : personnage.class.php <?php class personnage { private $_force = 20; private $_localisation = 'lyon'; private $_experience = 0; private $_degats = 0; // create connstructor 2 arguments public function __construct($force, $degats) { echo 'voici le constructeur ! '; $this->_force = $force; $this->_degats = $degats; } the file instantiating personnage class: index.php <?php function chargerclasse($classe) { require $classe . '.class.php'; } //autoload function chargerclasse spl_autoload_register('chargerclasse'); // instantiate personnage class using default

javascript - Testing socket.io with Zombie.js across two browsers -

i'm building real time chat app using node , socket.io. having problems trying feature test using zombie. app working fine in browser test failing message assertionerror: expected '' include 'hello' during debugging seems when zombie presses send button not fire 'chat message' event - though in development. describe('chat feature', function() { beforeeach(function(done) { browser1 = new browser({ site: "http://localhost:3000" }); browser2 = new browser({ site: "http://localhost:3000" }); done(); }); beforeeach(function(done) { browser1.visit('/', done); }); beforeeach(function(done) { browser2.visit('/', done); }); describe("chat page has been rendered", function() { beforeeach(function(done) { browser2.pressbutton('javascript testing'); browser2.fill('.chatbox-input', 'hello&

javascript - facebook API v2.7 in node.js how to get comments and likes count -

i trying make request fetching share_count, like_count, comment_count, total_count, commentsbox_count, comments_fbid , click_count node.js server using new facebook api v2.7 . what came out until : var likescount=0; var commentcount=0; var sharecount=0; rp(graphapireq, { json: true }) .then(res => { commentcount = res.share.comment_count; sharecount = res.share.share_count; let graph_id = res.og_object.id; let likesapireq = https://graph.facebook.com/v2.7/${graph_id}/likes?summary=true&access_token=${appid}|${appsecret} ; rp(likesapireq, { json: true }) .then(likesres => { likescount = likesres.summary.total_count; }) response.send({likescount,commentcount,sharecount}); }) so have here 2 calls : 1. fetch comments count in weird way 0 , , share co

angularjs - How to resolve an error like: TypeError: Cannot read property 'length' of undefined in angular nvd3 discrete bar chart? -

i using angular nvd3 discrete bar chart, fetching values $http , showing in discrete bar chart, chart showing value getting error typeerror: cannot read property 'length' of undefined how can resolve error? below code: <!doctype html> <html ng-app="plunker"> <head> <meta charset="utf-8" /> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-nvd3/1.0.5/angular-nvd3.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.1/nv.d3.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.1/nv.d3.min.css"/> <script

How to fix codenameone ios push error : P12 password is missing -

i getting error while pushing notifications ios device server: exception while generating certificate data, p12 password missing: java.lang.illegalargumentexception: passwords must specified.oracle java sdk not support passwordless p12 certificates i sending required parameters including p12 certificate url & password provided cn1. how diagnose or fix issue ? the p12 certificate generated using cn1 wizard , got email link , password. push request sent asp.net mvc application running on iis web server. android requests sent same server work fine.

powershell - Invoke-webrequest image size -

the script below loops through each url , invokes web request , downloads images it. problem facing images default getting downloaded in 320x240; on actual site image when opened in new tab , right click downloaded, gives me 960x720 pix file, after. here script. $url = get-content “urls.txt” $j = $url.count ($i= 0 ; $i -le $j ; $i++) { $webresponse = invoke-webrequest -uri $url[$i] foreach ($image in $webresponse.images) { $filename = split-path $image.src -leaf $d = invoke-webrequest $image.src } } here links couple of them: http://csharp-video-tutorials.blogspot.com/2013/08/part-1-introduction-to-html ; http://csharp-video-tutorials.blogspot.com/2013/08/part-2-reading-writing-to-console.html compare $image.src mentionend 'new tab', these urls same? probably need use $webresponse.links (which end *.jpg) , not $webresponse.images .

python - Scrapy: overwrite DEPTH_LIMIT variable based on value read from custom config -

i using initspider , read custom json configuration within def __init__(self, *a, **kw): method. the json config file contains directive can control crawling depth. can read configuration file , extract value. main problem how tell scrapy use value. note: dont want use command line argument such -s depth_limit=3 , want parse custom configuration. depth_limit used in scrapy.spidermiddlewares.depth.depthmiddleware . might have had quick @ code, you'll see depth_limit value read when initializing middleware. i think might solution you: in __init__ method of spider, set spider attribute max_depth custom value. override scrapy.spidermiddlewares.depth.depthmiddleware , have check max_depth attribute. disable default depthmiddleware , enable own 1 in settings. see http://doc.scrapy.org/en/latest/topics/spider-middleware.html a quick example of overridden middleware described in step #2: class mydepthmiddleware(depthmiddleware): def process_spi

eclipse - Programming SAM uC family without ATmel Studio -

Image
i've asked question on : https://electronics.stackexchange.com/ no success, i'm trying luck here. i've designed board used sam uc (cortex m0+). don't want use atmel stduio, want learn how use eclipse , arm-gcc , openocd ( still can't understand, 1 ?). question possible , if yes, has hint how can proceed ? i've installed 3 parts,and farthest get: i agree notlikethat, cant figure out. 1) yes, have dozens or hundreds of bare metal microcontroller examples use gnu toolchain, no ides, command line. no problems there whatsoever. 2) openocd open source tool knows how speak on chip debuggers, in particular arm ones. , supports jtag , swd cortex-m0+ have if exposed (which is). 3) sam microcontroller there hundreds of different ones on decade or so, cortex-m0+ narrows down more thousands more hundreds of different ones. narrow down @ least 1 family. popular samd21? have used 1 of those, , using openocd , gcc quite doable without need ide

c# - Entity Framework Regex Mismatch -

hey guys i'm putting simple asp.net mvc form. first , last name i'm trying ensure letters a-za-z can used , minimum , maximum of 1-50 characters can used, seem have regex mismatch. [required(errormessage = "please enter first name.")] [display(name = "first name")] [stringlength(50, minimumlength = 1, errormessage = "first name should not longer 50 characters.")] [regularexpression(@"^[a-za-z]{1, 50}$")] public string firstname { get; set; } i have tested regex statement in few online calculators tell me corect mismatch appears when testing form. any ideas? regex correct? again guys tip on one. in keeping wiktor's suggestion have fixed misunderstanding regex , not typo :s have allowed non-english characters such á é etc ^[a-za-z-_ ’'‘ÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯy̨Ƴąɓçđɗęħįƙłøơşșţțŧųưy̨ƴÁÀÂÄǍĂĀÃÅǺĄÆǼǢƁĆĊĈČÇĎḌĐƊÐÉÈĖÊËĚĔĒĘẸƎƏƐĠĜǦĞĢƔáàâäǎăāãåǻąæǽǣɓćċĉčçďḍđɗðéèėêëěĕēęẹǝəɛġĝǧğģɣĤḤĦiÍÌİÎÏǏĬĪĨĮỊIJĴĶƘ

linux - Assign into named variable within a shell function -

this question has answer here: indirect variable assignment in bash 3 answers i have typical issue assign variable select statement, i've tried many options, none of them work.. i have function replace column name on upper(column name). upper=(column1 column2) # array variable upper_function() { query="$1" ((i=0;i<${#upper[@]};i++)) query=$(echo "$query" | sed -e "s/\b"${upper[$i]}"\b/upper(${name[$i]})/g") done sqlquery="$query" } below have sql statement: sqlquery="select column1,column2 table" now, change column1 , column2 upper(column1) , upper(column2). so run function: upper_function "$sqlquery" solution above works fine, case instead of sqlquery="$query" i make function more automatic , assigning name of select statement variable eg below: $2=&qu

perl - Why am I getting 0E0 for the return value of the DBI "execute" method? -

i have written sample perl program delete data database table. this code have written, use dbi; $dbh = dbi->connect("dbi:pg:host=192.168.12.23;port=5432;", "adhi"); if ( $dbh ) { print "connected successfully\n"; $exe = $dbh->prepare("delete perl_test.test"); $res = $exe->execute(); if ( $res ) { print "deleted table of rows: $res\n"; } } if have executed above should print successful message , number of rows deleted. if table empty printing 0e0 instead of 0 . don't know how returning value this? can please explain me how working? it done in way allow test whether operation successful. reason '0e0' (as string) true value, 0 false value in perl. therefore: you can test return value in if determine whether operation successful (true means success), but can use return value num

ScrollView is not scrolling in android -

Image
hi new android , cant understand why happening. unable scroll scrollview. has textview , imageview , few linear layouts inside of , code below can 1 me please code:- <?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/white" android:orientation="vertical" android:theme="@style/content"> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="15dp" android:animatelayoutchanges="true" android:orientation="vertical" android:scrollbars="vertical"> <textvie

ios - What algorithm is used in [NSString containString:] this function in ObjC? -

i want make app addressbook, needs add search feature. hope search feature can support string matching, , found [nsstring containstring:] function in nsstring class. in order efficiently, want use string matching algorithm achieve it, kmp. want know algorithm used in function. , can on source code of nsstring function? thx. the assembly following: foundation`-[nsstring containsstring:]: -> 0x10a128954 <+0>: pushq %rbp 0x10a128955 <+1>: movq %rsp, %rbp 0x10a128958 <+4>: pushq %r15 0x10a12895a <+6>: pushq %r14 0x10a12895c <+8>: pushq %rbx 0x10a12895d <+9>: pushq %rax 0x10a12895e <+10>: movq %rdx, %r14 0x10a128961 <+13>: movq %rdi, %rbx 0x10a128964 <+16>: movq 0x1836d5(%rip), %rsi ; "length" 0x10a12896b <+23>: movq 0x19ddee(%rip), %r15 ; (void *)0x000000010a4bb800: objc_msgsend 0x10a128972 <+30>: callq *%r15 0x10

angularjs - Uncaught Error: 10 $digest() iterations reached. Aborting angular ng-repete infinite loop -

template code <ion-item ng-repeat="itemlist in itemlists" href="#/app/itemdetail/{{itemlist.itemnum}}"> <h2 class="title"> {{itemlist.itemnum}} </h2> <h4 class="title"> {{itemlist.itemdes}} </h4> <h4 class="title"> {{itemlist.binnum}} </h4> </ion-item> controller code datafactory.getitemdetails(categoryid).then(function (data_) { $scope.itemlists = data_.rows; $ionicloading.hide(); }, function (error) { console.log('error getting data' + error); $ionicloading.hide(); });**strong text** first time posting question here.i not able identify what's wrong here ng-repeate going in infinite loop.

c - What is the difference between execution and evaluation? -

we expresssions "evaluate" values , statement orders computer "execute". me seems same terminology. difference between execution , evaluation in c? when statement executed comes action of evaluation of expressions. first execution takes place , evaluation. in snippet int = 5, j; j = 10 + 5*i; when statement j = 10 + 5*i; executed evaluation of expressions j , 10 , 5*i , 10 + 5*i , j = 10 + 5*i takes place. note first 3 can evaluated in order.