Posts

Showing posts from July, 2014

vim find out what is changing the directory -

vim find out what is changing the directory - i start vim folder have makefile , tags file , edit file 2 levels downwards three. if @ folder x vim x1/x2/code.c problem vim changes folder folder code (so if pwd show x1/x2). want remain @ top folder. is there way of knowing causing alter of folder? assuming kind of plugin have not been able track down. thanks. check if have autochdir turned on in vimrc. :set autochdir? check. there number of plugins doing it, happen remember you've installed recently? vim

How to make a greyed-out HTML form? -

How to make a greyed-out HTML form? - i'd have grouping of html text <input> 's can greyed-out (disabled) @ same time. want entire area in somehow greyed-out or @ to the lowest degree visibly disabled. i've seen things done in desktop applications. any ideas on easy/elegant way it? i'm trying avoid manually setting each disabled="disabled" , , have area surrounding <input> 's indicates entire portion of form non-editable. edit: sorry, should mention few more things... everything local. i'm not using php or asp or that... html, javascript, , css. no jquery! i want enable/disable "area" dynamically javascript it's not <form> , bunch of <input> 's the disabled="disabled" parameter standard way this, , utilize jquery dynamically disable of form elements contained in fieldset (which standard way of grouping related form elements) on fly. alternatively place partially transparent d...

ruby on rails 3 - ERROR Errno::ECONNRESET: Connection reset by peer -

ruby on rails 3 - ERROR Errno::ECONNRESET: Connection reset by peer - gem 'rails', '3.0.0' gem 'devise' gem 'bson_ext', '>= 1.0.7' gem 'bson', '>= 1.0.7' gem 'mongo_mapper', :branch => 'rails3', :git => 'http://github.com/jnunemaker/mongomapper.git' gem 'devise-mongo_mapper', :git => 'git://github.com/collectiveidea/devise-mongo_mapper' with above setup next errors on requests: started "/users/sign_out" 127.0.0.1 @ 2010-09-27 13:16:30 +0300 processing devise::sessionscontroller#destroy html redirected http://localhost:3000/ completed 302 found in 19ms [2010-09-27 13:16:31] error errno::econnreset: connection reset peer /usr/local/ruby/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `eof?' /usr/local/ruby/lib/ruby/1.9.1/webrick/httpserver.rb:56:in `run' /usr/local/ruby/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' ...

MySQL: Select multiple rows containing values from one column -

MySQL: Select multiple rows containing values from one column - i'd find car_id's of cars have 'ford' , 'silver' , user input value of '200' in value column: table_cars +----+--------+----------+-----------+ | id | car_id | name | value | +----+--------+----------+-----------+ | 1 | 1 | create | ford | | 2 | 1 | carline | fiesta | | 3 | 1 | color | silver | | 4 | 1 | topspeed | 210km/h | | 5 | 2 | create | ford | | 6 | 2 | carline | focus | | 7 | 2 | color | silver | | 8 | 2 | topspeed | 200km/h | | 9 | 3 | create | holden | | 10 | 3 | carline | astra | | 11 | 3 | color | white | | 12 | 3 | topspeed | 212km/h | +----+--------+----------+-----------+ which in case should homecoming 1 car_id: car_id = 2. what way go create sql query this...

android - Custom text span not working -

android - Custom text span not working - i trying create span give rounded background text. however, draw method never called. this code: public class roundedbackgroundspan extends replacementspan { @override public void draw(canvas canvas, charsequence text, int start, int end, float x, int top, int y, int bottom, paint paint) { rectf rect = new rectf(x, top, x + measuretext(paint, text, start, end), bottom); paint.setcolor(color.blue); canvas.drawroundrect(rect, 100f, 30f, paint); paint.setcolor(color.white); canvas.drawtext(text, start, end, x, y, paint); } @override public int getsize(paint paint, charsequence text, int start, int end, paint.fontmetricsint fm) { homecoming math.round(measuretext(paint, text, start, end)); } private float measuretext(paint paint, charsequence text, int start, int end) { homecoming paint.measuretext(text, start, end); } } and how s...

amazon web services - Can I keep the my pig scripts and shell scripts in aws EMR? -

amazon web services - Can I keep the my pig scripts and shell scripts in aws EMR? - i have worked in cloudera box , set scripts in border node. new emr in aws ,so need ur suggestion. what have done. 1.i have logged master node ssh using putty. 2. created folders set scripts. i have read article set scripts in s3. may know there problem going approach, have mentioned. do need stand ec2 linux , can set these scripts , phone call emr jobs ec2 box. need ur view. sanjeeb the approach have taken correct. have scripts on emr master node s3. advantage of having on s3 that, if emr crashes, have scripts on s3. additionally, if executing multiple emr's, having script on s3 makes easier invoke s3 instead of copying each emr instance. you can invoke pig scripts s3 using sh -c 'pig -f ..' there no point in having additional ec2 running invoke jobs. how calling emr jobs? amazon-web-services amazon-ec2 emr amazon-emr

invalid type for key expires_on, expected date, but got string php -

invalid type for key expires_on, expected date, but got string php - this question has reply here: convert 1 date format in php 9 answers i facing problem whenever seek store date in parse gives me error 'invalid type key expires_on, expected date, got string'. how can convert string object date object? format of date '21 apr 2015 - 10:50' , info type of column field in parse db date. you can utilize datetime function of php store info if getting string. $input_date = $_request['expiredate']; $date = datetime::createfromformat('d f y - h:i',$input_date); $expiredate = $date->format('y-m-d'); echo $expiredate; the above code convert string date used store data php date parse.com

php - Install Composer on MAMP on Windows -

php - Install Composer on MAMP on Windows - so here issue i'm getting: i'm trying install composer , i'm using mamp on windows (it exist since origin of january). and many users of composer on windows, i've got error : some settings on machine create composer unable work properly. create sure prepare issues listed below , run script again: openssl extension missing, means secure https transfers impossible. if possible should enable or recompile php --with-openssl" so checked on right php.ini page if unabled , was! i can't find help since there few users of mamp on windows. thank help or suggestions open php.ini located in " \mamp\conf\ " folder or re-create php.ini \mamp\bin\php\php[your php version number]\ find " extension=php_openssl.dll " ;extension=php_openssl.dll - remove " ; " restart mamp , extension should loaded after that. php windows installation composer-php mamp

asp.net - Assembly Referencing in C# in Hierarchical order -

asp.net - Assembly Referencing in C# in Hierarchical order - i have class library containing class1a, class2a, class3a. have class library b containing class1b inherit class1a of assembly a. i going give assembly b 3rd party without assembly a. problem 3rd party cannot utilize objects of classes1a in class1b until project references assembly a. can please tell me how accomplish this. reason don't want 3rd party access classes of assembly directly. you can't accomplish desired behaviour without refactoring "library a". but if refactoring possible - can alter public classes in library internal , , appying internalsvisibleto attribute these classes can give "library b" permission utilize them. of course, in case still need give "library a" client , not able utilize classes straight in usual way. note - still possible access non-public methods , classes of assembly using reflection , can't prevent access. c# as...

android - Retrofit + GSON parse an Array of objects -

android - Retrofit + GSON parse an Array of objects - i receive jason response ws: [ [ "test0", "test0" ], [ "test1", "test1" ], [ "test2", "test2" ], [ "test3", "test3" ], [ "test4", "test4" ], [ "test5", "test5" ] ] notice there no name-value fields json array of strings arrays. tried several attemps parse response. tried pojo list of strings have same error always: retrofit.retrofiterror: com.google.gson.jsonsyntaxexception: java.lang.illegalstateexception: expected begin_object begin_array @ line 1 column 2 path $ mypojo retrofit callback next one: public class votepollresults { private list<partialresult> fields; public list<partialresult> getfields() { homecoming fields; } public void setfields(list<partialresult> fields) {...

javascript - How can i set cookie for background changer code? -

javascript - How can i set cookie for background changer code? - here code need set cookie.is body background image changer , want set cookies expire in x days! no matter if javascript or jquery cookies! class="snippet-code-js lang-js prettyprint-override"> <script> $(document).ready(function(){ $("li.one").click( function(){ $ ("body").removeclass('bg2 , bg3 , bg4 , bg5 , bg6 , bg7 ,bg8').addclass("bg1"); }); $("li.two").click( function(){ $ ("body").removeclass("bg1 , bg3 , bg4 , bg5 , bg6 , bg7 , bg8").addclass("bg2"); }); $("li.three").click( function(){ $ ("body").removeclass("bg1 , bg2 , bg4 , bg5 , bg6 , bg7 , bg8").addclass("bg3"); }); $("li.four").click( function(){ $ ("body").removeclass('bg1 , bg2 , bg3 , bg5 , bg6 , bg7 , bg8').addclass("bg4...

sugarcrm 6.1: delete the relationship between two objects -

sugarcrm 6.1: delete the relationship between two objects - i using sugarcrm (v6.1.0) , im stuck deleting relationships. example: added relationship between objects with objecta->load_relationship($myrelationship); objecta->$myrelationship->add($idofsecondobjectb); this works. right want remove relationship between 2 objects. tried this: objecta->load_relationship($myrelationship); objecta->$myrelationship->delete(objecta->id, objectb->id); but doesnt work. knows how delete single relationship? dont want delete relationship in general, particular one. ty! i think if want delete relationship need go admin->studio->yourmodule->relationship in relationships may see there different relations there created. here can delete relationship. thanks. sugarcrm

Spring - Thymeleaf Date type -

Spring - Thymeleaf Date type - i'm new @ spring , thymeleaf,so sorry silly question. i have form must filter info based on date user choose. have class: public class requestfilterentity { private date requestedat; private date datescheduled; ... } i have endpoint in controller: @requestmapping(value = "/requests", method = post) public string filterrequests(requestfilterentity requestfilter, model model) { model.addattribute("requestfilter", new requestfilterentity()); homecoming "admin/reporting/filter_requests"; } and view: <form method = "post" th:object="${requestfilter}" th:action="@{|/admin/reporting/requests|}"> <div class="form-group"> <label for="requested">requested @ </label> <input id="requested" type="date" class="form-control" th:field="*{requestedat}"/> ...

ember.js - Generated Application Controller #needs does not include itself -

ember.js - Generated Application Controller #needs does not include itself - i'm migrating web app ember tools ember-cli , having issues. far i've been able handle of errors, not one. have auth controller. on several pages include needs:["auth"] , error i'm seeing when restarting server quite odd. referenceerror: (generated application controller)#needs not include `auth`. access auth controller (generated application controller), (generated application controller) should have `needs` property array of controllers has access to. i'm not sure error means necessarily, i'm able debug compiled script in firebug, it's not working when seek adding needs:whatever auth controller itself. thanks in advance. ember.js handlebars.js ember-cli controllers

inheritance - JavaScript: Why does the Object.hasOwnProperty method behave like this? -

inheritance - JavaScript: Why does the Object.hasOwnProperty method behave like this? - my understanding object.hasownproperty method checks if object has property name of it's own, meaning non-inherited property. mean function should homecoming false whenever property a. doesn't exist, or b. if it's inherited. correct me if i'm wrong, unless doesn't utilize classical inheritance, doesn't bar inherit foo in code below? why hasownproperty method returning true when propname property inherited property? did wrong here? also, how utilize hasownproperty on foo object? code here returns false when checking the foo object. function foo() { this.propname = 'test'; } var bar = new foo(); console.log(bar.hasownproperty('propname')); // returns true console.log(foo.hasownproperty('propname')); // returns false the initial code sample equivalent to: function foo() { } var bar = new foo(); bar.propname = ...

shell - WSHShell on WinServer 2012. ExpandEnvironmentStrings doesn't return %computername% and %sessionname% variables -

shell - WSHShell on WinServer 2012. ExpandEnvironmentStrings doesn't return %computername% and %sessionname% variables - i'm taking script supposed homecoming %computername% , %sessionname% environment variables. i'm running script on winserver 2008 , works fine. i'm running same script on winserver 2012 , doesn't work. returns "%computername%" , "%sessionname%" instead of values of variables. i've tested script other environment variables have found in "system variables" alternative menu , works fine. there trickiness in winserver 2012 function , particular variables? p.s. when create "echo %computername%" , "echo %sessionname%" in cmd, returns right values. thanks in advance! ive ran next vbs on server 2012 standart 6.2.9200 n/a build 9200 set wshshell = createobject( "wscript.shell" ) wscript.echo wshshell.expandenvironmentstrings( "%computername%" ) wscript.echo wsh...

spring - Setup mailx as Java SMTP Configuration -

spring - Setup mailx as Java SMTP Configuration - i trying send email java/spring software. i'm using javamailsender of spring framework. how can configure local machine javamailsender's smtp host? can send email via next command: echo “test123” | mailx -s “test mail” emailaddress@email.com however, how can write mail.properties back upwards command above? this javamailsender bean: <bean id="javamailsender" class="org.springframework.mail.javamail.javamailsenderimpl"> <property name="host" value="${mail.smtp.host}" /> <property name="port" value="${mail.smtp.port}" /> <property name="defaultencoding" value="${mail.defaultencoding}" /> <property name="username" value="${mail.username}" /> <property name="password" value="${mail.password}" /> <property name="javamailproperties...

c++ - Why does left shift operation invoke Undefined Behaviour when the left side operand has negative value? -

c++ - Why does left shift operation invoke Undefined Behaviour when the left side operand has negative value? - in c bitwise left shift operation invokes undefined behaviour when left side operand has negative value. relevant quote iso c99 (6.5.7/4) the result of e1 << e2 e1 left-shifted e2 bit positions; vacated bits filled zeros. if e1 has unsigned type, value of result e1 × 2e2, reduced modulo 1 more maximum value representable in result type. if e1 has signed type , nonnegative value, , e1 × 2e2 representable in result type, resulting value; otherwise, the behavior undefined. but in c++ behaviour defined. iso c++-03 (5.8/2) the value of e1 << e2 e1 (interpreted bit pattern) left-shifted e2 bit positions; vacated bits zero-filled. if e1 has unsigned type, value of result e1 multiplied quantity 2 raised powerfulness e2, reduced modulo ulong_max+1 if e1 has type unsigned long, uint_max+1 otherwise. [note: constants ulong_maxand uint_...

php/mysql app security issues? -

php/mysql app security issues? - possible duplicate: where can find web-project “security checklist?” i wondering when creating php/mysql app, whats main security issues developer got consider, know major broad topic, wanted overview of look, , while im wrting , devloping app, need aware of thans!! :)) very broad topic indeed. name basics, ideally should aware of: don't trust user input. mean sanitize user input prevent sql injection escape info beingness outputted on page appropriately prevent xss vulnerabilities , cookie data. do not include files based on user input log errors appropriately. ideally, in error log. store passwords via 1 way hash incorporate secure salt. and read through seven habits writing secure php applications. php mysql security

Ruby on Rails. Unicode routes -

Ruby on Rails. Unicode routes - is possible set unicode string segment of path in rails? i seek following: # app/controllers/magazines_controller.rb class magazinescontroller < applicationcontroller def index end end # encoding: utf-8 # config/routes.rb publishinghouse::application.routes.draw resources :magazines, :only => :index, :path => :журналы # unicode string set segment of path end $ rake routes magazines /журналы(.:format) {:action=>"index", :controller=>"magazines"} but when go path routing error: $ w3m http://localhost:3000/журналы ... routing error no route matches "/%d0%b6%d1%83%d1%80%d0%bd%d0%b0%d0%bb%d1%8b" here's server log: $ rails s lean ... started "/%d0%b6%d1%83%d1%80%d0%bd%d0%b0%d0%bb%d1%8b" 127.0.0.1 @ 2010-09-26 13:35:00 +0400 ...

sql - Erroneous ORA-01427: single-row subquery returns more than one row -

sql - Erroneous ORA-01427: single-row subquery returns more than one row - i'm getting error [ora-01427: single-row subquery returns more 1 row] when execute query. have query structured so: select lv.price, (select c.model_name cars c c.model_id = lv.model_id) model_name ledger_view lv lv.price < 500 it's breaking on nested select. know logic both in view , in query correct, , there's no chance of nested select returning more 1 row. cars table's model_id unique field. if execute query without nested select doesn't homecoming error. the ledger_view view built on top of view. possible these stacked views buggy in oracle 10g? don't know how else debug problem. i aware alter particular query bring together rather nested select, i'd know why happening because utilize nested queries in other places not modifiable. edit: here's unusual thing. ledger_view is, said, built on top of view. test, copied nested view's sql strai...

xcode - How can I get the Xcode6 editor to highlight the lines I have changed from my last commit? -

xcode - How can I get the Xcode6 editor to highlight the lines I have changed from my last commit? - i looking functionality similar sublime text (with git-gutter plugin), such image below. in gutter can see deleted lines(red) , changed lines (yellow). i found gitdiff plugin xcode, pretty much want. xcode plugins can installed , removed using alcatraz xcode

php - Integrate guest session from opencart to wordpress -

php - Integrate guest session from opencart to wordpress - i developed basic plugin allow me retrieve user info, including current info in cart, when user logged opencart, wordpress. in way can show info when user in wordpress. think way share - or simulate - session between these system. the plugin here: https://github.com/sarca/op2wp what need done improve plugin capture invitee info. know opencart handle session in way: class session { public $data = array(); public function __construct() { if (!session_id()) { ini_set('session.use_cookies', 'on'); ini_set('session.use_trans_sid', 'off'); session_set_cookie_params(0, '/'); session_start(); } $this->data =& $_session; } function getid() { homecoming session_id(); } } how can session cookie in order know invitee info? wordpress installed in root of public html directory , opencart in subfolder. p...

android - Populate a listview from Archived apk file from sd card -

android - Populate a listview from Archived apk file from sd card - i trying create app similar apps backup , restore. have implement functionality of backing apps want populate list archived apps sd card restoring purpose. know how read files sd card how can thumbnail of stored apk file ? android

android - Touch listener on image view gives different x and y for different mobiles -

android - Touch listener on image view gives different x and y for different mobiles - i have tried ontouchlistener on imageview amgetting different x , y of same location different mobiles. possible same x , y coordinates different mobiles android

php - Saving/Updating User Profile in Laravel 5 -

php - Saving/Updating User Profile in Laravel 5 - i can't seem save updated profile database. in edit.blade.php: {!! form::model($user, ['method' => 'patch', 'route' => ['profile.update', $user->company_name] ]) !!} // fields {!! form::submit('update profile', ['class' => 'btn btn-primary']) !!} {!! form::close() !!} in profilescontroller: public function update($company_name) { $user = user::wherecompanyname($company_name)->firstorfail(); $user->save(); // no validation implemented flash('you have edited profile'); homecoming redirect('/'); } after hitting update button, shows flash message on homepage it's not saving database. im coming rails , sense need whitelist something. the point is, don't alter user model @ all... retrive it, , save 1 time again without setting fields. $user = user::wherecompanyname($company_name)->firstor...

java - How to exclude jars during overlay -

java - How to exclude jars during overlay - i have 2 applications - a , b. in application there jars j1,j2,j3. , in application b there overlay , dependency of application a. don't want jar j2 in application b. how exclude jar j2 ? what asking isn't possible. if application b has dependencies on application a; , depends on j2 - how think can run "b" without providing j2? the thing can work: if can farther piece applications; might possible come component b'; b' depends on a'; , a' not depend on j2. can bundle b' without j2. java maven

php - lastInsertId get from different function -

php - lastInsertId get from different function - i have form, wich sends info database (when filled in) form function: function train_add() { $sql = "insert train_information " . "(train_id, image, train_name, tare_weight, number_of_bogies, number_of_axles, wheel_diameter_min, wheel_diameter_max)" . "values (train_id, :image, :train_name, :tare_weight, :number_of_bogies, :number_of_axles, :wheel_diameter_min, :wheel_diameter_max) "; $sth = $this->pdo->prepare($sql); $sth->bindparam(':image', $_post['image'], pdo::param_str); $sth->bindparam(':train_name', $_post['train_name'], pdo::param_str); $sth->bindparam(':tare_weight', $_post['tare_weight'], pdo::param_str); $sth->bindparam(':number_of_bogies', $_post['number_of_bogies'], pdo::param_str); $sth->bindparam(...

eclipse - I don't know how to import the external library I added -

eclipse - I don't know how to import the external library I added - i working on sudoku solver , i'm planning cut down sudoku sat, in order solve sat want utilize sat4j. so downloaded binaries , built using ant , imported of jars project when seek import @ top of main class library found. (import org.sat4j.*;) so looked through eclipse suggestions import org. , not find library, i've looked through stags documentation not see went wrong, , help appreciated. eclipse external sat4j

html - Display Different Number of - Per Row -

html - Display Different Number of <li> Per Row - i create first row of have 3 products , sec row 2 products , pattern repeats. here code <ul class="products-grid products-grid--max-<?php echo $_columncount; ?>-col"> <?php $_columncount = $this->getcolumncount(); // value 3 ?> <?php $i=0;$k=1;foreach($products $product ?> <li class="item <?php echo ($k==4) || ($k%10==0)? 'big ': '' ?> <?php if(($i-1)%$_columncount==0): ?> first<?php elseif($i%$_columncount==0): ?> last<?php endif; ?>"> <?php echo $product->getname() ?> <?php $k++;?> </li> <?php endoforeach; ?> </ul> <style> .big,.big img { width: 60% !important; height: 278px !important; } </style> the big class applies 4th, 10th,14th,20th... <li> create sec row 2 products. problem 3rd <...

mysql - Cloud9's database management with External DB management tool -

mysql - Cloud9's database management with External DB management tool - is there way utilize database management tool sequel pro remote connect cloud9 ide's mysql database thanks since cloud9 workspaces forwards 1 port (8080), don't think practical since you'd want run app well. however, perchance create mysql hear 0.0.0.0:8080 , seek connecting that. mysql remote-access cloud9-ide

javascript - Select every word and give it another color -

javascript - Select every word and give it another color - how can select every word in page, reverse , give color? what tried now: jquery('*').each(function(){ var text = jquery(this).text().split(' '), len = text.length, result = []; for( var = 0; < len; i++ ) { result[i] = '<span style="color: green;">' + text[i].split("").reverse().join("") + '</span>'; } jquery(this).html(result.join(' ')); }); but pretty far need. clues? you trying replace entire contents of elements, has problem when seek replace root nodes //the main point here need replace contents of text node, not html parts jquery('*').contents().each(function () { //not text node or there no content replace if (this.nodetype != 3 || !this.nodevalue.trim()) { return; } //replace value of text node $(this).replacewith(this.nodevalue.repl...

c++ - Windows Runtime (WP 8) out of process component and raising / subscription events -

c++ - Windows Runtime (WP 8) out of process component and raising / subscription events - i've made out-of-process wr/wp8 component own background thread. handles sip stack internally , runs in background thread. modified code chatterbox msdn example. https://code.msdn.microsoft.com/windowsapps/chatterbox-voip-sample-app-b1e63b8b last days add together delegates raise events component. in c++/cx is: public delegate void onlogmessage(platform::string^ msg); public ref class logger sealed { public: logger(); virtual ~logger(); void flushlog(); event onlogmessage^ onlogmessage; }; there subscription event in c# code: backgroundprocesscontroller.instance.logger.onlogmessage += new inttalk.onlogmessage(mlogger_onlogmessage); it builds ok. but during debug see exception: a first chance exception of type 'system.exception' occurred in mscorlib.ni.dll additional information: interface not registered (exception hresult: 0x80...

Awk convert csv to xml optionnal tag and rename tag -

Awk convert csv to xml optionnal tag and rename tag - name;num_tel;num_fixe;id_client;num_comd;email;city;date_liv gwenael;0998452223;1038431234;50c;12345;gwa@yahoo.fr;london;08/07/2015 judith;0954674487;1045227937;23d;78965;judith@yahoo.fr;toulouse;11/05/2015 from csv generate in output xml using awk command. need help 2 problems. tag name (name;num_tel;num_fixe;id_client;num_comd;email;) default value of csv , city;date_liv had been added user before generate csv , can add together more tag after default tag. objective output optionals tags in xml , 1 time had been input in csv seek utilize loop have many mistakes need help it. started @ position 7 because optional tag start @ place until end. nf==1 (i=7;i<=nf;i++) { printf " <option>%s</option>\n" printf " <val>%s</val>\n" } secondly how can rename tag exemple num_tel cell phone in awk script ? <rows> <c> <clie...

android - Is it possible to share dropbox datastore with distinct users? -

android - Is it possible to share dropbox datastore with distinct users? - from documentation of dropbox android datastore api says possible share datastore other accounts based on principals , roles. but seems (for non dropbox-business users) available principal dbxprincipal.public sounds can either share datastore nobody or share whole public. is case or missing here? understanding create way more sense able specify users want share datastore with. that's correct. note knows datastore id can access datastore, , datastore ids unguessable. it's app give datastore id specific users want have access. android dropbox-api

sql - ORA-12801: error signaled in parallel query server P004 and ORA-01555: snapshot too old -

sql - ORA-12801: error signaled in parallel query server P004 and ORA-01555: snapshot too old - i executing insert ... select ... ... ... sql , got next error using oracle : java.sql.sqlexception: ora-12801: error signaled in parallel query server p004 ora-01555: snapshot old: rollback segment number 32 name "_syssmu32_2039035886$" little i read next doc: http://www.dba-oracle.com/t_ora_12801_parallel_query.htm , http://www.dba-oracle.com/t_ora_01555_snapshot_old.htm saying ora-12801 caused no plenty processors back upwards parallel query. ora-01555 error relates insufficient undo storage or little value undo_retention parameter. but how can check related parameters avoid such issue recur? from the manual: ora-12801: error signaled in parallel query server string cause: parallel query server reached exception condition. action: check next error message cause, , consult error manual appropriate action. this generic error mes...

chart.js - Using Ajax get the values from database and display the bar chart using Chart Js -

chart.js - Using Ajax get the values from database and display the bar chart using Chart Js - below chart js code display bar chart static values: var info = { labels: ["january", "february", "march"], datasets: [ { label: "my first dataset", fillcolor: "rgba(220,220,220,0.5)", strokecolor: "rgba(220,220,220,0.8)", highlightfill: "rgba(220,220,220,0.75)", highlightstroke: "rgba(220,220,220,1)", data: [25,33,56] } ] }; window.onload = function(){ var ctx = document.getelementbyid("canvas").getcontext("2d"); window.mybar = new chart(ctx).bar(data, { barshowstroke: true, scaleshowverticallines: false }); } i tr...

java - How to Import a Gradle Jar Into Another Gradle Project -

java - How to Import a Gradle Jar Into Another Gradle Project - if have gradle project in netbeans, how can jar s other local projects imported build file without copying jars library folder? maintain having problems approach notably have create little tweak 1 of other projects , re-create jar dist folder gradle project library folder every time tweak occurrs. java file netbeans jar gradle

jpa - spring-data-rest and spring security circular reference when using security annotations in user repository -

jpa - spring-data-rest and spring security circular reference when using security annotations in user repository - i got problem custom userdetailservice , circular reference. add together @preauthorize annotation customerrepository circular reference error. it's clear has happen cause userdetailservice uses well. question how can solve circular reference? using spring-data-rest , spring-security. code below should illustrate needed reproduce error package demo; import org.springframework.beans.factory.annotation.autowired; import org.springframework.boot.commandlinerunner; import org.springframework.boot.springapplication; import org.springframework.boot.autoconfigure.enableautoconfiguration; import org.springframework.context.annotation.componentscan; import org.springframework.context.annotation.configuration; @configuration @componentscan @enableautoconfiguration public class springtestapplication implements commandlinerunner{ @autowired private custome...

php - codeigniter controller -

php - codeigniter controller - i want write new controller file, example: aaa.php class aaa extends ci_controller { public function bbb() { // stuff } } how can come in aaa.php's bbb(), the illustration files begin welcome.php's index() function. how can alter begin new controller file? if provide nil base of operations url, ci assume want index action. localhost/foo phone call foo's index() action. localhost/foo/bar , phone call foo's bar() action. if want phone call localhost , want access foo's index(), need check $route['default_controller'] = 'foo'; correctly setup in config.php. (if that's not working, check .htaccess , index.php add together manually) php codeigniter

.net - Issue with scrollviewer and canvas -

.net - Issue with scrollviewer and canvas - i have custom canvas command sits within scrollviewer - have implemented drag, drop , move items on canvas , overridden measureoverride when move item around on canvas size reflects changes if move item beyond visible portion of canvas resize accommodate moved item , scrollbars show appropriately. however if bring item view using scrollbars start move item out 1 time again scrollbars go bit haywire. it's rather poor explanation of problem afraid not sure how else set contain plenty info point me in right direction. yes right, more explanation of problem required. although in situation faced lot of issues canvas , scroll-viewer , @ question problems faced , how solved - scrollbars not visible after changing positions of controls within canvas i had utilize base.invalidatemeasure() explicitly after each operation refresh canvas , create scrollbars visible. .net wpf canvas scrollviewer

starter icon doesnt appear with other apps -android studio -

starter icon doesnt appear with other apps -android studio - after install app on device, runs without problems, when want access app home menu apps, icon doesnt appear, aplication manager , app installed, read others responses cant figure out, heres manifies file. <?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="majad.sunshine.app"><application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name=".mainactivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> ...

How should I check if resultset is empty or null using datastax cassandra driver for java -

How should I check if resultset is empty or null using datastax cassandra driver for java - how should check empty resultset using datastax java cassandra driver? suppose i'm executing next query "select * my_table mykey=something" there great chance query not matched. next code not work: if (rs != null) rs.one().getstring("some_column"); you pretty close, right solution is: row r = rs.one(); if (r != null) r.getstring("some_column"); the driver homecoming result set, whether or not there returned results. documentation one() states if no rows returned rs.one() returns null. you can utilize getavailablewithoutfetching() returns number of rows in result set without fetching more rows. since pagesize has >= 1, can assured if there @ to the lowest degree 1 row homecoming value greater 0. java cassandra datastax

php - How to save the name of the image from an input file -

php - How to save the name of the image from an input file - i have field type string called image_cover on database. have field type file on form: <?php echo $this->form->create($event, ['type' => 'file']) echo $this->form->file('image_cover') echo $this->form->submit('send') echo $this->form->end() ?> on controller $this->request->data('image_cover') array file name, size etc. i need value of image_cover alter name of file. i'm trying on beforesave not working there few ways of doing this, easiest understand have input field not part of schema of table. example, instead of image_cover have image_file : echo $this->form->file('image_file'); make sure set image_file in $_accessible list of fields of entity. able access field in beforesave can store it. there plugin you: https://github.com/davidyell/cakephp3-proffer php cakephp-3.0 ...

java - Writing a Raytracer, and cant get the image to be centred properly? -

java - Writing a Raytracer, and cant get the image to be centred properly? - i'm writing raytracer in java, i've gotten point can create objects, rays, test intersections , colour pixels. i've got basic anti aliasing done. problem if create sphere, should in centre of world (i.e 0.0 , 0.0 , 0.0 ) , draw image, end image this. when reddish circle should in middle of image. main method public static void main(string[] args) { system.out.println("rendering..."); long start = system.nanotime(); // setting size of image rendered world = new world(1920, 1080, 1.0); image = new image("image.png"); sampler = new simplesampler(4); projector = new orthographicprojector(); // main loop of program, goes through each pixel in image , assigns colour value (int y = 0; y < world.viewplane.height; y++) { (int x = 0; x < world.viewplane.width; x++) { // render pixel colour trace(x, ...

mlogit.data in R - error in 'row.names<-.data.frame`(`*tmp*`, value = c(" -

mlogit.data in R - error in 'row.names<-.data.frame`(`*tmp*`, value = c(" - i trying setup info mlogit-package in r, somehow seem run trouble. my data-frame called choice2, , looks this: id choice_id mode.ids selection weightloss adveffect inj tab infreq_1 infreq_3 cost 1 x1 0 3.5 0 1 0 1 0 550 1 x1 b 0 10.0 1 0 1 0 1 90 1 x1 c 1 0.0 0 0 0 0 0 0 1 x10 0 6.0 0 1 0 0 1 50 1 x10 b 0 3.5 1 0 1 1 0 165 1 x10 c 1 0.0 0 0 0 0 0 0 1 x11 0 2.0 1 1 0 0 1 165 1 x11 b 1 3.5 0 0 1 1 0 90 1 x11 c 0 0.0 0 0 0 0 ...

parse.com - How to detect from cloud code if any changes have been made to my class in Parse cloud -

parse.com - How to detect from cloud code if any changes have been made to my class in Parse cloud - i want deploy cloud service tracks whether changes have been made of classes in app in parse cloud. how should go doing this? i know have utilize background job on parse, how go doing this? parse.com

wso2 esb call iis web service with windows security -

wso2 esb call iis web service with windows security - i seek phone call soap web service locate on iis 7 server windows authentication wso2 esb proxy service. receive http 401 error. utilize rampart digest authenticate . but still not work. here security configuration. <wsp:policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:id="utovertransport"> <wsp:exactlyone> <wsp:all> <sp:transportbinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"> <wsp:policy> <sp:transporttoken> <wsp:policy> <sp:httptoken/> </wsp:policy> </sp:transporttoken> <sp:algorithmsuite> <wsp:policy> <sp:basic256></sp:basic256> </wsp:p...

awt - Show a panel in CardLayout in Java -

awt - Show a panel in CardLayout in Java - i wrote next code showing 3 panels depending upon of 3 buttons clicked @ bottom. import java.awt.borderlayout; import java.awt.button; import java.awt.cardlayout; import java.awt.color; import java.awt.frame; import java.awt.panel; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.awt.event.windowadapter; import java.awt.event.windowevent; public class cart extends frame implements actionlistener { panel cardpanel; panel firstp, secondp, thirdp; panel buttonp; button b1, b2, b3; cardlayout clayout; cart() { cardpanel = new panel(); clayout = new cardlayout(); cardpanel.setlayout(clayout); firstp = new panel(); firstp.setbackground(color.blue); secondp = new panel(); secondp.setbackground(color.red); thirdp = new panel(); thirdp.setbackground(color.yellow); b1 = new button("first"); b2 = new button("second"); b3 = new button(...

c# - Getting Error While uploading Video to YouTube using its API -

c# - Getting Error While uploading Video to YouTube using its API - i have created api key , used developer key. i'm getting error while uploading video youtube: google.gdata.client.gdatarequestexception unhandled user code hresult=-2146233088 message=execution of request failed: https://uploads.gdata.youtube.com/feeds/api/users/default/uploads source=google.gdata.client responsestring=<?xml version='1.0' encoding='utf-8'?><errors><error><domain>yt:validation</domain><code>invalid_value</code><location type='xpath'>media:group/media:category[@scheme='http://gdata.youtube.com/schemas/2007/categories.cat']/text()</location></error></errors> stacktrace: @ google.gdata.client.gdatarequest.execute() @ google.gdata.client.gdatagauthrequest.execute(int32 retrycounter) @ google.gdata.client.gdatagauthrequest.execute() @ google.gdata.client.mediaser...

c++11 - vector<vector> to array in C++ -

c++11 - vector<vector<?>> to array in C++ - i've read plenty of threads on vector array conversion, how vector<vector<?>> converted singly dimensioned array? discovered vector's data function; used somehow? you're on right track .data() fellow member function, give array of objects of type std::vector<t> , not array of objects of type t . flatten nested vector need yourself. trick. // 1. compute total size required. int total_size = 0; (auto& vec : vectors) total_size += vec.size(); // 2. create vector hold data. std::vector<t> flattened; flattened.reserve(total_size); // 3. fill (auto& vec : vectors) (auto& elem : vec) flattened.push_back(elem); // 4. obtain array auto ptr = flattened.data(); for older compilers, can iterate through vectors so for (std::vector<std::vector<t> >::iterator iter = vectors.begin(); iter != vectors.end(); ++iter) { (std::vector<t>::i...

iphone - dismissModalView doesn't respond to touches -

iphone - dismissModalView doesn't respond to touches - in myappdelegate, when button pressed presents modal view: - (void) showinfopanel:(id)sender { infoviewcontroller = [[infoviewcontroller alloc] init]; uinavigationcontroller *infonavcontroller = [[uinavigationcontroller alloc] init]; infonavcontroller.navigationbarhidden = yes; [window addsubview:infonavcontroller.view]; [infonavcontroller presentmodalviewcontroller:infoviewcontroller animated:yes]; } in infoviewcontroller have dismiss modal view: - (void) exitinfopanel:(id)sender { [self.parentviewcontroller dismissmodalviewcontrolleranimated:yes]; } although works, myappdelegate window doesn't respond touches anymore. instead in infoviewcontroller if: [self.view removefromsuperview]; it respond touches lose animation of dismissing modal view. what doing wrong, why doesn't respond touches when modalview dismissed? ? thanks iphone

Repeating control in jQuery -

Repeating control in jQuery - i have command 2 textboxes , select box in 1 row. user can add together or remove set of these rows. need in jquery. have links sort of feature/plugin in jquery i've posted quick and, fairly, dirty means of doing on over jsbin, js , css below: javascript/jquery: $(document).ready( function() { $('span.add').live('click', function() { var lastrow = parseint($('fieldset:last-child').attr('id').slice('1')), newrow = lastrow+1, newxhtml = '<label for="inputrow' + newrow + '">label text</label> <input type="text" name="inputrow' + newrow + '" id="inputrow' + newrow + '" <label for="selectrow' + newrow + '">label text</label> <select name="selectrow'+newrow+' id="selectrow'+newr...

c# - try catch bad form? -

c# - try catch bad form? - i think sort of know reply this, there many ways things (some of wrong :) )... i have little recursive function find employees manager's id. beingness used in import script , may persons immediate manager has left (been disabled) need find employees (the manager) manager (and on) can assign stuff them. in case isn't obvious, employeestodisable generic list of employees marked disabled in import. i guess asking, : overhead associated catching exception much of trade off create in instance. , should doing differently. work fine, feels bad form.. i have code thus: private guid getmyenabledmanagersid(onlineemployee e) { employee manager; seek { //see if employee e's manager in disabled list. manager = (from emp in employeestodisable emp.employeeid.equals(e.managerid) select emp).single(); //yes are, need phone call 1 time again homecoming getmyenabledmanagersid(manager); } gr...

java - Our project contains 2600 class files - where and how should we start writing junit tests? -

java - Our project contains 2600 class files - where and how should we start writing junit tests? - our project contains 2600 class files , have decided start using automated tests. we know have should have started 2599 class files ago, how , should big projects start write tests? pick random class , go? what's of import know? there tools use? write unit test before alter something, , every bug encounter. in other words, test functionality working on. otherwise, going take lot of time , effort write tests classes. java unit-testing junit

c++ - forward declaration generates incompatible type error -

c++ - forward declaration generates incompatible type error - i've been reading on forwards declarations, including in forum. saves including header file, next code generates error: #ifndef classa_h_ #define classa_h_ class b; class { public: a(); ~a(); int getcount(); private: static int _count; int _num; b _b1; //error }; compiler says: a.h:23: error: field ‘_b1’ has incomplete type i noticed if create _b1 of type b* problem solved. so forwards declaration pointer types? if want a hold b object have #inlcude "b.h" ? thanks! the compiler has know exact definition of class b determine @ to the lowest degree size give class a . if utilize pointer, knows size. note circular dependencies not possible. if want class { b b; }; class b { a; }; then , b must have infinite size... c++