Posts

sql server - The current transaction cannot be committed and cannot support operations that write to the log file. Rollback the transaction -

i'm encountering error when running script in sql server 2008. when restore database in sql server 2012, runs , did not encounter errors. thanks in advance! here stored procedure: create procedure updatedependentviews ( @tablename nvarchar(128), @alldependents bit = 1 ) set nocount on; create table #dependencies ( [counter] [int] identity(1,1) not null, [view_name] [nvarchar](128), ) on [primary]; create index counter on #dependencies(counter); /* first degree dependent views. */ insert #dependencies(view_name) select v.[name] [view_name] sys.sql_expression_dependencies sd inner join sys.views v on sd.referencing_id = v.object_id inner join sys.objects d on sd.referenced_id = d.object_id sd.referenci...

php - Codeigniter REST API elapsed time -

i'm using codeigniter rest-api (author: philsturgeon ref url: https://github.com/philsturgeon/codeigniter-restserver ) i want add response how time took service generate , process response. i trying use $this->benchmark->elapsed_time() in controller, doesn't send time instead sends "success": 1,"took": "{elapsed_time}", i tried edit the main controller of api abstract class rest_controller extends ci_controller , append elapsed time final output send public function response($data = null, $http_code = null, $continue = false) but no luck, keep receiving "{elapsed_time}" appreciated. you can elapsed_time using this $this->benchmark->mark('code_start'); // code happens here $this->benchmark->mark('code_end'); echo $this->benchmark->elapsed_time('code_start', 'code_end');

angularjs - how to navigate to page without angular in protractor? -

this question has answer here: how use protractor on non angularjs website? 5 answers how can go page not contain angular protractor? test looks this: browser.driver.get('https://www.mysitewithlogin.com'); the result is: message:error while waiting protractor sync page: "angular not found on window" so site starts login page , not contain angular. uberhaupt possible? use below line of code before launching application. browser.ignoresynchronization=true; by writing above line, wont wait angular. considers app normal app.

node.js - How could I handle timeout request in koa? -

for example: var app = require('koa')(); app.use(function *(next) { var start = new date(); yield next; }); app.use(function *(next) { var result = yield loaddata(); this.body = result; }); app.listen(8080); let's assume if loaddata returns data more 1 second, want this.body = 'there timeout' . how achieve this? don't think settimeout able deal this. , tried this.response.settimeout function, said settimeout undefined. suggestion you can convert promise instead. `loaddata().then((oncompletion) => { //take time here timeout = timeend - timestart; timeout >= 1sec ? this.body = 'there timeout' : this.body = oncompletion }).((onfailure) => { //do if fails });` of course not work unless loaddata returns promise

ajax - JQuery return function error catch -

i submitting form call $.ajax() php. here $.ajax function work when success. when want show errors, there trouble loop responsetext. see $.ajax() code: $.ajax({ // ... , error: function(errors){ $.each(errors, function(index, error){ info.hide().find('ul').append('<li>'+error+'</li>'); }); info.slidedown(); } }); i catch errors, confusion, how renders errors see output in screen http://prntscr.com/7nt3lq . want render these error fields: {"name":["the name field required."],"fname":["the fname field required."]}, if write as: error: function(errors){ console.log(errors); } then output in screen http://prntscr.com/7nt9tv . how remove exceptional error: 422 (unprocessable entity) , responsetext loop through? the problem first param error callback not respose data, jqxhr object. $.ajax({ url: '/echo/asdf...

php - failed to import the csv file to mysql -

plzz me fix errors in following code.. couldn't read php code. how can make it? want show status of connection when closes. <table width="600" style="margin:115px auto; background:#f8f8f8; border:1px solid #eee; padding:20px 0 25px 0;"> <form action="<?php echo $_server["php_self"]; ?>" method="post" enctype="multipart/form-data"> <tr><td colspan="2" style="font:bold 15px arial; text-align:center; padding:0 0 5px 0;">browse , import excel file </td></tr> <tr> <td width="50%" style="font:bold 12px tahoma, arial, sans-serif; text-align:right; border-bottom:1px solid #eee; padding:5px 10px 5px 0px; border-right:1px solid #eee;">select file</td> <td width="50%" style="border-bottom:1px solid #eee; padding:5px;"><input type="file" name="file" id="file" /></td...

How do I center gadgets, gadget titles, and link lists in the footer section on blogger using HTML5 or CSS code? -

i have searched interwebs hours, including site, answer question , have not found one, i'm sorry if it's been answered before. i trying center gadgets (widgets?), gadget titles, , links. basically, want centered in footer section. have 3 column footer , using watermark template in blogger. managed center sidebar content (or @ least images , gadget titles) using css code found on forum. same code did not apply footer. searches have found info. , code pertains the post footer...but i'm concerned page footer. any pointing me in right direction helpful. you can check out website specific visual of problem, run erotica website , wouldn't want break content rules here. 18+ website/nsfw. if listing web address not okay, need see site visual of problem, please pm me it. if okay list website, let me know, people can me out it. thanks! try css blocks footer { margin :0 auto }