Posts

Opencart 3.x version: cannot remove "powered by" -

i cannot remove "powered opencart" on footer in version 3.x. new files twigg files , don't know or how it. on path , configuration, please. all. the file catalog/language/en-gb/common/footer.php has $_['text_powered'] = 'powered <a href="http://www.opencart.com">opencart</a><br /> %s &copy; %s'; change $_['text_powered'] = '';

MySQL: Insert multiple values if they don't exist, but need a multiple column check -

i have simpe query so: insert mytable (col1, col2) values (1,2), (1,3), (2,2) i need check no duplicate values have been added check needs happen across both column: if value exists in col1 , col2 don't want insert. if value exists in 1 of columns not both then insert should go through.. in other words let's have following table: +-------------------------+ |____col1____|___col2_____| | 1 | 2 | | 1 | 3 | |______2_____|_____2______| inserting values (2,3) , (1,1) allowed, (1,3) not allowed. is possible where not exists check single time? may need insert 1000 values @ 1 time , i'm not sure whether doing where check on every single insert row efficient. edit: add question - if there's duplicate value across both columns, i'd query ignore specific row , continue onto inserting other values rather throwing error. what might want use either primary key or unique index across columns. afterw...

Exception on exit() when using C# event source with c++ sink -

i have com object, implemented in c# .dll, named comclass sources events. then, have c++ object, simplesink , sinks events sent comclass . event source/sink mechanism works great. but, when crt calls exit() , i'm getting memory access exception thrown following code in exe_common.inl // // main has returned; exit somehow... // if (!__scrt_is_managed_app()) exit(main_result); // exception thrown. the text of exception message follows. exception thrown @ 0x00000004 in cpp.exe: 0xc0000005: access violation executing location 0x00000004. i understand attempting access junk memory location, i'm unsure what. researched issue , came across this, microsoft. https://msdn.microsoft.com/en-us/library/ms235234.aspx once common language runtime (clr) enters shutdown mode, native functions have limited access clr services. when attempting call release on com object compiled /clr, clr transitions native code , transitions managed code service i...

php - How to prevent the email from being considered HTML, when I've already set the headers as "Content-type: text/plain" -

i'm trying figure out why emails considered spam hotmail, i'm using online tool called mail-tester.com. according it, have 8.4 out of 10, 1 of problems spamassasin detected "message has text/html mime parts", adds "you should include text version of message (text/plain)" , points link spamassasin rule " mime_html_only " myq uestion is: i'm sending emails using phpmailer. email not blacklisted , happens hotmail. i'm setting headers text/plain. i'm putting email content strip_tags() function. why says i'm sending html? this i'm using (the whole script quite long, pertinent part sends email. receive email without issues in other email clients, gmail. require $_server['document_root'].'/phpmailer/phpmailerautoload.php'; $mail = new phpmailer; $mail->issmtp(); $mail->host = 'mail.mysite.online'; $mail->smtpauth = true; $mail->username = 'info@mysite.online'; $mail->port...

libtorrent - storage_interface readv explanation -

i have implemented custom storage interface in libtorrent described in section here . the storage_interface working fine, although can't figure out why readv called randomly while downloading torrent. view overriden virtual function readv should called each time call handle->read_piece in piece_finished_alert . should read piece read_piece_alert? the buffer provided in read_piece_alert without getting notified in readv . so question why called randomly , why it's not called on read_piece() call? storage_interface maybe wrong? the code looks this: struct temp_storage : storage_interface { virtual int readv(file::iovec_t const* bufs, int num_bufs , int piece, int offset, int flags, storage_error& ec) { // called on random pieces while downloading larger torrent std::map<int, std::vector<char> >::const_iterator = m_file_data.find(piece); if (i == m_file_data.end()) ...

How to change drawer toggle icon on Android apps? -

Image
i have created drawer toggle on android app. shown on top-left of screen. when click toggle, list view items shown on left side. below screen home screen: when click toggle, shown below: now want change icon of toggle button below code: mdrawertoggle.sethomeasupindicator(r.drawable.ic_drawer); mdrawertoggle.setdrawerindicatorenabled(false); the toggle icon changed drawable listview items not shown when click toggle. wonder why changing toggle icon disable toggle click. below activity class: public class mainactivity extends appcompatactivity { private drawerlayout mdrawerlayout; private listview mdrawerlist; private actionbardrawertoggle mdrawertoggle; private string[] mplanettitles; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); getsupportactionbar().setdisplayhomeasupenabled(true); getsupportactionbar().sethomebutto...

linux - How are the flags of ELF sections defined? -

using readelf -s can obtain information sections of relocatable file, however, i'm puzzled meaning of flg. in elf.h linux kernel @ linux/elf.h : /* sh_flags */ #define shf_write 0x1 #define shf_alloc 0x2 #define shf_execinstr 0x4 #define shf_rela_livepatch 0x00100000 #define shf_ro_after_init 0x00200000 #define shf_maskproc 0xf0000000 but got key flags: w (write), (alloc), x (execute), m (merge), s (strings), l (large) (info), l (link order), g (group), t (tls), e (exclude), x (unknown) o (extra os processing required) o (os specific), p (processor specific) so how other flags defined?