Posts

Showing posts from June, 2010

android - What are the system requirements of ADT? -

please let me know recommend requirement run eclipse , android emulator simantaniously? i've laptop powered intel i3 processor 1.7 ghz clock speed, 4 gb ram , windows 10, bitdefender antivirus installed i'm not able work on these tools smoothly. on desktop powered 2.8ghz dual core 3gb ram works smoothly. the android emulator showing android logo @ , doesn't starts 10 minutes on idle. please list down recommended requirement required run eclipse , android emulator simantaniously , smoothly on laptop. i suggest switching android studio . support adt has ended . moreover, make sure have updated android sdk. there improvements in emulators , system images in last years, made them faster. can switch linux (e.g. ubuntu) because can use hardware acceleration emulators. i'm not sure if it's working on ms windows. if won't help, can try genymotion .

VB.NET - How to add borders on an MDI child borderless form? -

i using way below, add borders mdi child borderless forms... private sub form_paint(sender object, e system.windows.forms.painteventargs) handles me.paint if me.windowstate = formwindowstate.maximized me.padding = new padding(0, 0, 0, 0) me.backcolor = color.fromargb(76, 76, 76) else dim mf_rect new rectangle(5, 5, me.clientsize.width, me.clientsize.height) dim mf_color = new solidbrush(color.fromargb(76, 76, 76)) e.graphics.fillrectangle(mf_color, mf_rect) me.padding = new padding(5, 5, 5, 5) me.backcolor = color.fromargb(64, 64, 64) end if end sub but, if mdi child form steps out of mdi parent's borders, half of it, , maximize , normalize again, borders gone!!! if slide in, see them again!!! any idea why happening? the dragging of form outside of mdi parent's borders not required reproduce behavior. need maximize , normalize form. the problem form not being repainted after has bee...

angularjs - angular price range filter not working -

i have made price range filter, , when checkboxes clicked, want show items have price falling in price range specified checkbox this following - http://jsfiddle.net/65pyj/ html <div class="checkbox"> <input type="checkbox" ng-click="includeprice('0,700')" ng-checked=""/> rs 700 , below <br/> <input type="checkbox" ng-click="includeprice('701,1500')" ng-checked=""/> rs 701 - 1500 <br/> <input type="checkbox" ng-click="includeprice('1501,3000')" ng-checked=""/> rs 1501 - 3000 <br/> <input type="checkbox" ng-click="includeprice('3001,5000')" ng-checked=""/> rs 3000 - 5000 <br/> <input type="checkbox" ng-click="includeprice('5001,100000000')" ng-checked=""/> rs 5001 , above </div> in controller,...

android - Xamarin: Unsure what to cast using DriveFile.Open -

i tried lookup documentation drivefile.open xamarin still can't find class cast return statement code below var pendingresult = drivefile.open(.. , .., ..) var obj = pendingresult.await(); on android documentation, class casting drivecontents drivecontents = drivecontentsresult.getdrivecontents(); but can't find class called drivecontentsresult. non-async way (using onresult callback) drivefile.open(_googleapiclient, drivefile.modereadonly, null).setresultcallback(this); will call onresult , there can cast result: void iresultcallback.onresult(java.lang.object result) { var contentresults = (result).javacast<idriveapidrivecontentsresult>(); var drivecontent = contentresults.drivecontents; d.writeline(drivecontent.driveid); } async way: var drivecontentresult = drivefile.openasync(_googleapiclient, drivefile.modereadonly, null).continuewith((resulttask) => { var drivecontentresults = resulttask.result; var drivecont...

ios - How to create customised nsdictionary from two nsarrays -

i have 2 arrays this idarray:( "548c2afe-5943-4929-9c6b-b544f5022115-sff45v-kjsa68f", "656e8481-f2d5-4843-bebd-883f1b0f79d0-ksfns-gg456gg" ) namesarray:( "king", "queen" ) i want make dictionary looks this [{ "id" : "548c2afe-5943-4929-9c6b-b544f5022115-sff45v-kjsa68f", "name" : "king" }, { "id" : "3656e8481-f2d5-4843-bebd-883f1b0f79d0-ksfns-gg456gg", "name" : "queen" }] help me in issue. have tried this nsdictionary *fulldictionary = @{@"id": userarray, @"scandat": scandatesarray}; nserror *error; nsdata *data = [nsjsonserialization datawithjsonobject:fulldictionary options:0 error:&error]; nslog(@"%@", fulldictionary); and output is { id = ( "656e8481-f2d5-4843-bebd-883f1b0f79d0", ...

gradle - java.util.zip.ZipException: duplicate entry: android/support/v7/appcompat/R$anim.class -

i downloaded new preview android studio 2.2 , built project, when hit gradle error: execution failed task ':app:transformclasseswithjarmergingfordebug'. com.android.build.api.transform.transformexception: java.util.zip.zipexception: duplicate entry: android/support/v7/appcompat/r$anim.class this ./gradlew app:dependencies report: http://pastebin.com/hu5kyfsn this build.gradle file: apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'io.fabric' apply plugin: 'com.fernandocejas.frodo' apply plugin: 'com.frogermcs.androiddevmetrics' apply plugin: 'com.getkeepsafe.dexcount' apply plugin: 'me.tatarka.retrolambda' android { signingconfigs { config { //removed } } compilesdkversion 23 buildtoolsversion "23.0.3" defaultconfig { applicationid "com.usehomeroom.vasuki" minsdkversion 17...

.net - Remove the blank column in a WPF DataGrid -

Image
i use dataset populate datagrid in wpf (c#). result is: i want remove blank column @ left side. , want share remaing space columns. expected result is: my xaml code is: <window x:class="rfid.careerwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="careerwindow" height="356" width="404"> <grid> <datagrid x:name="dg1" horizontalalignment="left" margin="25,10,0,0" verticalalignment="top" height="306" width="355" enablerowvirtualization="false" enablecolumnvirtualization="false" fontfamily="2 badr" fontsize="20" flowdirection="righttoleft" canuseraddrows="false" canuserreordercolumns="false"/> </grid> </window> avoid setting ...

javascript - Mustache.js within Django template not working -

Image
i want render ajax response mustache.js reason, variables inside templates aren't displayed. modified mustache's delimiter still isn't working. .js /* * reservation preview snippet. */ $(document).ready(function() { mustache.tags = ['<%', '%>']; var tablerows = $("#table-wrapper table tr"); // table row clicked tablerows.click(function(e) { e.preventdefault(); var $this = $(this); var previewurl = $(this).find("#ajax_id").attr('data-id'); // preview , load template $.getjson(previewurl, function(reservation) { console.log("updated at: " + reservation.updated_at); var template = $('#reservationpreviewtpl').html(); var html = mustache.render(template, reservation); console.log('html' + html); $('#test123').html(html); }); }); template <...

ionic framework - Ionic2 ion-content not render content -

Image
i try using ion-content as: <ion-content> <ion-list> <button ion-item *ngfor="let item of items" (click)="itemtapped($event, item)" class="list-item"> <img class="picture" src="/build/images/profile/{{item.picture}}" item-left/> <div class="item-data"> <div> <span class="title">{{item.title}}</span> <span class="sub-title">{{item.typework}}</span> <span class="distance"><ion-icon name="map" item-right></ion-icon>{{item.distance}} km</span> </div> <div class="evaluation"> <span><ion-icon name="cash"></ion-icon>{{item.noteaverageprice}}</span> <span><ion-ic...

c - I write to a file but the changes doesn't save -

i'm writing function change value in csv file, , vs debugger says it's working perfectly, after program exits, see in file no changes have been made. know why? int changevalue(int line, int row, char* text, char* fi_le) /*line , row places in value in file , fi_le address file*/ { int = 1; char letter = ' '; file* file = fopen(fi_le, "r+"); if (!(file))//checks file exists { printf("file r+ open in changevalue -- error!"); return 1; } while (i < line)//first line number 1 { letter = fgetc(file); if (letter == '\n') { i++; } } = 0; while (i < row)//first row number 0 { letter = fgetc(file); if (letter == ',') { i++; } } (i = 0; < strlen(text) - 1; i++)//writes new value in old's value place { fputc(text[i], file); } fclose(file); return...

javascript - Technique that allows a website to perform numerous simultaneous computations -

i developing website following: user can enter input, typically numbers. by clicking on button, website applies algorithm input. algorithm (a little bit) computationally intensive. the result of algorithm should shown on website user. question: how 1 code kind of workflow efficiently - important me that... ... computations performed fast possible user gets result fast possible. ... web site can accessed lot of people @ same time without slowing each others computations down. my own initial approach: have done research, didn't find the ideal solution. 1 option encountered in javascript on website, found javascript slow doesn't satisfy needs. describe current approach in following - if approach not best 1 please correct me , there no need spend time on approach - suggesting better approach far more useful me . current approach can described follows: a.) after user enters input , clicks button, input data gets uploaded file on server. file should in same fo...

java - Unit testing - implementing equals only to facilitate testing -

here requirements unit testing: i unit test production classes i separate test code , production code apart such can release production code only this seems reasonable requirements. however, problem arises when need use methods such assertequals on objects these requires equals method overridden. equals method have implemented in production classes but used testing. becomes worse when coding practices dictates if equals overridden, should hashcode implemented resulting in more unused production code clutters production classes. here simple example user model (intellij autoimplemented equals , hashcode ) public class user { public long id; public long companyid; public string name; public string email; public long version; @override public boolean equals(object o) { if(this == o) return true; if(o == null || getclass() != o.getclass()) return false; user user = (user) o; if(companyid != user.companyi...

cannot resolve method 'addDrawerListener(android.support.v7.app.ActionBarDrawerToggle)' -

package com.shafi.shafqat.listview; import android.support.design.widget.navigationview; import android.support.v4.widget.drawerlayout; import android.support.v7.app.actionbardrawertoggle; import android.support.v7.app.appcompatactivity; import android.support.v7.widget.toolbar; import android.view.menuitem; import android.view.view; import android.widget.textview; import android.widget.toast; public class raweractivity extends appcompatactivity{ drawerlayout drawer; navigationview navview; toolbar toolbar; public void initnavdrawer(){ navview = (navigationview) findviewbyid(r.id.navigation_view); navview.setnavigationitemselectedlistener(new navigationview.onnavigationitemselectedlistener() { @override public boolean onnavigationitemselected(menuitem item) { switch (item.getitemid()){ case r.id.bikes: toast.maketext(getapplicationcontext(), "bike...

android - Firebase storage handling network interruptions when download in progress -

i trying download files firebase storage. works when there stable internet connection. if internet connection lost while downloading content halfway, keeps trying download content. how detect if there no content being downloaded? i have implemented onprogesslistener of storagereference . however, not sure how make use of detect if there no progress in download. new onprogresslistener<filedownloadtask.tasksnapshot>() { @override public void onprogress(filedownloadtask.tasksnapshot tasksnapshot) { //what tasksnapshot detect if there no progress in download? } }; uploads, downloads , other operations intended automatically retry , shield temporary interruptions. there configurable timeout end (fail) operation if cannot transfer packet in time. can set with: //if interrupted more 2 seconds, fail operation. firebasestorage.getinstance().setmaxuploadretrytimemillis(2000); there different timeouts uploads, downloads , other operations. with up...

xml.etree.ElementTree.XMLParser has no attribute '_parser' in python-3.x -

trying run code in python-3.x not work works fine in 2.7. looking in c:\python34\lib\xml\etree\elementtree.py see python3 imports c implementation of elementtree while python2 not. how can solve this? forcing elementtree not import c implementation. from xml.etree import elementtree xml.etree.elementtree import xmlparser class customxmlparser(xmlparser): def __init__(self, html=0, target=none, encoding=none): xmlparser.__init__(self, html, target, encoding) self._parser.commenthandler = self.handle_comments def handle_comments(self): pass tree = elementtree.parse(path, customxmlparser()) i have tried elementtree.xmltreebuilder works in python2. thanks!

r - Recursive function that operates on its own preceding output -

i have price particular baseline year (in case 1993), , multiplication factor years. using these known multiplication factor, want compute (project) price years succeeding , preceding baseline year. here input data: year city multiplicationfactor price_baselineyear 1990 new york na na 1991 new york 0.9 na 1992 new york 2.0 na 1993 new york 0.8 100 1994 new york 0.6 na 1995 new york 0.8 na 1996 new york 2.0 na 1990 boston na na 1991 boston 1.6 na 1992 boston 1.25 na 1993 boston 0.5 200 1994 boston 1.75 na 1995 boston 2.5 na 1996 boston 0.5 na the code construct input data: mydata<-structure(list(year = c(1990l, 1991l, 1992l, 1993l, 1994l, 1995l,19...

sql server - How to insert rows into a table based on another table's rows using Triggers? -

i have 3 tables: employee id firstname lastname employeetasksid employeetasks id employeeid employeetaskdefinitionid employeetaskdefinitions id description etc. what trying once employee inserted employees table, need insert rows employeetasks table based on inserted employee's id , every employeetaskdefinition's id. for example: employee id 1 inserted employee table employeetaskdefinitions table has 6 rows ids 1-6 employeetasks table needs have 6 rows after insert: id = 1, employeeid = 1, employeetaskdefinitonid = 1 id = 2, employeeid = 1, employeetaskdefinitonid = 2 id = 3, employeeid = 1, employeetaskdefinitonid = 3 id = 4, employeeid = 1, employeetaskdefinitonid = 4 id = 5, employeeid = 1, employeetaskdefinitonid = 5 id = 6, employeeid = 1, employeetaskdefinitonid = 6 now have read numerous posts cursors, people saying they're bad practice use task. how this? note: don't want use else other trigg...

algorithm - What is the total running time of the following code (N is an int variable) -

i preparing exam, came question: what total running time of following code (n int variable) z z = new z(n); (int = 0; < n; i++) z.insert("bob", i); class z: public class z { string[] names; integer[] numbers; int n = 0; public z(int cap) { names = new string[cap]; numbers = new integer[cap]; } public integer find(string s) { (int = 0; < n; i++) { if (names[i].equals(s)) return numbers[i]; } return null; } public void insert(string s, integer m) { (int = 0; < n; i++) { if (names[i].equals(s)) numbers[i] = m; } names[n] = s; numbers[n] = m; n++; } } i think answer question o(n^2). first loop takes o(n) times, , method insert takes o(n) times (notice: n++ on every insert call), total gives o(n^2) first note n variable in main part not same n referenced within object i...

ruby - No route matches [GET], for delete request -

i getting routing error no route matches [get] upon delete request. here delete route delete '/remove/:product_id', to: 'carts#remove_product' using <a href="/remove/<%=subq.product.id%>" method="delete"></a> . idea error? as justin wood suggested, use rails' link_to helper, : <%= link_to 'destroy', your_method_path(subq.product), :method => :delete %> if want stick current way of doing it, try (please note data-method instead of method , see https://stackoverflow.com/a/35283202/4480140 ): <a href="/remove/<%=subq.product.id%>" data-method="delete"></a> and check in application.js file have //= require jquery //= require jquery_ujs and application.js file included view/layout/application.html.erb file. cf https://stackoverflow.com/a/17748391/4480140

logging - Powershell command line logs - what is 'prompt' -

pulling command line logs powershell added variables #$logcommandhealthevent = $true #$logcommandlifecycleevent = $true and works great 'prompt'?? time event command ---- ----- ------- 5/27/2016 1:38:31 pm 501 prompt 5/27/2016 1:38:31 pm 500 prompt 5/27/2016 1:38:31 pm 501 get-process 5/27/2016 1:38:31 pm 500 get-process 5/27/2016 1:38:29 pm 501 prompt 5/27/2016 1:38:29 pm 500 prompt 5/27/2016 1:38:29 pm 501 ipconfig this appear in eventdata in logs - faa69d45087e pipelineid=608 commandname=prompt commandtype=function scriptname= commandpath= commandline=prompt from about_prompts prompt function determines appearance of windows powershell prompt. windows powershell comes built-in prompt function, can override defining own prompt function. ... built-in prompt windows powershell includes built-in prompt function. in windows powershell 3.0, built-in prompt ...

firebase - This Browser is not supported in iOS simulator -

i getting error in react-native, this browser not supported , in ios simulator, after running following code: const firebase = require('firebase') const firebaseconfig = require('./firebase-config') firebase.initializeapp(firebaseconfig) firebase.database().ref('test').set('hello') firebase-config contains databaseurl. why? firebaser here the new firebase authentication doesn't work in react native due dependency on window object. we're looking if that's can improve, no guarantees. from jacob's post on firebase-talk list : as "workaround" if don't need auth (unlikely, know, still worth mentioning), should able following: var app = require('firebase/app'); var database = require('firebase/database');

c++ - Refactor code that violates "Needless Repition" principle -

assume class animal eat, sleep , make noise. assume class mammal : public animal makesbaby assume mammal eat, sleep , make noise inherits animal. this code extended code presented in this question answered yesterday dan masek. the problems code are: mammal can't inherit animal (compile error) mammal cannot eat, sleep or make noise code suffers "needless repetition", meeting scorn , derision of uncle bob martin. i want code excellent possible, stuck. i think similarities between 2 classes center around typedef defines function pointer member in class. tried templating this, ran numerous compile errors, demonstrating utter failure comprehend how solve problem. hence post. for saw previous post, have added #ifdef disable printing (this arduino code, std not available), , added asserts wherever could. added mammal class. // set false suppress serial.print output #define tracing true class animal { public: enum { cmd_eat = 1 , cmd_sl...

formal languages - Regex create a expression solving the following pattern -

this part of university optional homework , kinda struggling bit. the pattern solve isn't hard honest don't our heads around it, create expression has alphabet {a,b,c} contains @ least 1 a , 1 b . current 2 approaches (a|b|c)*a(a|b|c)*b(a|b|c)* or (a|b|c)(a|b)(a|b|c)*(a|b)(a|b|c)* but both of these have flaws first 1 wouldnt allow ccbacc second 1 allow ccaacc. greetings there can 2 rules produce requirement, 1 a before b : s₁ → [abc]* [abc]* b [abc]* the other b before a s₂ → [abc]* b [abc]* [abc]* now combine them using alternative operator, s → s₁ | s₂ = [abc]* [abc]* b [abc]* | [abc]* b [abc]* [abc]* this can simplified using rule ab|ac = a(b|c) , ac|bc = (a|b)c : s → [abc]* (a [abc]* b | b [abc]* a) [abc]* i assume homework deals formal language. in real programming, use indexof or similar functions find out if string contains a , b . regex heavy task.

How can I diagnose and remedy strange download behavior from an Azure public blob? -

i host software product on azure, , store downloads in public container, website links via url. can see downloads page here: https://flyinside-fsx.com/download normally somewhere in range of 200mb-500mb worth of downloads per day, downloaded files being 15-30mb. starting these week, i've seen spikes of 220gb per day storage container. hasn't harmed website in way transfer costing me money. i'm not seeing increase in website traffic accompany 220gb worth of downloads, appears either sort of dos attack or broken automated downloader. is there way remedy situation? can set container detect , block malicious traffic? or should using different type of file hosting entirely, offers these sorts of protections? to see what's going on storage account, best way use storage analytics see storage activity logs . these logs stored in special blob container called $logs . can download contents of blob using storage explorer supports exploring contents of it. ...

javascript - Reading JSON data with jquery. Uncaught SyntaxError: Unexpected token : -

i'm trying read json data using jquery. i'm trying read json url: http://mkweb.bcgsc.ca/color-summarizer/?url=http://scontent-a.cdninstagram.com/hphotos-xfa1/t51.2885-15/10643840_701797013239098_657737630_a.jpg&precision=low&num_clusters=3&json=1&callback= ? keep getting error: uncaught syntaxerror: unexpected token : here jquery: $(document).ready(function () { var 1 = "1" $.getjson('http://mkweb.bcgsc.ca/color-summarizer/?url=http://scontent-a.cdninstagram.com/hphotos-xfa1/t51.2885-15/10643840_701797013239098_657737630_a.jpg&precision=low&num_clusters=3&json=1&callback=?', function(result) { document.write(result.clusters.one.rgb[0]); }); }); i'm getting error @ first colon in json code. understand, json data being read javascript. how can fix this. reading api docs found need specify jsnop=1 parameter in order retrieve data via jsonp. tthe correct code ...

Spring boot junit test cannot get command line argument (Eclipse - STS) -

Image
i did spring boot application, , use command line arguments. read them in services like @value("${v}") private string vertical; application works , see value passed command line. added same command line arguments junit tests run configurations --spring.profiles.active=development --m=keyword --v=healthcare --i=keyword_update.json but when try run test crashes message, means application context cannot command line attribute: 2016-05-28 17:16:00.924 error 4204 --- [ main] o.s.boot.springapplicat ion : application startup failed org.springframework.beans.factory.beancreationexception: error creating bean wit h name 'application': injection of autowired dependencies failed; nested excepti on org.springframework.beans.factory.beancreationexception: not autowir e field: healthjobs.service.catalog healthjobs.app.application.catalog; nested e xception org.springframework.beans.factory.beancreationexception: er...

c# - whats the right version for using either scope_identity() ,@@identity (),last_insert_id() in mysql -

im working on asp.net c# ,i tried 3 of them none worked , sql error(you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'select last_insert_id()') query: string st = ("insert `service` values ('','" + noms + "','" + desc + "','3','" + ad + "','" + vil + "','" + pays + "')"+" select scope_identity()"); you can use lastinsertedid property of mysqlcommand : // cmd mysqlcommand objet cmd.executenonquery(); long lastinsertedid = cmd.lastinsertedid;

email - Sending E-Mail in PHP -

i tried everything. want send e-mail. my first code: <?php $to = "yourgmail@gmail.com"; $subject = "hello"; $body = "hi!"; try { mail($to, $subject, $body); } catch (exception $e) { echo 'caught exception: ', $e->getmessage(), "\n"; } ?> it isn't working. no error message, not working. my second code: function send_mail('mygmail@gmail.com','yourgmail@gmail.com','hello','hi!') { $headers = ''; $headers .= "from: $from\n"; $headers .= "reply-to: $from\n"; $headers .= "return-path: $from\n"; $headers .= "message-id: <" . md5(uniqid(time())) . "@" . $_server['server_name'] . ">\n"; $headers .= "mime-version: 1.0\n"; $headers .= "date: " . date('r', time()) . "\n"; mail($to,$subject,$body,$headers); } it isn't working to...

java - ScheduledExecutorService not printing the exception stacktrace when the run method throws NPE -

in code given below, i.intvalue throwing npe . not printed. instead scheduledexecutorservice terminates silently cancelling subsequent executions . why? import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.*; class concurr { public static void main(string[] args) { scheduledexecutorservice sce = executors.newscheduledthreadpool(1); runnable task = new runnable() { public void run() { system.out.print("."); integer = null; i.intvalue(); } }; final scheduledfuture<?> future = sce.scheduleatfixedrate(task,0,2,timeunit.seconds); sce.schedule( new runnable() { public void run() { future.cancel(true); } },10,timeunit.seconds); } } an executorservice catches (and stores) exceptions thrown in runnable , callable in...

Print, loop, Indentation, Python -

i need pit of help. learning python, , have python 2.7.8 looking build simple program count vowels in word. here code: count = 0 total = 0 v in "bonbon": count += 1 if v == 'e' or v == 'o' or v == 'u' or v == 'a': print('the number of vowel in word ' +str(total)) why print twice? 1- number of vowel 0 , number of 2 could me please? guys it's printing twice because have print inside of loop. should instead increment total inside loop , print afterwards. if do: count = 0 total = 0 v in "bonbon": count += 1 if v == 'e' or v == 'o' or v == 'u' or v == 'a': total += 1 print('the number of vowel in word ' + str(total)) it should work.

How to check if a custom (pseudo) selector has been added to jQuery -

i grabbed following snippet comments on this post @ csstricks.com . $.extend($.expr[":"], { "containsnc": function(elem, i, match, array) { return (elem.textcontent || elem.innertext || "").tolowercase().indexof((match[3] || "").tolowercase()) >= 0; } }); essentially, provides pseudo-selector :containsnc , works :contains case-insensitive. i want able detect if selector available can conditionally use :contains fallback. how can check presence of such custom selector? alternatively, there better way case insensitive matching in newer jquery? for reference, here's how i'm using :contains ( to filter list of facebook friends ) $('#friend-search').on('keyup', 'input', function() { var $search = $(this).val(), $friends = $('.friend'), match = ':contains(' + $search + ')'; $friends.hide().filter(match).show(); }); after post...

css - Tesseract theme menu -

i'm new forum hello all. i'm working on wordpress website theme called tesseract. new wordpress have limited experience working it. the problem i'm experience menu @ top of page. if visit www.avoinvents.co.uk , take you'll see categories don't sit on same line. if remove 1 of categories page looks nicer , neater. categories necessary not delete any. could on here suggest how make necessary changes fix menu. many here's css changed in browser make menu appear in 1 line: #masthead { padding-top: 10px; padding-bottom: 10px; } #site-banner-left { width: 100%; } the main problem site-banner-left css definition had width of 60%, causing text wrap around border, changed width 100% , added padding make navigation area little bigger. if messes other parts of theme, try making text size of site-banner-left definition smaller instead of changing width. hope helps.

cakephp 3.0 'App\Controller\ContactForm' not found modelless form -

i trying create modelless form using cakephp 3.0, have been following guide through cookbook here http://book.cakephp.org/3.0/en/core-libraries/form.html seems getting confused put contactform.php. says put in src/form/contactform.php did not work. can direct me this? thanks pls, provide bit more info problem 1) contactform recognized in controller? if not - check namespace 2) handle data in protected function _execute(array $data) { // send email. return true; } not in controller's if ($this->request->is('post')) { if ($contact->execute($this->request->data)) { //not here!!! } else { // error } }

javascript - How to init invalid email and show in input(type="email")? -

i have signup form built angularjs using frontend , backend (with express.js) input verification. whenever user enters invalid email address, qwidjq&/% , i'd show error message , send form user. email input field should contain invalid email value. the problem cannot init input(type="email") fields invalid email values. input(type="text") works. here example . any ideas how work around restriction? don't want use input(type="text") , custom directive. i'd keep input(type="email") changes keyboard layout on mobile devices. thanks in advance! perhaps display bad text next input element, e.g. <input type="email" /><span id="emailerror">qidjq&/% not valid address</span>

ios - Render a MKPolyline in a UIImage -

Image
i need render mkpolyline in uiimage without use of mkmapview if possible (for performances reasons mainly, want display path possible, while map screenshotter provides asynchronously map, app strava does). i came piece of code: func pathimageforsize(size: cgsize) -> uiimage { let region = regionforpath() // mkcoordinateregion let coordinates = locations.map { $0.coordinate } uigraphicsbeginimagecontextwithoptions(size, false, uiscreen.mainscreen().scale) let context = uigraphicsgetcurrentcontext() cgcontextsetstrokecolorwithcolor(context, uicolor.palette_maincolor().cgcolor) cgcontextsetlinewidth(context, 4.0) cgcontextbeginpath(context) let origin = cgpoint(x: region.center.latitude - region.span.latitudedelta / 2, y: region.center.longitude - region.span.longitudedelta / 2) (index, coordinate) in coordinates.enumerate() { let point = cgpoint(x: ((cgfloat(coordinate.latitude) - origin.x) / cgfloat(region.span.latitudedelta...

linux - Percona 5.6 Docker Image cannot load my /etc/mysql/conf.d/*.cnf -

Image
i struggling on issue @ least 14 hours far :(. i configuring build server docker, jenkins, java, scala on top of centos 7. while working liquibase , jooq:codegen, need have proper mysql(percona:5.6) containers setup, unfortunately, seems official percona image (percona:5.6) not load *.cnf files under /etc/mysql/conf.d properly, think issue, such file permissions issues. i following instructions from: docker hub: percona not work me, , tried many wrong ways, none working. the file/folders permissions following picture: after mounted container, following picture: and docker-compose.yaml following: the default my.cnf provided official percona 5.6 following: root@25295730da09:/etc/mysql# cat my.cnf # # mysql database server configuration file. # # can copy 1 of: # - "/etc/mysql/my.cnf" set global options, # - "~/.my.cnf" set user-specific options. # # 1 can use long options program supports. # run program --help list of available options , # --prin...

winforms - C# FORMS, Rezising a picturebox at runtime -

i trying rezise picturebox @ runtime, , i've found code others have gotten work. code came this post , copy paste here well. protected override createparams createparams { { var cp = base.createparams; cp.style |= 0x840000; // turn on ws_border + ws_thickframe return cp; } } according answer, have paste class, class? don't know paste picturebox resizing work, , hoping here clarify ment. thanks

Using jquery ui autocomplete + ajax json data -

i'm trying use http://jqueryui.com/autocomplete/#remote-jsonp i've taken code , tried adapt it. orginal code works (i can towns), , when adapt data, doesn't (nothing listed, nothing appears). json data php file. here code: jquery: function log( message ) { $( "<div>" ).text( message ).prependto( "#log" ); $( "#log" ).scrolltop( 0 ); } $( "#city" ).autocomplete({ source: function( request, response ) { console.log(request.term); $.ajax({ type: "post", url: "/chercheabo", datatype: "jsonp", data: { achercher: request.term }, success: function( data ) { response( $.map( data.mydata, function( item ) { return { label: item.pseudo + (item.pseudo ? ", " + item.userid : "") + ", " + item.pseudo, ...

z3 - Simplify function interpretation in model -

in smt: check uniqueness , totality of function gave function axiomatization , asked z3 model. because solving quantifiers in undecidable in general, z3 times out. here modified version in "int" case modelled single value: (declare-datatypes () ((abc int error none))) (declare-fun f (abc abc) abc) (assert (forall ((x abc)) (=> (or (= x int) (= x error) (= x none)) (= (f none x) none)))) (assert (forall ((x abc)) (=> (or (= x int) (= x error) (= x none)) (= (f x none) none)))) (assert (forall ((x abc)) (=> (or (= x int) (= x error)) (= (f error x) error)))) (assert (forall ((x abc)) (=> (or (= x int) (= x error)) (= (f x error) error)))) (assert (forall ((x abc) (y abc)) (=> (and (= x int) (= y int)) (= (f x y) int)))) (check-sat) (get-model) because there finitely many cases, z3 gives answer quickly: sat (model (define-fun k!26 ((x!0 abc)) abc (ite (= x!0 error) error (ite (= x!0 int) int none))) (define-fun f!28 ((x!0 abc) (x!1 ...

javascript - ng-true-value='0' picking up wrong values -

for demo see jsfiddle here , click on out of stock checkbox. it should show stock quantity of 0, picking quantity of 30. think becasue matching against string values. i assume issue with: ng-true-value='0' what best way fix this? please can provide code example? make strict value dynamic: <div ng-repeat="item in inventory | filter: searchinventory:!!searchinventory.qty | orderby:sortorder"> note: might messy if have multiple similar criterias http://jsfiddle.net/wyfs4/648/

"no module named..." when running this python code -

i have no idea causes error, simplest get, yet gives me hint question not meet quality standards must post longer intro. #=== # my_script.py import mymodule #=== # mymodule\__init__.py import sys my_def import * class mymodule: def __init__(self): pass #=== # mymodule\my_def.py def my_def(): pass traceback (most recent call last): file "my_script.py", line 1, in <module> import mymodule file "d:\test\mymodule\__init__.py", line 2, in <module> my_def import * importerror: no module named 'my_def' in __init__.py , add . before my_def . . means should looking file in same folder script itself, rather relative my_script.py . from .my_def import *

sql - How to quickly select and replace any content in SSMS -

Image
how select last 3 characters rows , replace them quickly? hope looking shift alt controls in ssms. navigate end of word, press shift alt , using keydown key select numbers of rows going affect press <- (keyleft) key three times select last 3 characters selected rows , type expected characters there. delete previous 3 characters , replace newly typed characters. the trick explained in these pages 1 , 2

php - How To Edit Index Page In Magento -

Image
i want edit html of content area in index page in magento. have tried many times failed. unable find index.phtml file in theme. porto theme\app\design\frontend\smartwave\porto\template\page\html this root directory of theme for example html <div class="container"> <div class="row"> <div class="col-md-3 col-sm-3"></div> <div class="col-md-3 col-sm-3"></div> <div class="col-md-3 col-sm-3"></div> </div> </div> i want changes here in index page if wanted put html on home page can easy way. in porto theme there several homepages have found active home page (may it's url-key "home") , edit them clicking record. steps login adminpanel select cms > pages choose page url-key home page or active home page you edit mode of selected page select content tab left tab put html code in content box save , catch clear done.

database - syntax error in c#.net -

i write code extract data textbox database when goes cmd.executenonquery(); code, shows incorrect syntax near '-'. error . this code write : private void picturebox1_click(object sender, eventargs e) { sqlconnection con = new sqlconnection(); string str = "server=localhost;database=ord-95;integrated security=true"; con.connectionstring = str; //sqldataadapter da = new sqldataadapter(); sqlcommand cmd = new sqlcommand(); cmd.connection = con; //dataset ds = new dataset(); cmd.commandtext = " insert build-seller" + "(name-build, name-seller, family-seller)" + "values(@name-build, @name-seller, @family-seller)"; cmd.parameters.addwithvalue("@name-build",txtbuild.text); cmd.parameters.addwithvalue("@name-seller",txtname.text); cmd.parameters.addwithvalue("@family-seller",txtfamily.text); con.open(); cmd.executenonqu...