Posts

Showing posts from February, 2014

PHP md5 conversion to Coldfusion for CloudTrax -

i converting php sample code cloudtrax (it's wifi access point) coldfusion. having issue line of code. 2 data types concatenated. have tried multiple times cannot work. not sure php doing internally, or if converting data internally make work. $hexchall <- binary $secret <- string php $crypt_secret = md5($hexchall . $secret, true) cfm binarydecode(lcase(hash(hexchall&secret,"md5")),"hex") coldfusion responds: bytearray objects cannot converted strings. if use charsetencode() on binary, no longer matches output of php. i not php guy, pretty sure cannot concatenate 2 variables on cf side. not unless both values share same encoding. instead, try decoding both values binary, merging them, hashing merged array. suspect php doing internally. the exact code vary depending on encoding of strings, should work in cf10+. cf: // decode both values binary hexchall = binarydecode("546869732069732062696e617279", "he

xamarin - Lower android version support of mvvmcross -

i'm new mvvmcross. read introduction video , preparing project. https://www.youtube.com/watch?v=nihmk6r9r4s my question is, @ video, mvvmcross (current version 4.1.6) supports android version 5. planned support minimal android version 4.3. so, configure should make mvvmcross support android version lower 5? ideally want set android:minsdkversion lowest api level want support. set android:targetsdkversion platform intend target. set target framework highest level of apis application needs. typically recommend checking out android dashboard see percentages of market: https://developer.android.com/about/dashboards/index.html these values can expressed here: <uses-sdk android:minsdkversion="integer" android:targetsdkversion="integer" android:maxsdkversion="integer" /> https://developer.android.com/guide/topics/manifest/uses-sdk-element.html there docs on xamarin.android specifics here: https://deve

erlang mysql multiple row result to xml -

i have multiple row result of mysql select in erlang : {_,_, result} = ejabberd_odbc:sql_query(server, [<<"select group, group_concat(members.username separator ', ') member members id='">>,id,<<"'">>]), result = [{"group","username1,username2, username3 ......."}.... {"group","username1,username2, username3 ......."}] want convert results xml element : xml = <group "xxxxxx"> <members> <member> <username>xxxxxx</username> </member> <member> <username>xxxxxx</username> </member> <member> ......... </member> </members> </group> ........ <group "xxxxxx

json - Rails - preprocessing in DB layer (PG) -

given use postgres , have method: def undelivered_messages(datetime) messages = {} @current_user.conversations.includes(:user_messages).each |c| messages[c.id] = c.user_messages.where('user_id != ? , created_at > ?', @current_user.id, datetime) end json.generate(messages) end i expect output (not counting json.generate()): {1=>[m1,m2,m3], 2=>[m1,m2,m3]} i wonder, can thing sql query @ db level, db prepares hash (or json object), faster, ruby slow, , databases not. you can try this: usermessage .joins(:conversation) .where('user_messages.user_id != ? , user_messages.created_at > ?', @current_user.id, datetime) .where(conversations: { user_id: @current_user.id }) .group_by(&:conversation_id)

excel - Count duplicates and display order of occurence -

i attempting count number of occurrences of each value within column , output order in found (top bottom) unsorted data. have been unable find suitable formula accomplish task. assistance appreciated. example: number duplicateindex 50 1 20 1 30 1 10 1 30 2 40 1 30 3 50 2 try, =countif(a$2:a2, a2) , in b2 , fill down.

maven - Bug in gmaven-plugin execute goal (using by groovy) -

i try set system property using gmaven-plugin in build time. but property result diffrent in linux , window build environment. in linux environment, have double quote string. window not. why result different? answer me please? build result linux : ### commitid : "8def4294ccb346795bd9682b5bcb9174bc64d78f" window : ### commitid : 8def4294ccb346795bd9682b5bcb9174bc64d78f pom: <plugin> <groupid>org.codehaus.gmaven</groupid> <artifactid>gmaven-plugin</artifactid> <version>1.5</version> <executions> <execution> <phase>initialize</phase> <goals> <goal>execute</goal> </goals> <configuration> <properties> <script>git log -n1 --pretty=format:"%h" web/</script> </properties> <source>

c# - EF7 RC2 Code First Create Database -

i'm using ef7 rc2 in asp.net core rc2 application , i'm trying generate db code (i'm using code first). created context, , setup connection string, when enter "add-migration" in nuget console in vs2015, error saying the term 'add-migration' not recognized name of cmdlet, function, script file, or operable program. i did digging, , think command rc1 thing. there rc2 equivalent? there tutorials out there ef7 rc2? find rc1 or early. in regular command prompt new dotnet tooling installed rc2, should able following within project's directory: dotnet ef migrations add [name] as quick note, may want explore new commands see what's in each item. such dotnet vs. dotnet ef ( https://blogs.msdn.microsoft.com/dotnet/2016/05/16/announcing-net-core-rc2/ ) you may need ensure powershell 5 installed work within package manager console: https://docs.efproject.net/en/latest/miscellaneous/rc1-rc2-upgrade.html#package-manager-command

c - Reading a file from stdin -

it's been years since programmed in c, , i've been struggling lot "get filename & path stdin, read file, print file stdout" task, know shouldn't hard ya. here code: #include <stdio.h> #include <unistd.h> #include <stdlib.h> int main(void) { int c; file *file; //scanf("%s", filename); char *filename; filename = (char *)malloc(200 * sizeof(char)); read(stdin_fileno, filename, 200); printf("%s", filename); file = fopen(filename, "r"); if (file) { while ((c = getc(file)) != eof) putchar(c); fclose(file); } else { printf("file not found."); } printf("\n"); return(0); } i code continues print out file not found. , when know fact file path , correct (not because literally drop , past terminal folder mac osx el capitan - lovely feature, also) because had different version of program using scanf foun

jQuery - Attach an event dynamically -

this question has answer here: event binding on dynamically created elements? 19 answers if create element class in jquery element wont include attached functions. for example, in below code first of creating 2 different element in html , in (document.ready) assign change event class. these 2 elements working properly. however, when click button, create new element has same class related event wont work element. why happen? , how can attach events new element easily? thanks in advance. my code: <body> <div class="main"> <input class="test" value="2" type="text"> <input class="test" value="3" type="text"> <input class="button" value="click" type="button"> </div> </body> <script src

c# - IIS 7 Error: Cannot execute a program. The command being executed was csc.exe (ApplicationPoolIdentity default settings) -

this first question in so, please apologize me if have grammatical mistakes. problem description: i have 32-bit mvc 5-based crud systems running on iis 7 (windows server 2008) & sql server 2008 r2 installed several servers, providing company intranet management service since august 2015. months, of them running smoothly without problems. however, yesterday found cannot access site root page on 172.16.1.101 server message: > server error in '/' application. > [win32exception (0x80004005): access denied] >[externalexception (0x80004005): cannot execute program. command being executed "c:\windows\microsoft.net\framework\v4.0.30319\csc.exe" /noconfig /fullpaths @"c:\windows\microsoft.net\framework\v4.0.30319\temporary asp.net files\root\-(random 8-digit hex)-\-(random 8-digit hex)-\-(random 8-char base64).cmdline".] system.codedom.compiler.executor.execwaitwithcaptureunimpersonated(safeusertokenhandle usertoken, string cmd, string curre

java - Spring request parameters saved by binder -

i think may have discovered critical bug springs web binder, or more likely, doing horribly wrong. basically, data 1 servlet request somehow copied request. spring version 4.1.5 i have simple model object 1 parameter. public class mymodelattribute { private string mymodelparameter; public string getmodelparameter() { return mymodelparameter; } public void setmodelparameter(string mymodelparameter) { this.mymodelparameter = mymodelparameter; } } i intialize binder object in controller @initbinder("mymodelattribute") protected void initmymodelbinder(webdatabinder binder) { binder.setvalidator(myvalidator); binder.registercustomeditor(string.class, new stringtrimmereditor(false)); } then there controller method this public modelandview somerequestmapping(@valid @modelattribute("mymodelattribute") mymodelattribute mymodelattribute, bindingresult bindingresult) { ... } i created test spams controller requests , see horrifying. parameter o

How to launch a web link from within my WebView in a registered app on Android? -

in android app, have webview. want every link click within webview launch registered app on device, if any, otherwise open in external browser. example, if user clicks on facebook page link within webview, should launch facebook app (if facebook registered on device handle facebook links). if no app registered, should launch external browser (i.e, should not load page in same webview). currently (by default), webview loads link clicked within webview within itself. i realize need override shouldoverrideurlloading intercept link clicks: webview.setwebviewclient(new webviewclient() { @override public boolean shouldoverrideurlloading(webview view, string url) { // should go here trigger registered app or fall external browser link clicks in webview? } }); i looked @ intent filters, seems inverse of requirement (intent filters seem way me register my android app handle web clicks elsewhere). update 1 : i not looking intercept particular host name or

Django how to use post_save signals -

i had learn django signals but, don't known implement in project , how use in project. in project want send email alerts if matches particular criteria. in case need use post_save signals.i added code this. kindly share ideas. models.py class personal(models.model): user = models.onetoonefield(user) email = models.emailfield(max_length=100, blank=true, null=true) country = models.charfield(max_length=100, blank=true, null=true) state = models.charfield(max_length=100, blank=true, null=true) city = models.charfield(max_length=100, blank=true, null=true) class skills(models.model): user = models.foreignkey(user) skill = models.charfield(max_length=100, blank=true, null=true) class jobs(models.model): emp = models.foreignkey(user, unique=false) title = models.charfield(max_length=100) industry = models.charfield(max_length=100) functionalarea = models.charfield(max_length=100) min_exp = models.integerfield(default=0) max_ex

android - How to set LinearLayout at center of it's parent RelativeLayout -

hi new android , in login page have 2 linearlayouts second linear-layout want set @ center of it's parent relative- layout , linear layout want set top|left of it's parent relative- layout please me one code:- <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rootlayout" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/yellow"> <scrollview android:id="@+id/scrollview" android:layout_width="match_parent" android:layout_height="match_parent" android:fillviewport="false"> <relativelayout android:layout_width="match_parent" android:layout_height="wrap_content"> <linearlayout

javascript - show heatmap on Codeigniter googlemap v3 library -

i've been using codeigniter google map v3 library bio stall, want create heatmap, provided googlemaps. documentation cover on url https://developers.google.com/maps/documentation/javascript/heatmaplayer#customize_a_heatmap_layer but little bit confuse how use heatmap on codeigniter library, part i've modified create heatmap codeigniter google map v3 library ? i found here tutorial on how use codeigniter in google maps api library . the library enables create map , overlay multiple markers, polylines, polygons, rectangles, ground overlays and/or circles, of customizable. library supports showing directions between 2 points, including ability show textual directions alongside map too, , marker clustering. first stages of integration google places api available use too. for more information , explanation, can visit video on how use codeigniter in google maps api.

php - Laravel 5.2 How can I display member list with his / her groups in the same row (One to Many ( or Many to Many ) data display) -

i new laravel , learning laravel 5.2 mariadb 10.0.xx. there several tables in brief 'member' can have many 'group' , display member's first name , last name name of groups member joined in same row. i don't have clear idea achieve trying create 2 separate queries ($memberlists , $grouplists) , group list inputting first query ($memberlists)'s primary key second query ($grouplists). or if have better idea please let me know. i want display below first name / last name / groups john doe group, b group jane taylor b group nick kay group, b group, c group my controller $memberlists = db::table('member') ->select('firstnm','lastnm') ->join('center', 'member.mbrcd', '=', 'center.mbrcd') ->join('org', 'center.orgcd', '=', 'org.orgcd'); $grouplists = d

javascript - how to open inappbrowser asynchronously in cordova project -

i creating android app in phonegap cordova ,here converting website webview using in appbrowser pluggin.my problem while loding inappbrowser shows white screen in app ,is there way avoid blank screen.i have set flash sreen app,but not efects inappbrowser. i can solution problem in following 1 of way 1)if there way set flash screen inappbrowser or 2)if able load inappbrowser asynchronously ,during loading time can show flashscreen of app or 3)any other sollution? i have used following javascript code function ondeviceready() { var url = 'http://www.mahadevaastro.com/bayarkart/'; var target = '_blank'; var options = "location=no,zoom=no" var option1 = "zoom=no" var ref = cordova.inappbrowser.open(url, target, options); // var ref = window.open(url, target, options, option1); ref.addeventlistener('loadstart', loadstartcallback); ref.addeventlistener('loadstop', loadstopcallback);

php - Unable to GET Data from mysql with AJAX call -

i'm having trouble trying data database. code retrieve first row of data database. data correct not matter information put html input field data same in new row added. resolving fantastic. if going point out have both "post" , "get" mixed in code, understand being possible problem, neither when matching retrieve data db, other first row of data in table. any great!!! provide answer in advance. my html code: index.php <div class="row"> <div class="col-md-1"></div> <div class="col-xs-3"> <h3 class="h4 text-center"><input type="text" name="barcode" id="barcode" size="90" class="col-md-9" value="" method="get" placeholder="barcode / product name"></h3> </div> </div> <br /> <div class="row">

javascript - Have a customized progress bar in HTML on click of a button -

i novice html coder , have silly issue! want have customized progress bar shows progress once submit clicked. tried using tag of html, did not job me. how can have animation integrated code: http://www.jqueryscript.net/chart-graph/customizable-liquid-bubble-chart-with-jquery-canvas.html#viewsource i not able figure out in section code has put. i have tried this, <!doctype html> <html> <style> #myprogress { position: relative; width: 100%; height: 30px; background-color: #ddd; } #mybar { position: absolute; width: 10%; height: 100%; background-color: #4caf50; } #label { text-align: center; line-height: 30px; color: white; } </style> <body> <h1>javascript progress bar</h1> <div id="myprogress"> <div id="mybar"> <div id="label">10%</div> </div> </div> <br> <button onclick="move()">click me</button> <scrip

java - Where should define Entity model class in spring boot -

i wore java based app , used spring boot this model : @entity @table(name = "task_list") public class task implements serializable and config class spring boot uses start : @configuration @enableautoconfiguration @enablejparepositories @enabletransactionmanagement @componentscan(basepackages = {"controller", "dao", "service"}) class config { @bean(name = "datasource") public datasource datasource() { embeddeddatabasebuilder builder = new embeddeddatabasebuilder(); return builder.settype(embeddeddatabasetype.hsql).build(); } @bean(name = "entitymanager") public localcontainerentitymanagerfactorybean entitymanagerfactory() { hibernatejpavendoradapter vendoradapter = new hibernatejpavendoradapter(); vendoradapter.setdatabase(database.hsql); vendoradapter.setgenerateddl(true); localcontainerentitymanagerfactorybean factory = new localcontainerenti

php - Textbox Insert + Update Different Tabel in Codeigniter? -

question : how insert & update different tables using textbox in codeigniter my database structure t_mynetpoin |id_mynetpoin |tot_poin |last_modified| nim | t_log_mynetpoin |id_log_mynetpoin | id_paket_redeem | id_mynetpoin | status | total | time | keterangan | my model public function get($tabel='',$where='',$order='',$limit='',$from=''){ if (!empty($where)) $this->db->where($where); if (!empty($order)) $this->db->order_by($order); $query = $this->db->get($tabel,$limit,$from); if ($query){ return $query->result(); } else { return array(); } public function insert($tabel,$data){ $query = $this->db->insert($tabel,$data); if($query) return 1; else return 0; } public function update($tabel,$where,$data){ $this->db->where($where); $query = $this->db->update($tabel,$data); if ($query) { return 1; }else{ return 0 ; } } my controller p

skip n rows of csv file in php -

i have csv file have 500000 number of rows. need take first 100 rows in first loop , manipulate rows (say, send first 100 ids api , save response). in second loop, skip first 100 rows(already taken) , take 100 rows , send request web service. similarly, in third loop, skip first 200 rows , take 100 rows , send request web service , on... i can take single each rows below code. (tested : works great) if (($handle = fopen($filename, "r")) !== false) { $id = 1; $line = fgetcsv($handle); //skip first row //fetch data each row while (($data = fgetcsv($handle, ",")) !== false) { $hotel_id = $data[0]; //call service request web service $hoteldetailrequest = (new \services\hotel\hotel)->gethotelstaticdata($hotel_id); //do stuff response } } similarly, can skip initial rows skipped first row adding $line = fgetcsv($handle); $line = fgetcsv($handle); $line = fgetcsv($handle); but, not expected result ex

python - Changes to Django Context not showing in template -

i have template has variables printing context created in view. has been working couple of months. i have added new variables context, won't show in template. when run django project locally, if remove comma in between 2 of variables in context, error, expected. if add comma back, new variables in template. when push changes openshift, new variables never show up. in fact, if remove of existing variables, template still renders if there. i have cleared cache in browser. didn't fix it. i'm not using caching in django (a search 'cache' in settings.py shows no hits). clearly, caching somewhere, can't figure out where. since changes show in browser when running locally, i'm confident there aren't syntax errors in python code. here context listing: context = { 'slug': 'admin home .' , 'players': len(players) , 'paid': totalpaid , 'unpaid': len(unpaid) , '

android - save the radiobutton and check -

i need one.. i'm facing difficult in checks radio button. my concept how save radio button in arraylist , again how check selected value arraylist. if suppose imagine quiz app. have set of questions , answers in separate array. i'm displaying it.its fine. if came pervious question should check selected answer has stored in arraylist. likewise next question. how implement this? feel difficult in this. when 1st question displays check , answer this.. btn_practicerg.setoncheckedchangelistener(new oncheckedchangelistener(){ @override public void oncheckedchanged(radiogroup group, int checkedid) { radiobutton radiobutton = (radiobutton)group. findviewbyid(checkedid); string temp = radiobutton.gettext().tostring(); when press next button next question like same , answer in string , while press previous have used same that.. should not instead should check choosen answer.. sorry bad english. lot in advance.. radiogroup = (radio

java - Benchmarking the performance of im4java -

i using im4java in project various image processing techniques such cropping, resizing, filling , rotating. before using java.lang.runtime.exec run commands in command prompt. when bench marked 2 methods, gave same result! don't need parallel processing feature of im4java , because output of 1 process input of other, hence sequential . in case, provides 1 advantage: ease of use . , that's all. do think missing or lacking somewhere in code? suggestions of great help. in advance! yes, right using im4java along gives same performance did runtime.exec. or maybe slower because has command building , translation layer. but if applicaiton convert lot of images in 1 run (or large scale concurrent processing), please let me shamelessly introduce gm4java , can improve performance. gm4java makes use of developed batch/interactive mode of graphicsmagick aovid starting new graphicsmagick process again , again every command. can used supplement im4java or execute command

c++ - HEAP CORRUPTION DETECTED: after Normal block (#143) -

great site.. have error in program , happens when free() sturct pointer type.. cant seem understand why .. think has fact pointer declared globally. thank help! *note "prev","current" , "head" global , allocated in function using malloc(); the code: void approve_delete(int* delete_request){ if(*delete_request == 0){ cout<<" there no more delet requests\n"; return; } char choice[5]; char ch; current = head; prev = head; while (current->user.id != max_id ){ if(current->user.want_delete == true){ cout<<"name : "<<current->user.name<<" "<<current->user.last_name<<" id: "<<current->user.id<<endl; ch=0; while( ch != 'y' && ch != 'y' && ch != 'n' && ch != 'n') { cout<<"approve

java - Doubts with command: pkill -INT -f '^php test_program.php$' -

question: each element of command: pkill -int -f '^php test_program.php$' do when run in linux terminal? know command kills process called test_program.php, don't know different elements of command doing. please explain in simple terminology possible! new linux commands , prefer baby lingo tech lingo @ moment :) my research: running man pkill in linux terminal, manual appears following pkill definition: signal processs based on name or other attributes. which leads me believe pkill doesn't kill process, rather can send lot of different signals, 1 of might kill process. structure/synopsis of pkill command displayed as: pkill [option] pattern from list of options in same manual, -f, -full had following definition: the pattern matched against process name. when -f set, full command line used. i didn't understand meant. also, there -int before -f in command, leads me believe more 1 option can joined together, -int not displayed in man

java - JTable change color for entire column when values changed - Swing -

Image
i tried find here long time answer question without exact result expected. i have jtable every time changing values in entire column (only in 1 column every time). want listen table changes , when data changes in column, color in column changed , other columns in default color. this code table listener: class customcellrenderer extends defaulttablecellrenderer { public component gettablecellrenderercomponent(jtable table, object value, boolean isselected, boolean hasfocus, int row, int column) { component renderercomp = super.gettablecellrenderercomponent(table, value, isselected, hasfocus, row, column); table.getmodel().addtablemodellistener(new tablemodellistener() { @override public void tablechanged(tablemodelevent e) { if(***here want know column changed or that***){ renderercomp.setbackground(color.cyan); } } }); return renderercomp ; }

php - Symfony Twig Stylesheets -

Image
within project setup i'm having directory structure css files: within base.html.twig file i'm loading files this: {% block stylesheets %} {% stylesheets 'bundles/app/css/*' filter='cssrewrite' %} <link rel="stylesheet" href="{{ asset_url }}" /> {% endstylesheets %} {% endblock %} but somehow css files within 2 folders aren't found. how 1 css included too? the way you're doing right doesn't recursive. folders fontawesome , simplelintfont won't included. fix i'm copying stylesheets block every subfolder this: {% block stylesheets %} {% stylesheets 'bundles/app/css/*' filter='cssrewrite' %} <link rel="stylesheet" href="{{ asset_url }}" /> {% endstylesheets %} {% endblock %} {% block stylesheets %} {% stylesheets 'bundles/app/css/fontawesome/*' filter='cssrewrite' %} <link rel="stylesheet

ios - How to cache websites and HTML5 works offline -

i have app uiwebview , visited website developed in html5 work offline. how can solve problem works if there no connection internet? possible manifest file? another problem: want cache websites visited. works manifest too? [self setrequestobj:[nsurlrequest requestwithurl:loadurl cachepolicy:nsurlrequestreturncachedataelseload timeoutinterval:60.0]]; i using code above if cut connection internet there seems no cached file. ios urlloading system default caching depends on http response resources in page. check response headers , make sure there cache-control header appropriate values in dictate how default cache on ios has behave. please refer below link understand more http caching. https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=en also, refer similar question below: how cache resources loaded wkwebview?

performance - Unable to evaluate EL while creating Gatling scenario -

i creating scenario repeat block. need index based request generated. def scnwithloop() = scenario("scenarioname").repeat(counter, "counter") { exec (session => { val index: integer = integer.getinteger(session.attributes.get("counter").get.tostring()); session.set("index", index) session }) exec( http("scenarioname") .post(contextpath) .headers(headers) .body(stringbody(getdata("${index}".toint))) .check(status.in(expectedcodes)) ).pause(20 seconds) } but doesn't evaluate el ${index} , gives me error: caused by: java.lang.numberformatexception: input string: "${index}" gatling version: 2.0.0-m3a appreciate help!!! convenient interpolation of session values "${index}" works when string implicitly converted gatling's expression. dark magic of scala broken expression "${index}".toint . have work gatling'

Achieving autonomous transaction in SQL server 2008 -

i have requirement below. using sql server 2008. 1. table (id) 2. table b (id, attr1, attr2, attr3) table , table b have same no of rows. id primary key in both tables there no referential relationship defined. i have trigger on table insert. if record inserted in table a, insert same id in table b , calculate few attributes , populate them in table b id. achieving using trigger. if transaction fails in table b, don't want transaction in table failed. irrespective of trigger succeeds or fails in updating table b, want table transaction success , not dependent on table b transaction. how achieve that? helpful link how create autonomous transaction in sql server 2008

How to find the first Chinese character in a java string -

how find first chinese character in java string example: string str = "xing 杨某某"; how can index of first chinese character 杨 in above str. thanks! this help: public static int firstchinesechar(string s) { (int = 0; < s.length(); ) { int index = i; int codepoint = s.codepointat(i); += character.charcount(codepoint); if (character.unicodescript.of(codepoint) == character.unicodescript.han) { return index; } } return -1; }

android - Spinner- How to convert from getSelectedItem().toString() from a spinner, back to a spinner? -

i have spinner , want selected item string , this: spinner to; string string = to.getselecteditem().tostring; my question how convert "string" spinner widget? this better: how set selected item of spinner value, not position? this work: (my answer) create spinner array(list). if want set spinner string got spinner itself, work: for (int = 0; < array.size(); i++) { if (array.get(i).equals(string) { spinner.setselection(i) } }

cakephp 2.3 format time input hours minutes seconds -

i'm trying format input without success. need save mp3 table duration of each audio file. that, have input allows me choose hours:minutes:seconds. field duration in table time, don't need datetime guess. so here i've done doesn't work: <?php echo $this->form->input('duration', array('type' => 'time', 'label' => 'durée piste', 'dateformat' => 'h:i:s')); ?> does knows how that? in advance! if not php expert can go simple code given below. note: post model name.so replace yours. add function in controller public function add() { if ($this->request->is('post')) { $this->post->create(); $hours = $this->data['post']['hours']; $minutes = $this->data['post']['minutes']; $seconds = $this->data['post']['seconds']; $this->request->d

asp.net core - ILoggerFactory could not be found after adding Microsoft.AspNetCore.HttpOverrides -

after adding dependency "microsoft.aspnetcore.httpoverrides": "1.0.0-rc2-final" to project.json file asp.net core project, type iloggerfactory can not longer resolved. compile error saying "the type or namespace name 'iloggerfactory' not found (are missing using directive or assembly reference?)". i did not change else adding reference. find strange. any suggestions how can happen?

EXCEL: Link to Cell Content inside LINE() -

i have formula containing: =indirect("t1!o"&row(2:20000)) now dynamically replace 200000 number in cell (let's b10) in same worksheet cell containing formula. i tried versions of using second "indirect" found no way might working. i'm grateful kind of tips! try this: =indirect(t1&"!o" & row(indirect("2:" & a1))) change a1 cell containing 20000 .

My stored procedure in SQL Server 2008 when is execute with JOB its fails, but without its working great -

i have stored procedure wich : alter procedure [dbo].[p_alimentation_volumeventes] begin select eds, nomeds,agenceeds, agencenomeds,secteureds, secteurnomeds,directioneds,directionnomeds, (select count(*) cplisteventesnonconformes cplisteventesnonconformes.eds = cprt.eds , typepart='pp') listeventenc_pp, (select count(*) celisteventesnonconformes celisteventesnonconformes.eds = cprt.eds , typepart='et') listeventenc_et, (select count(*) cplisteventesnonconformes cplisteventesnonconformes.eds = cprt.eds , typepart='pp' or typepart='et') listeventenc_ppet, (select count(*) listeventes ides01 = cprt.eds , typepart='pp') listeventes volumeventes cpr cprt group eds, nomeds,agenceeds, agencenomeds,secteureds, secteurnomeds,directioneds,directionnomeds,typepart end when execute command line exec [dbo].[p_alimentation_volumeventes] work super great table create. but when use

ruby - Extend return value of class instance method -

i have class have instance method, returns hash. can't change code of class directly, can extend modules. need add new keys returning hash of method. this: class processor def process { a: 1 } end end module processorcustom def process super.merge(b: 2) # not works :( end end processor.send :include, processorcustom processor = processor.new processor.process # returns { a: 1 }, not { a: 1, b: 2 } how can that? thanks. you call prepend instead of include : processor.prepend(processorcustom) processor = processor.new processor.process #=> {:a=>1, :b=>2} prepend , include result in different ancestor order: module a; end module b; end module c; end b.ancestors #=> [b] b.include(c) b.ancestors #=> [b, c] b.prepend(a) b.ancestors #=> [a, b, c] alternatives depending on use-case, extend specific instance: (this doesn't affect other instances) processor = processor.new processor.extend(processorcus