Posts

Showing posts from February, 2012

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?

xcode - Apple Mach-O Linker Warning: -flat_namespace is deprecated on iOS -

i updated old ios project of mine latest version of ios. i'm running xcode 8.2.1 , i'm getting following warning: -flat_namespace deprecated on ios i've looked online have been unable figure out means. can explain how resolve error?

html - JSON::ParserError in CoursesController#index -

i beginner of ruby on rails , web development. taking online course , keep failing lecture example. my problem courses_controller, index action. controller: my_first_app/controllers/courses_controller.rb class coursescontroller < applicationcontroller def index @search_term = 'jhu' @courses = coursera.for(@search_term) end end model: my_first_app/models/coursera.rb class coursera include httparty #default_options.update(verify: false) # turn off ssl verification base_uri 'https://api.coursera.org/api/catalog.v1/courses' default_params fields: "smallicon,shortdescription", q: "search" format :json def self.for term get("", query: { query: term})["elements"] end end view: my_first_app/views/index.html.erb <h1>search - <%= @search_term %> </h1> <table border = "1"> <tr> <th>image</th> <th>name</th> ...

cryptography - How long does it take to generate large prime numbers? -

using c implementation of bigint without assembly, sse etc. running on 2ghz dual core pentium laptop; average time 1 should expect prime number created in? is normal primes greater 512 bits take 30 seconds? what 2048, 4096 bits etc.? from security stackexchange question 56214 i generated custom diffie hellmann parameters long (in below case 4096 bit) primes. generation took 2 hours cannot >generated on fly........ is typical ? - 2 hours generate 4096 bit key ... no, 4 hours not typical. generation of large random primes depends on following: the speed , entropy within random number generator the used algorithm test candidates primality the implementation and luck the random number generator used important. long term keys may require random bit generator contains large amount of entropy. can achieved accessing e.g. /dev/random on linux operating systems, instance. there 1 unfortunate problem: /dev/random may block until sufficient entropy g...

Use one anchor to update two different iframes -

i have google sheet want use 1 anchor update 2 different iframes different ranges. not sure if possible. tried putting href in same anchor not updating second window. this have code wise tried <iframe src="""; float: left; width= "60%" height="300"; name = "breaksch1"; id = "breaksch1"; align="left"></iframe> <iframe src="""; overflow: hidden; width= "39%" height="100"; name = "breaksch2"; id = "breaksch2"; align="right"></iframe> <hr> <div> <a href = "https://docs.google.com/spreadsheets/gid=1439585866&amp;single=true&amp;widget=false&amp;headers=false&amp;chrome=false&amp;range=a3:j13"; target = "breaksch1"; href = "https://docs.google.com/spreadsheets/gid=1439585866&amp;single=true&amp;widget=false&amp;headers=false&amp;chrome=false&...

asp.net - Dotnet core 2.0 authentication multiple schemas identity cookies and jwt -

in dotnet core 1.1 asp, able configure , use identity middleware followed jwt middleware doing following: app.useidentity(); app.usejwtbearerauthentication(new jwtbeareroptions() {}); this has changed in implement middleware with: app.useauthentication(); configuration of settings done via configureservices section of startup.cs. there references use of authorization schema's in migration documentation: https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x#authentication-middleware-and-services in 2.0 projects, authentication configured via services. each authentication scheme registered in configureservices method of startup.cs. useidentity method replaced useauthentication. additionally there reference to: setting default authentication schemes in 1.x, automaticauthenticate , automaticchallenge properties intended set on single authentication scheme. there no way enforce this. in 2.0, these 2 properties...

ruby on rails - RoR not getting last query in thread -

i trying make twitch.tv alert shows streamer follow goes live. when user add twitch channel follow goes database. when tried channels on database in thread loop it's not getting last channel. puts @server giving 11 results(all results) in loop getting 10 results. require "rest-client" require "json" puts "sunucular aktifleÅŸtiriliyor" thr = thread.new loop online = {} online.default = 0 @server = server.all puts @server @server.each |a| cevap = restclient.get("https://api.twitch.tv/kraken/streams/#{a.name}", headers={'client-id': 'api-id'}) puts "parsing" icerik = json.parse(cevap) puts online if icerik['stream'] != nil online[a.name] += 1 else online[a.name] = 0 end end sleep(10) end end puts "second thread starting"

Passing Instance before create, in a ForeignKeyField, Django -

i have 2 models in these forms: class parent(models.model): .... class children(models.model): parent = foreignkey('parent') .... when creating children, have pass parent parent, problem want create children itself, when creating parent, other fields, simple "models.textfield" can lead me how that? overwrite __init__() method of children models , overwrite save() method of parent model: __init__: # in class children() def __init__(self, parentid): self.parent = parentid # ... save: # in class parent() def save(self, ...): # parent save # parent super().save() # pseudo code # if haschildren: each childen of parent: child = children(self.id) # <-- entails overwrite __init__() method in class children child.save() additionally need render option (children-fields) create children parent. if using django-admin interface only, can add inline models parent s modeladmin`. ...

c# - Get final redirect URL -

i writing code through authentication api based web site. have api key site needs during login process. when call login method api key, supposed redirect predefined url parameter contain request token. e.g on firing url in browser, https://kite.trade/connect/login?api_key=hcwmefsivttbchla i redirected to https://impacted-purposes.000webhostapp.com/?status=success&request_token=nb0vrfota9ott1r02q153pk3422joruf (the request token change in every run) notice request token in url on redirected url. that's need code. so, use code referred here getfinalredirect : getting redirected url original url ie. call: getfinalredirect("https://kite.trade/connect/login?api_key=hcwmefsivttbchla") however, don't final redirect. understand there javascript redirect, checking response, doesn't suggest so. any pls final url can parse request token it. well, can't test since don't have account. , hope thats not real-api-key... but function y...

r - Comparing between groups in grouped dataframe -

i trying perform comparison between items in subsequent groups in dataframe - guess pretty easy when know doing... my data set can represented follows: set.seed(1) data <- data.frame( date = c(rep('2015-02-01',15), rep('2015-02-02',16), rep('2015-02-03',15)), id = as.character(c(1005 + sample.int(10,15,replace=true), 1005 + sample.int(10,16,replace=true), 1005 + sample.int(10,15,replace=true))) ) which yields dataframe looks like: date id 1/02/2015 1008 1/02/2015 1009 1/02/2015 1011 1/02/2015 1015 1/02/2015 1008 1/02/2015 1014 1/02/2015 1015 1/02/2015 1012 1/02/2015 1012 1/02/2015 1006 1/02/2015 1008 1/02/2015 1007 1/02/2015 1012 1/02/2015 1009 1/02/2015 1013 2/02/2015 1010 2/02/2015 1013 2/02/2015 1015 2/02/2015 1009 2/02/2015 1013 2/02/2015 1015 2/02/2015 1008 2/02/2015 1012 2/02/2015 1007 2/02/2015 1008 2/02/2015 1009 2/02/2015 1006 2/02/2015 1009 2/02/2015 1014 2/02/2015 1009 2/0...

android - Installing Apk without Prompt (Root Access) -

i creating app android tv 's in apk downloads updates , intsalling tried both of cases string command; command = "adb install -r " + filename; process proc = runtime.getruntime().exec(new string[] { "su", "-c", command }); proc.waitfor(); and too: intent intent = new intent(intent.action_view); intent.setdataandtype(uri.fromfile(file), "application/vnd.android.package-archive"); startactivity(intent); on first case file downloaded , installing in background after done run commands , restart using receiver not updating app shows old version !! on second case ask user install or cancel , (users did'nt find mouse or remote) tv don't want show prompt too. !! can please recommends me better option install without clicks may background or foreground not matter . please !! you need rooted, here's code used on 6.0 this. have not tested on previous or newer vers...

reactjs - Creating a Show/Detail Page in React-Redux, How to Properly Pass Down Props -

i'm brand new react-redux, picked last week , given assignment create simple application can create, update, destroy , view posts. i extremely frustrated cannot figure out why cannot pass props show page. i have link on each post in index page , when clicked, supposed take detailed page of post. when go show page, current post in state, never renders. i know true because using logger middleware , there 1 post in state, 1 want render. in map state props, post, supposed point current post, undefined, , error when trying access it. assuming problem there (in mapstatetoprops). i feel in on head material. there standard guidelines follow when creating store/reducers, make passing down information easier/more straight forward? guidance appreciated. relevant action creators/ajax call export const receivepost = (post) => ({ type: receive_post, post }) export const requestsinglepost = (id) => (dispatch) => ( apiutil.fetchsinglepost(id).then(post => dis...

ubuntu - jupyter notebook python giving the error 2 -

unexpected error while saving file: untitled.ipynb [errno 2] no such file or directory: '/home//.local/share/jupyter/nbsignatures.db' -> '/home//.local/share/jupyter/nbsignatures.db.bak'. when creating new python2 or python3 file popup error comes in browser on jupyter notebook.

c++ - Memory allocation of instances of class - should inheritance be used to reduce memory consumption? -

is memory allocated class instances not @ dependent on member variables initialized? save memory creating new class less variables if instances don't use variable? for example: class animal{ public: int numberoffeet; int averageweight; }; class dogs - public animal { public: char breed; }; int main(){ animal snake1; }; will save memory having 2 classes above, rather having 1 class 3 different properties? class wrapper, size of class equal sum of size of members in common. exception empty class should not have size of zero. for questions: is memory allocated class instances not @ dependent on member variables initialized? save memory creating new class less variables if instances don't use variable? no, compiler not know whether use variables or not. garbage value if not use them, still value. will save memory having 2 classes above, rather having 1 class 3 different properties? no, class dog inherited class animal, have animal...

Getting different movie info from script than from python shell -

i have following script output cast of movie text document: import imdb ia = imdb.imdb() movie = ia.get_movie(0111161) cast = movie['cast'] text_file = open("cast.txt", "w") text_file.write("{0}".format(movie)) text_file.write("{0}".format(cast)) text_file.close() as can see scrape imdb website not database. when execute script in python shell (2.7.13) cast of 'the shawshank redemption', when execute command line (python myscript.py), cast of movie '29 acacia avenue', id=0037489. how can happen? you should use movie = ia.get_movie("0111161") instead of movie = ia.get_movie(0111161)

ios - Failed to emit precompiled header for bridging header -

Image
i downloaded project github, pod following files, of written obj-c , used bridge header. pod ‘snapkit’ pod ‘mjrefresh’ pod ‘alamofire’ pod ‘kingfisher’ pod ‘mbprogresshud’ pod ‘pop’ pod ‘evreflection’ pod ‘streamingkit’ pod ‘icarousel’ pod ‘reflectionview’ when run project xcode 9.0 beta 2, unfortunately error log follows : error: failed emit precompiled header '/var/folders/kd/4gh0_kxx3jx4thjb_sssmmcw0000gn/t/evoradio-bridging-header-97bd5f.pch' bridging header '/users/ringo/downloads/evoradio-master/evoradio/resources/evoradio-bridging-header.h' i have googled, no such issue.the error means needs pch file? .pch header configuration: can't solve it. how make it? i got exact same issue (xcode9 beta 6) after added cocoa pods encrypted core data . podfile : # uncomment next line define global platform project platform :ios, '9.0' pod 'encryptedcoredata', :git => 'https://github.com/project-imas/encrypted-cor...

MySQL Error 1064: You have an error in your SQL syntax -

as 1st post hope in correct part. i have been searching , found similar topics none have solution problem. the problem appeared when database moved new server , characters corrupted during process. the thing replacing characters can corrected. i trying run query on phpbb 3.2 database: update `bb3_posts` set `post_text` = replace(`post_text`, '&#355;', 't') `post_text` '%&#355;%'; but, error: 1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near ''&#355)' @ line 1 any appreciated. !

php - Error Index undefined when i try send from android to mysql database -

so made menu send data android mysql database, when press send button error come, here php code(addkomen.php) <?php if($_server['request_method']=='post'){ //getting values $nama = $_post['nama']; $email = $_post['email']; $isi = $_post['isi']; //creating sql query $sql = "insert email (nama,email,isi) values ('$nama','$email','$isi')"; //importing our db connection script require_once('dbconnect.php'); //executing query database if(mysqli_query($con,$sql)){ echo 'added successfully'; }else{ echo 'could not add'; } //closing database mysqli_close($con); } ?> so problem in android code, because type different variable answer , problem in android code. best regards you not posting data correctly, , resolve undefined index: nama use isset() check whether index trying exist or not like: ...

Initializing font picker in Firemonkey -

i have font picker in app developing - third party component filled @ run time list of fonts present on end user's computer. how initialize font picker when i have no knowledge @ time of programming app of end user's system? is there technique similar used on website, can specify list of preferred fonts, , if none found, fall on generic? i know windows , mac both have default font hardly understand concept. default font (e.g. segoe on recent windows systems, san francisco on recent mac systems) guaranteed present? can user remove default? if so, default font redefine font present? i'm struggling phrase question clearly. want initialize font picker sensible. can't set arbitrary index in user's font list because might ridiculous. if set reasonable arial or helvetica, how can sure there? perhaps ideal initialize font picker operating system's default font how that? seems particularly mysterious on mac default known .applesystemuifont , haven't fou...

putchar - Linking issue with IAR Workbench and STM32F4x using custom startup file -

getting following error: error[li005]: no definition "__write" [referenced putchar.o(dl7m_tln.a)] i disabled low level implementation run application without debugger connected. dont have putchar declaration active in code have following: thumb pubweak reset_handler section .text:code:noroot:reorder(2) reset_handler ldr r0, =systeminit ; self test library initialization sequence blx r0 ldr r0, =__low_level_init blx r0 cmp r0, #0 beq.n _call_startup ldr r0, =__iar_data_init3 blx r0 _call_startup: ldr r0, =stl_startup ; stl_startup finishes goto __iar_program_start bx r0 where __low_level_init called. without call removed got same error. wondering how can track if there somehow putchar call inside code not aware of. @ point debug printf / putchar commented out

sql - Fetch big tree without overhead in left tables -

my question more theoretical , why rdbms/drivers return data way it, not how find correct set, nor how find it. i'm pretty familiar sql, there 1 thing annoyed sense of economy. consider following "class" graph: a { field1, ..., field9 b_items = [ b1, ..., bn ] } b { field1, ..., field6 c_items = [ c1, ..., cm ] } c { field1, field2 } we have few objects, each object has many b objects, , each b objects has lots of c objects. count(a) < count(b) << count(c) . now use rdbms store it, because relations cool , optimizers smart, can virtually in milliseconds, provided there plan , index set. i'll skip table creation code, should obvious, , go straight select: select * left join b on b.a_id = a.id left join c on c.b_id = b.id whatever database server returns result set combined of columns tables, joined sort-of tree: a.f1 .... a.f9 b.f1 .... b.f6 c.f1 c.f2 --------------------------------------------------- 1 1 ...

python - Matplotlib error: 'height' must be length 5 or scalar -

i attempting plot output of script 2 series bar graph using matplotlib in python 2.7. my script prints 'msg' results in following output: knn: 90.000000 (0.322734) lda: 83.641395 (0.721210) cart: 92.600996 (0.399870) nb: 29.214167 (1.743959) random forest: 92.617598 (0.323824) after code outputs results of 'msg', attempt plot results 2 series bar graph using matplotlib , returned following error: traceback (most recent call last): file "comparison.py", line 113, in <module> label='mean') file "c:\users\scot\anaconda2\lib\site-packages\matplotlib\pyplot.py", line 2650, in bar **kwargs) file "c:\users\scot\anaconda2\lib\site-packages\matplotlib\__init__.py", line 1818, in inner return func(ax, *args, **kwargs) file "c:\users\scot\anaconda2\lib\site-packages\matplotlib\axes\_axes.py", line 2038, in bar "must length %d or scalar" % nbars) valueerror: incompatible size...

winforms - Execute a c# Windows Application exe on client machine everyday -

this question has answer here: add , edit scheduled tasks via c# winform application 2 answers how can schedule tasks in winforms app? 3 answers c# api task scheduler 2.0 [closed] 4 answers schedule task in windows task scheduler c# [duplicate] 2 answers i've created c# windows application , installed , deployed on client machine using click once, i've execute exe on client machine everyday @ 5pm. i've idea of putting exe in startup folder, run on every machine restart or when user logoff , logon, there scenario, when user not logoff or restart machine several days.. tried creating windo...

javascript - :hover is not working -

i new web development, although appreciated, not looking critiques on "best practices", realize not beautiful code, not sure why a:hover function not working. indeed work other parts of code not included not sure why code not work, insight appreciated. note: there no issue .css filepath or anything, other styles elements work fine. so question have included 2 files, .html file main.css file. have removed personal information , code not pertinent actual issue. a { text-decoration: none; } a:hover { text-decoration: underline; text-decoration-color: white; } html { margin: 0px; } body { margin: 0px; min-height: 100%; } .home { position: relative; z-index: -2; } .intropage { position: fixed; z-index: 100; height: 100%; width: 100%; overflow: hidden; } #enterwebsite { font-family: 'cookie'; font-size: 48px; color: white; border: solid white 2px; border-radius: 15px; text-align: ...

C taking more time to execute than JAVA -

this question has answer here: how time method's execution in java? 35 answers i have written simple arithmetic logic in both c , java. c takes 23.4s whereas java takes around 4s finish executing. question not based on how calculate time suppose mentioned in code. based on execution. c code follows. #include<stdio.h> #include<time.h> main() { clock_t begin = clock(); long i, temp; for(i = 0; i<10000000000; i++) temp = * 5; printf("temp : %ld\n", temp); clock_t end = clock(); printf("time : %lf\n", (double) (end - begin) / clocks_per_sec); } the output c temp : 49999999995 time : 23.477688 java code follows public class test { public static void main(string[] args) { long starttime = system.currenttimemillis(); long num = 5, temp = 0; for(long = 0; <...

spring boot - SpringJPA - Saving child object in one-to-many relation does not show up in the parent object after its findOne() -

when save child object , try fetch parent again, not associated child object. using springjpa , have following one-to-many relation. class classroom { @id private integer classid; onetomany(mappedby="classroom", cascade = cascadetype.all, fetch = fetchtype.eager) private set<student> students; } class student { @id private integer studentid; @column(name="class_room_id", insertable = false, updateable = false) private integer classroomid; manytoone joincolumn(name = "class_room_id", referencedcolumnname="class_room_id") private classroom classroom; } even when classroomrepository.findone(classroomid) still returns 1 class. believe expected behavior returns cached instance. there way force jpa fetch associations. tried save , fetch in 2 separate transactions , still same error. can guide me how see common use-case scenario ? update: following code invokes these transactions ...

fortran95 - How to call csv printing routine from Fortran code -

i want print character strings in csv format fortran program. based on information available on internet (in stackoverflow.com) have added source code line (as in example shown in stackoverflow response): use csv_file but unfortunately treated lahey compiler error. adding include statement path flibs stored in same directory source code did not , treated error. so, question is: statements must add source access the csv_file , csv_write routine ?

ios - Could not instantiate class named UILayoutGuide -

i have iphone 4 running ios 7.1.2, since xcode-beta doesn't support lower ios 8, referred answer on stack : any way install app iphone 4 xcode 8 beta? so followed steps, made new project connected iphone error: the error image keep in mind stock project. didn't change except minimum deployment version. i found out making app programmatically without storyboards solves problem temporarily

php - Hashing a password more than once -

this question has answer here: double password_hash php 2 answers if hash example password twice: $psw1= password_hash($password,password_default); $psw2=password_hash($psw1,password_default); is more secure or useless? p.s.: new php this prevent verifying password, since won't able reproduce first hash, since you've discarded random salt of first hash. instead, increase security of single hash, adjust cost factor: password_hash($password, password_default, ['cost' => 12]) the higher cost, more rounds of hashing done. pick cost doesn't slow process down much, isn't low either. in fact, should keep increasing cost factor on time better server hardware becomes available, , rehash users passwords on time stronger algorithm. that's password_needs_rehash for.