Posts

Showing posts from February, 2011

Reading Third Word of File Input (C++) -

so doing practice exam 1 of classes, i'm stuck how solve problem. given following c++ code: #include <iostream> #include <fstream> using namespace std; int main​() { ifstream infile("princes.txt"); string s; while(________________) { cout << s << endl; } cout << endl; return 0; } and ________ is, supposed fill in code generate desired output. not allowed modify code besides underscored area. file reading in called "princes.txt" , desired output are: "princes.txt" prince of persia prince of wales prince of bel-air prince of egypt desired output: persia wales bel-air egypt i'm stuck on how read third word of each line using underscored area. know how read whole line getline or 3 separate strings output third string each time, since we're not allowed modify else, i'm lost. how about: while(infile>>s && infile>>s && infile>>s) which clobber

php - Laravel 5.0 redirect not working -

i developing custom access control system in laravel 5.0. have created helper function check if user has permission before executing function public function index() { if( has_permission( 'blahblah' ) ) { // actions } } and have helper function has_permission function has_permission( $action ) { $current_user_perms = array( 'view_users', 'create_users', 'edit_users', 'delete_users' ); if( !in_array( $action, $current_user_perms ) ) { return redirect()->route('access_denied'); } return true; } but when permission fails, not redirecting. idea? you should return redirect response make working. change helper return boolean value: function has_permission($action) { $current_user_perms = ['view_users', 'create_users', 'edit_users']; return in_array($action, $current_user_perms); } in controller check helper method , return redirect response if ne

PHPUnit + Sonarqube exported coverage do not match with actual xml result -

sonarqube: 5.1.2 sonar-runner: 2.2.1 php plugin: 2.6 phpunit 4.2.6 we're running phpunit on our application i'm not able correct coverage % on sonar expected. in phpunit.xml have filters defining folders want cover. <whitelist adduncoveredfilesfromwhitelist="false"> <directory>./site-library-php/src/main/php/babelcentral/model/content</directory> </whitelist> in sonar properties sonar.modules=php-module php-module.sonar.phpunit.coverage.analyzeonly=true php-module.sonar.phpunit.analyzeonly=true php-module.sonar.php.tests.reportpath=site-main-php/src/test/target/reports/phpunit.xml php-module.sonar.php.coverage.reportpath=site-main-php/src/test/target/reports/phpunit.coverage.xml viewing log on jenkins, tests seem run fine , ends with: tests: 1479, assertions: 4165, failures: 58, incomplete: 14, skipped: 55. generating code coverage report in clover xml format ... done generating code coverage report in ht

c# - row is missing while binding to Kendo ui grid -

i have table called user account. have values follows: [{"amount":17.0000,"dateoftransaction":"/date(1422815400000+0530)/","useraccountid":12,"useraccounttype":"useraward","userpoints":150}, {"amount":3.1700,"dateoftransaction":"/date(1431596225417+0530)/","useraccountid":44,"useraccounttype":"userorder","userpoints":32}, {"amount":15.0000,"dateoftransaction":"/date(1432625433707+0530)/","useraccountid":53,"useraccounttype":"userorder","userpoints":150}]" i trying displaying these values using kendo ui grid. among these, last 2 rows displaying. first row missing have user account type "user award". values return server having 3 rows. @ time of binding shows last 2 rows. here code: $("#transactions-grid").kendogrid({ datasource: {

ios - UIRemoteNotificationType not working properly in Swift 2 -

this code given me in swift: if application.respondstoselector("registerusernotificationsettings:") { let usernotificationtypes = uiusernotificationtype.alert | uiusernotificationtype.badge | uiusernotificationtype.sound let settings = uiusernotificationsettings(fortypes: usernotificationtypes, categories: nil) application.registerusernotificationsettings(settings) application.registerforremotenotifications() } else { let types = uiremotenotificationtype.badge | uiremotenotificationtype.alert | uiremotenotificationtype.sound application.registerforremotenotificationtypes(types) } i receive error @ line 2 telling me: | not prefix unary operator what mean? i receive error @ line 7 telling: binary operator | cannot applied uiremotenotificationtype can me better understanding on this? i'm clueless on what's going on. in ios 9, apple doesn't give option use | , need group [.bag

Grouping sets algorithm -

need develop algorithm solve following task given: the n sets different number of elements expected result: the new m sets containing ≥x common elements of n sets example: n1=[1,2,3,4,5] n2=[2,3,5] n3=[1,3,5] n4=[1,2] if x=3: m1=[1] (from n1,3,4) m2=[2] (from n1,2,4) m3=[3,5] (from n1,2,3) given n sets (noted ni ) of sorted integers, initialize n variables hi which hold heads of each set. while there still exist indexes hi that haven't reached end of respective ni , iterate on values vi=ni[hi] and find minimum value vmin , count number of occurrences n and store corresponding indexes j (which can in 1 loop). increment the hj . if n>x , gives new set m = [vmin] (from nj) . up model data representation accordingly use (from nj) as map key.

MongoDB: Search minimum, maximum in nested object with dynamic field name -

i have query minimum query , maximum query on below sample data set. in case fields names dynamic, below product_1 , product_2 ... { "_id" : numberlong(540), "product_1" : { "ordercancelled" : 0, "orderdelivered" : 6 }, "product_2" : { "ordercancelled" : 3, "orderdelivered" : 16 }, "product_3" : { "ordercancelled" : 5, "orderdelivered" : 11 } } i not getting idea how can in mongo field names dynamic, means in future there may other products created product_4 , product_5 same id . i need query gives me minimum value orderdelivered , maximum value ordercancelled , example in above document result orderdelivered:16 & ordercancelled:0 . idea. you should restructure document product documents in array: { "_id": numberlong(540), products: [

.htaccess blocks all file access, regardless of commands -

my .htaccess file blocking everything, when there no commands in so. here file contents rewriteengine on rewritecond %{http_referer} !^http://www.example.com/.* rewriterule .*\.mp3 - [nc,f] this blocking files of type, regardless of request comes from. in fact if delete lines , leave rewriteengine on everything still blocked. please help. cheers i solved myself. turns out .htaccess not being honoured @ all. the solution remove +followsymlinks apache config file, in directory area <directory "/var/www"> allowoverride </directory> also modrewrite may have not been enabled. did command line with. sudo a2enmod rewrite and restarted apache service apache2 restart hope helps else. cheers

Ldap ux with c++ on HPUX -

i have c++ code integrating ldap-ux hp, far have manage simple poc running. production use must able configure network related things timeouts,etc , seemed in blind on matter. here small piece of code , @ first glance don't see way of setting timeout or other options ldap *ld = ldap_init(host.c_str(), port) ; if( ld == null) { //std::cerr << "error in initializing ldap against server " << host << ":" << port << std::endl; //throw verify_exception("error ... see std::cerr."); return as::ldap::error_ldap_init; } is there reference can use ?

assembly - MIPS floating point add -

i'm trying make simple function adds floats passed arguments in mips. did simple code add ints: move v0,a0 add v0,v0,a1 j ra copying did alike floats l.d $f0,0($a0) l.d $f2,0($a1) add.d $f0,$f0,$f2 j ra which results in compiling error: error: illegal operands `l.d' which i'm guessing because of how i'm trying arguments a0. how suppossed receive double floating point arguments, adding them , returning them. thanks in advance try ldc1 instead of l.d . l.d macro , reason it's not defined/available.

c++ - How can I use goto to perform a task for a file instead of using a function? -

so i've heard using goto makes terrible person, i've never experimented until recently. fun, decided make program heavily relies on goto statements see myself when can come in handy. in other words, purposely trying stay away accepted programming, , i'm experimenting other methods... that being said, ran first issue. want read file, , emulate "function" transferring data gathered part of code.. run through... , return file. here of code can basic idea of i'm trying do: #include <iostream> #include <fstream> using namespace std; int main() { string command, filename, fileline; while (command != "quit") { cout << "cmd> "; cin >> command; if (command == "function") { function: // want manipulate data gather file here. cout << "perform task here instead of using function." << endl; goto

r fill a dataframe with parallel code -

i have written r function follows structure: output <- data.frame(...) # declare appropriate dataframe (files in folder) (i in loop2) (j in loop3) res <- ... # compute result name <- ... # compute name current row output <- rbind(output,res) # fill data frame... rownames(output)[nrow(output)]<-rowname # ... specific row name apparently, terrible in r. make treatment parallel, don't know how start. idea ? lot. to inner loops need know more structure of data , doing make useful suggestions. end using lapply or sapply . for outer loop foreach package may started. parallelization syntax looks loop, use rbind tool combine results. in general, more efficient assign row names outside of inner loops in 1 step rather @ each inner step.

jquery - How to get the id of a record in a html table? -

i have table contain records of database. i'm trying obtain id of these registers using jquery dont know how this. how ? <script type="text/javascript"> $(document).ready(function(){ $('#btnabrirempresa').click(function(){ //id register var id = $(this).closest('tr').attr('[empresa][id]'); alert(id); var loading = $(".imageloading"); $(document).ajaxstart(function () { loading.show(); }); $(document).ajaxstop(function () { loading.hide(); }); $.ajax({ accepts: {json: 'application/json'}, datatype:'json', type: "post", url: "<?php echo $this->html->url("/empresas/openempresa.json")?>", data: {"id":id}, su

how to change the datetime format in a column in a dataframe with python -

i have dataframe in python in there column composed date/time (dd/mm/yyyy hh.mm) , want change format dd-mm-yyyy hh:mm can't find way! have data ora valori 0 01/11/2014 03.00 38 1 01/11/2014 04.00 38 2 01/11/2014 05.00 38 3 01/11/2014 06.00 38 4 01/11/2014 07.00 38 5 01/11/2014 08.00 38 6 01/11/2014 09.00 38 7 01/11/2014 10.00 38 8 01/11/2014 11.00 38 9 01/11/2014 12.00 38 and need: data ora valori 0 01-11-2014 03:00 81 1 01-11-2014 04:00 72 2 01-11-2014 05:00 69 3 01-11-2014 06:00 62 4 01-11-2014 07:00 62 5 01-11-2014 08:00 73 6 01-11-2014 09:00 81 7 01-11-2014 10:00 112 8 01-11-2014 11:00 124 9 01-11-2014 12:00 115

solr - Alfresco 5.0 transactional queries -

i have questions how index in alfresco 1 works transactional queries. we use alfresco 5.0.2 , in documentation can read this: "when upgrading database, can add optional indexes in order support metadata query feature." suppose in model.xml add custom property this: <type name="doc:mydoc"> <title>document</title> <parent>cm:content</parent> <properties> <property name="doc:level"> <title>level</title> <type>d:text</type> <mandatory>true</mandatory> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>both</tokenised> </index> </property> ... </properties> </type> and have on alfresco-global.properties these sets

java - javafx: How can I make a label automatically updates its text color depending on a String Property? -

basically item class has 2 stringproperty s, namely amount , upordown . values automatically update overtime. all have done far bind label1 's textproperty first stringproperty , amount . fxlabel1.textproperty().bind(item.amountproperty()); question 1: what want bind color of label's text second string property upordown , i.e. text color gold when upordown up , purple when upordown down . how can achieve this? question 2: second, want display image in separate label (not sure if label best option here) depending on string value of upordown . similar exercise, want display image1 in label when upordown up , image2 when upordown down . how can achieve ? you can use binding : label.textfillproperty().bind( bindings.when(upordown.isequalto("up")) .then(color.gold).otherwise(color.purple)); similarly, question 2 can use bindings loading image imageview.

javascript - JQuery animating more elements -

i'm trying set application , need animate several items @ 1 time. function getdata() { for(i=0, i<data.length, i++) { ... animate(id, top, left); } } function animate (id, top, left) { $("#" + id).animate({top: top, left: left}, {duration: 1000, queue: false}); } what is, gets data server through ajax, gets id, top , left position. have divs these ids , need animate them position given in left , top coordinates. problem is, when call function elements jump given position except last one, animates should. issue? you can use jquery multiselection: $("#element0, #element1").fadein() in case: function getdata() { var ids = "" for(i = 0; < data.length; i++) { // retrieve 'id', top , left ids += "#" + id if (i < data.length - 1) { ids += "," } } animate(ids, top, left); } function animate (ids, top, left) { $(ids).a

asp.net - Azure web site - How to get server error details (truncated trace file) -

i'm using azure web api 2. clients getting 500 errors, , i'm trying figure out why. i've turned on tracing in azure portal, , without truncated file, see great info like: 235. - general_response_entity_buffer {"message":...,"exceptionmessage"...,"stacktrace":"..... the problem log files getting truncated @ 1mb. (the amount of posted json data can large, eats log space.) i see potentially nice .htm files in logfiles/detailederrors, generic pages without details or trace info. in web.config set <customerrors mode="off" /> . added detail trace files, not detailederrors htm files. questions: 1) can increase max size of trace file? (i tried unsuccessfully using maxlogfilesizekb, didn't know put it, presumably in web.config.) 2) other way see stack trace information on server errors logfiles directory on server, or otherwise? i think problem might logging wrong place. there's 3 different p

How do I transform a large, often-used C++ macro with trivial per-use changes into a C++ template or similar? -

i'm working on container, has code similar following pseudocode: #define large_insert_macro (assignment_object) \ if (some_stuff) \ { \ ... more stuff ... \ allocator.construct(place_to_insert_to, assignment_object); \ ... etc ... \ } \ else if (other_stuff) \ { \ ... different stuff ... \ allocator.construct(place_to_insert_to, assignment_object); \ ... etc ... \ } \ else \ { \ ... other different stuff ... \ allocator.construct(place_to_insert_to, assignment_object); \ ... etc ... \ } \ ... more stuff again... \ iterator insert(the_type &object) { large_insert_macro(object) } iterator insert(the_type &&object) { large_insert_macro(std::move(object)) } template<typename... arguments> iterator emplace(arguments... parameters) { large_insert_macro(parameters...) } given fact code before , after each insertion type both necessary insertion, not change between insertion types , cannot factored away 2 sepa

c++ - Ordered Linked List errors -

i know of code isn't working when first run program , first string read in text field program errors out.the main function passing string "insert list function" in implementation. program suppose insert node every time string read in text file. program call call delete function know isn't working yet(that why commented out). trying find error created when insert function called. main function has while loop creates node every text entry , passes node 1 one sorted in abc order. header file: #include <string> using namespace std; struct node { string data; node * next; }; class list { public: list(); ~list(); bool insert(string); bool delete(string); void print(); bool edit(string, string); private: node * head; node * cur; node * trailer; }; implementation: #include <iostream> #include <string> #include <fstream> #include "list.h" using namespace std; list::list():head(null) {} list::~list() {} bool list::insert(s

Python Testing - Reset all mocks? -

when doing unit-testing python / pytest, if not have patch decorators or with patch blocks throughout code, there way reset mocks @ end of every file / module avoid inter-file test pollution? it seems mocked in 1 python test file remains mocked in other file same return value, means mocks persisting between tests , files (when patch decorator or with patch block not used). is there way around other patching? there wouldn't happen mock.reset_all_mocks() or that, there? why don't use monkeypatch ? the monkeypatch function argument helps safely set/delete attribute, dictionary item or environment variable or modify sys.path importing. you can: def test1(monkeypatch): monkeypatch.setattr(.....

c# - Conversion error while fetching data from WCF service -

servicereference1.service1client ser = new servicereference1.service1client(); list<onetimeworkout> list = ser.getonetimeworkouts().tolist(); i'm trying list of onetimeworkout objects, error: cannot implicitly convert typ system.collections.generic.list<wn.manager.servicereference1.onetimeworkout> system.collections.generic.list<wn.models.onetimeworkout> my service reference configured reuse types in referenced assemblies. my service method: public list<onetimeworkout> getonetimeworkouts() { return new businesslogic.businesslogic().getonetimeworkouts(); } another problem cannot create var list = ser.getonetimeworkouts().tolist(); instead of generic list because later need pass method , var list seems not working (still same error) there several similar questions asked in stackoverflow, yet none of these answers seems working me. the fact error mentions wn.manager.servicereference1.onetimeworkout

sqlcipher - Integrate Djpeewee into Django to encrypt sqlite3 database -

i encrypt sqlite3 database used django project. purpose use pysqlcipher. since haven't found ways integrate pysqlcipher django started wondering if possible integrate djpeewee existing django project , through djpeewee encrypt , decrypt sqlite3 database since peewee supports sqlcipher encryptions. is possible? since haven't found way decided not encrypt whole database (using pysqlcipher) instead encrypted single fields in database using django-fernet-fields . as result 1 can still open database , see structure , tables, individual entries , encrypted. enough required level of security. on top django-fernet-fields easy use! maybe might consider same project if pysqlcipher not work?

Problems in TableLayout for custom ListView in Android -

Image
in android app i'm retrieving data server using json . display data, i'm using custom listview has 3 static images , 2 textviews . data displaying in listview in different manner. i want output this image. output list different in numbers go missing list. here after 104, numbers 105 , 106 missing , 110 missing. not getting idea why output this. here's xml layout code below: xml code <?xml version="1.0" encoding="utf-8"?> <tablelayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent" android:stretchcolumns="0,1,2" android:shrinkcolumns="1" android:layout_marginleft="10dp"> <tablerow android:layout_width="match_parent"> <textview android:id="@+id/srno"

Unable to fetch data while Query excuting in android Sqlite -

public string[] getnewslink(string prodcuttye) { cursor cursor = mdb.query(sqlite_table, new string[] { "productname" }, "prodcttype='" + prodcuttye + "'", null, null, null, null, null); string[] result = new string[cursor.getcount()]; int = 0; if (cursor.movetofirst()) { { result[i] = cursor.getstring(cursor.getcolumnindex("productname")); i++; } while (cursor.movetonext()); } if ((cursor != null) && !cursor.isclosed()) { cursor.close(); mdb.close(); } return result; } this function fetch data in string array trying excute query getting data when call in sqlite browser[ select productname myshopingtable prodcttype= 'basmati rice'] when try run query in function getting cursor count 0 unable data please tell me doing wrong please sugg

html5 - How to create Text WordArt In Canvas (FabricJS) -

i'm creating product designer using fabricjs . there way create wordart text shapes in canvas. have text wordarts in microsoft word. i searched online didn't find anything. have used fabric curvedtext library though , provides functionality rotate text. there anyway or library create text wordart in different shapes?

javascript - Capture inputs a form inside an iframe -

this question has answer here: accessing form data inside iframe 1 answer is there way can capture inputs in form inside iframe before being submited? <iframe src="fromanothersite.com" /> i trying inputs in iframe no, lead attacks such clickjacking , why browsers enforce same-origin policy security measure.

osx - max os x split view resize window with keyboard? -

is there keyboard shortcut in el capitan resize windows in split view ? know can use mouse this, happy if although can use keyboard this. doesn't seem option according apple support site : https://support.apple.com/en-us/ht204948 , i've tried :p if important feature, there payware keyboard shortcuts, http://splitscreenapp.com/

jquery - Overwrite function javascript in child window? -

i open window : var popup =window.open(url,'image', 'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=680'); in child window opened have function openfile(url); can overwrite function in parent window? or bind click event element in child window parent window (because can't edit child page). parent , child window in same domain. here how make it: var popup =window.open(url,'image', 'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no') function waitonloadwindow(){ var body = popup.document.getelementsbytagname("body"); // not loaded yet if(!body[0] || !popup.openfile){ settimeout(waitonloadwindow, 50); }else{ // replace child window function here popup.openfile = function(url){ alert('replaced');} } } waitonloadwindow(); a more generic way (if have more 1 function repl

Python .find() string method -

i wondering if .find() string method in python. here example: word = 'banana' index = word.find('a') 1#result word.find('na') 2#result word.find('na', 3) 4#result name = 'bob' name.find('b', 1, 2) -1#result could explain string method does? part word.find('na') , word.find('b',1,2), numbers , meaning of results happen when running these commands?? thank helping out! in [1]: print str.find.__doc__ s.find(sub [,start [,end]]) -> int return lowest index in s substring sub found, such sub contained within s[start:end]. optional arguments start , end interpreted in slice notation. return -1 on failure. google words in doc string don't understand, , have answer

objective c - Why making gap UIWindow in top and bottom iOS app -

Image
this question has answer here: ios 9 objective-c screen size issues 4 answers every thing going fine after updating xcode 6 7 there error in build. after changing "enable bitcode" yes no in build option application built successfully. facing new problem - application screen size making gap top , bottom following i have added following line in method didfinishlaunchingwithoptions nothing done self.window = [[uiwindow alloc] initwithframe:[[uiscreen mainscreen] bounds]]; my application xib file based not storyboard. can me please? add launchscreen in assets.xcassets : i hope it's you.

javascript - jquery fadeOut div unable to fadeIn -

i have adapted fiddle http://jsfiddle.net/onqn2gjj/4/ fade search bar out on scroll, once search bar gone, cannot clicking search icon. how can modify script stop happening please? here website: http://uwinat.o2clite.com/ thanks jquery(document).ready(function($) { $(window).scroll(function() { if ($(this).scrolltop()>0) { $('.search').fadeout(); } else { $('.search').fadein(); } }) }); is because on scroll hiding parent of element you can see here: http://screencast.com/t/zrnnrbei if fix work: http://screencast.com/t/h2m7k1636ver note i recomend use debouncer scrolling event... scroll event self kill performance... underscorejs library has one. also try using css animations instead of jquery. should avoid using javascript animations...

sql server - Converting string with minutes over 60 into time datatype causes an error -

declare @data table (working_hours nvarchar(10)); datatable insert @data (working_hours) select '0:10'; insertion values insert @data (working_hours) select '1:90'; insert @data (working_hours) select '0:10'; insert @data (working_hours) select '0:10'; --select working_hours @data; *this state work* --select @data lion ; state work select convert(int, (datepart(hour, convert(time, q1.working_hours)) * 60) + datepart(minute, convert(time, q1.working_hours))) lion @data q1; results in conversion error - want convert min nvarchar , convert int calculate sum in sap report how can denominate work through way.. assuming that's hours , minutes problems data (90 minutes), can without using time -datatype of course doesn't allow kind of time: select convert(int, left(working_hours, charindex(':', working_hours)-1)) * 60 + convert(int, substring(working_hours, charindex(':', working

jquery - how do I use rails time_ago_in_words in backbone template -

is there way use rails standard methods such time_ago_in_words in backbone template using hamlc ? when tried .created_at= time_ago_in_words e.created_at it throws exception uncaught referenceerror: time_ago_in_words not defined had create simple method , return template. include actionview::helpers::datehelper def personalize_time(c) coll = [] c.each |v| coll << {"created_at" => time_ago_in_words(v['created_at']), "collection" => v} end coll end

android - Get sender mail in gmail-api -

i trying figure out went through gmail-api developer guide.the message part in gmail-api not contain detail sender appreciated thanks. ok did it.get message payload , headers payload loop through headers name "from" format of header of form header=[name:"somename" value:"somevalue"] here code hope helps someone private list<messagereader> getdatafromapi() throws ioexception { string user = "me"; list<messagereader> labels = new arraylist<messagereader>(); listmessagesresponse listresponse = mactivity.mservice.users().messages().list(user).setq(query).execute(); //int i=0; (message label : listresponse.getmessages()) { message m = mactivity.mservice.users().messages().get(user, label.getid()).execute(); string =""; try{ list<messagepart> parts =m.getpaylo

java - Unreadable Text when starting Alloy Analyzer on Windows 7 -

Image
i try start alloy analyzer on windows 7 enterprise service pack 1 and folowing error d:\alloy>where java c:\programdata\oracle\java\javapath\java.exe c:\windows\system32\java.exe d:\alloy>java -version java version "1.8.0_60" java(tm) se runtime environment (build 1.8.0_60-b27) java hotspot(tm) 64-bit server vm (build 25.60-b23, mixed mode) d:\alloy>java -jar alloy4.2.jar okt 10, 2015 11:14:02 java.util.prefs.windowspreferences <init> warning: not open/create prefs root node software\javasoft\prefs @ root 0 x80000002. windows regcreatekeyex(...) returned error code 5. i can avoid error message when create registry key hkey_local_machine\software\javasoft\prefs manually or start alloy administrator. nevertheless windows unreadable characters opens i tried alloy4.jar shows same behavior. i tried latest version of alloy ( alloy4.2_2015-02-22.jar ) , has same behaviour , additional error messages d:\alloy>java -jar alloy4.2_2015-02-22.j

ios - Create UIImage from default system icon with swift -

how create uiimage variable more default system icon in swift? know how uibuilder in storeboard need programmatically you can't reference uiimage object of system uibarbuttonitem objects. can create 1 predefined ones, there no way of obtaining uiimage reference them. in storyboard set desired type of uibarbuttonitem , don't select uiimage object there.

hibernate - Query failing unless I reorder the values in SELECT statement -

i'm trying hql query don't understand why query fails if don't reorder values in select statement following query not work query 1 @query("select uf.flight.arrivalairport.iatacode, uf.flight.flightstatus " + "from userflight uf uf.flight.id=?1 , uf.user.id=?2") generated sql select airport2_.iata_code col_0_0_, flight1_.flight_status_id col_1_0_, flightstat4_.id id1_6_, flightstat4_.code code2_6_, flightstat4_.description descript3_6_ user_flight userflight0_, flight flight1_, airport airport2_ inner join flight_status flightstat4_ on flight1_.flight_status_id=flightstat4_.id userflight0_.flight_id=flight1_.id , flight1_.arrival_airport_id=airport2_.id , userflight0_.flight_id=? , userflight0_.user_id=? exception com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception: unknown column 'flight1_.flight_status_id' in 'on clause' if change query following (just reordering select values) query

objective c - ios app crash say NSNull rangeOfCharacterFromSet -

terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[nsnull rangeofcharacterfromset:]: unrecognized selector sent instance 0x30e483d0' *** first throw call stack: (0x22ebcf87 0x304dfc77 0x22ec237d 0x22ec0259 0x22ec1548 0x26665113 0x267b8e03 0x267b8ed7 0x25d5ebd1 0x25d5ea59 0x25d5e447 0x25d5e251 0x25d5815d 0x22e83845 0x22e80f29 0x22e8132b 0x22dcedb1 0x22dcebc3 0x2a133051 0x2639aa31 0x327d63 0x30a7baaf) libc++abi.dylib: terminating uncaught exception of type nsexception

add in - Office365 outlook add-in commands -

i'm using following manifest add addin command in outlook 2016. <?xml version="1.0" encoding="utf-8"?> <officeapp xsi:type="mailapp" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"> <id></id> <version>1.0.0.0</version> <providername></providername> <defaultlocale>en-us</defaultlocale> <displayname defaultvalue="" /> <description defaultvalue="" /> <supporturl defaultvalue="" /> <hosts> <host name="mailbox" /> </hosts> <requirements> <sets> <set name="mai

assembly - How to remove return key when printing -

i trying users name , display greeting, how can remove return key displays greeting on next line? output this: hello! name how you? i need be: hello! name how you? . lea dx, [ansname] ;get name mov ah, 0ah int 21h mov byte [ansname], 19h ; initialize name 25 chars max call clrscr lea dx, [greet] mov ah, 09h int 21h lea dx, [ansname+2] mov ah, 09h int 21h lea dx, [greet2] mov ah, 09h int 21h section .data nextline db 0dh, 0ah, "$" ansname times 25 db "$",0dh, 0ah,"$" greet db "hello!",0dh,0ah,"$" greet2 db "how you?",0dh,0ah,"$" you need write max value before calling dos service! lea dx, [ansname] ;get name mov byte [ansname], 19h ; initialize name 25 chars max mov ah, 0ah int 21h setup input buffer without carriage return , linefeed codes. ansname times 2+25 db "$" remove carriage return , line

adobe dps - Save data in DPS for synchronisation -

i want build app dps embed html/js module. module display form several questions. after user completes it, : 1- send choices database (with ajax guess) or 2- store data in app further synchronisation i did not find how save data offline (like kind of database), have idea ? thank you. well found this post turutosiya. pretty answered questions, time develop now.

android - Display data parsed from Json with Gson in a recyclerview -

Image
i have json string: { "status": "true", "result": { "rows": { "row": { "status": true, "subareas": [ { "nome": "associacao utente", "id": 9, "grafs": { "rows": { "row": { "id": 6, "nome": "associacao utente", "tipo": "pie", "serv": "mv_as_utente_por_negocio", "periodo": "ano" } } } }, { "nome": "chaves", "id": 60, "grafs": { "rows": [ { "id": 35, "nome": "chaves criados por ano", "tipo": "

Sending email attachments via UWP EmailManager not working -

Image
sending attachment universal app following code not working, why? dim emailmessage new emailmessage() emailmessage.[to].add(new emailrecipient("a@b.com")) emailmessage.subject = "test" emailmessage.body = "hello world" dim localappfolder = windows.storage.applicationdata.current.localfolder dim file = await localappfolder.createfileasync("somefile.txt", windows.storage.creationcollisionoption.replaceexisting) await windows.storage.fileio.writetextasync(file, "aaaa") dim fileref = randomaccessstreamreference.createfromfile(file) emailmessage.attachments.add(new emailattachment(file.name, fileref)) await emailmanager.showcomposenewemailasync(emailmessage) to, subject , body show fine in outlook, attachment missing: outlook screenshot i believe because outlook desktop app. understood, emailmanager.showcomposenewemailasync uses mailto: protoca

rabbitmq - WSO2 ESB: Address endpoint does not resume sending after backends recovery -

i using wso2 esb rabbitmq, have 2 proxy services: amqpproducersample , receives messages via http transport , send rabbitmq queue amqpproxy works consumer rabbitmq queue (via rabbitmq transport), consumed messages send http endpoint sampleendpoint everything works fine except 1 scenario: my backend service set in sampleendpoint goes down. new messages arrives , published via amqpproducersample , delivery fails (that expected because backend down). in console can see: warn - connectcallback connection refused or failed : mfb.localhost/127.0.0.1:80 warn - faulthandler error_code : 101503 warn - faulthandler error_message : error connecting end warn - faulthandler error_detail : error connecting end warn - faulthandler error_exception : null warn - faulthandler faulthandler : endpoint [sampleendpoint] my backend service recovers , available new messages arrives , published via amqpproducersample endpoint does not receive message more . works fine if number of undeli