Posts

Showing posts from May, 2011

html - Are there any differences in browser support for <a> link ellement using display: block; -

i wondering if there differences between following 3 buttons. , if there any, how browsers handle them, including area clickable? on website made, removed link buttons "my-button-1" example , added class element self, "my-button-2" example. using display block. after saw drop in page-views/clicks etc.. is there differences older browsers, when using link element display block? <a href="http://example.com"> <div class="my-button-1"> click here </div> </a> <a href="http://example.com" class="my-button-2"> click here </a> <div class="my-button"> <a href="http://example.com"> click here </a> </div> .my-button-1 { background-color: yellow; height: 50px; width: 200px; } a.my-button-2 { display: block; background-color: yellow; height: 50px; width: 200px; } .my-button-3 { d

asp.net mvc - How Request.IsAuthenticated work in mvc4 exactly -

i made 2 mvc project use login form before start use code login public actionresult login(accountlog usr) { accountlog personindatabase = db.accountlogs.firstordefault(m => m.usercode == usr.usercode); formsauthentication.setauthcookie(personindatabase.username, true); viewbag.id = personindatabase.usersid; return redirecttoaction("main", "main");} when run program @ check first if(request.isauthenticated) if true return view if else redirect login page public actionresult main() { if (request.isauthenticated) { return view(); } return redirecttoaction("login", "account"); } it worked fine noticed if run first program , made success login , close not made logout , run second program not logged yet open logged person mean if made login first 1 , open second open fine , vise versa how can differentiate between 2 proj

Regex - Python: Capture three (3) words after a specific word -

hello have following code: str1 = "hello, meet @ train station of berlin after 6 o' clock" match = re.compile(r' @ \w+ \w+ \w+') match.findall(str1) is there better way "\w+ \w+ \w" example capture specific number of words? yes. specify particular count match, use curly-braces. e.g.,: match = re.compile(r'at ((\w+ ){3})') which gives: >>> print match.findall(str1) [('the train station ', 'station ')] in general, capture n words after word , regex be: 'word\s+((?:\w+(?:\s+|$)){n})' where ?: designates "non-capturing" group, \s designates whitespace, | means "or", , $ means "end of string". therefore: >>> print re.compile(r'at\s+((?:\w+(?:\s+|$)){3})').findall(str1) ['the train station ']

ios - Updatable text field -

this simple many of you. have been asked build simple iphone app in xcode when view loaded update text field sentence of text (that updated daily). have been trying research struggling little find right thing. someone update db sentence of text fed text field. i know open question point me in direction of how , can research myself? thanks, chris well, start need url point content want. can grab following. please note not best method of doing so, if new ios not going optimized solution. nsstring *phrase = [nsstring stringwithcontentsofurl:[nsurl urlwithstring:@"http://yoururl.com"]]; then can applied simple uilabel . somelabel.text = phrase; of course there more adding button , whatnot, can find in standard tutorial anywhere online

c# - Multithreaded TCP server and client -

i search around before asking problem, looking example of tcp server , client in c#. i found this link,i used given code link unfortunately there's problem , i'm stocked! the following code complete code server (console) using system; using system.collections.generic; using system.linq; using system.text; using system.net.sockets; namespace tcp_server_console { class program { static void main(string[] args) { tcplistener serversocket = new tcplistener(8888); int requestcount = 0; tcpclient clientsocket = default(tcpclient); serversocket.start(); console.writeline(" >> server started"); clientsocket = serversocket.accepttcpclient(); console.writeline(" >> accept connection client"); requestcount = 0; while ((true)) { try { requestcount = requ

php - print array value to txt -

i write program have array printed in txt file: $dataset = array(); $dataset[] = array('a','b','c','d'); $dataset[] = array('a','d','c'); $dataset[] = array('b','c'); $dataset[] = array('a','e','c'); $arrlength=count($dataset); for($x=0;$x<$arrlength;$x++){ file_put_contents ('filename.txt', implode(',',$dataset[$x])."\n", file_append); } the code above produce txt file: a,b,c,d a,d,c b,c a,e,c but when try to print array db txt adopting previous code, doesn't give me desired output. here code: $result=array(); $key='sub'; foreach($this->click_model->getclickstream() $row) { $result[$row['id_click']]['sub'][]= $row['id_kampanye'].$row['code']; $newresult=array_column($result,$key); file_put_contents ('datasetarray.txt&

jquery - Ajax not sending to controller -

i trying use ajax update page: @using (html.beginform()) { @html.antiforgerytoken() <div class="form-horizontal"> <hr /> @html.validationsummary(true, "", new { @class = "text-danger" }) <div class="form-group"> <div align ="center" class="col-md-12"> @html.editorfor(model => model.youritem.comment, new { htmlattributes = new { @class = "form-control", placeholder ="add item", id="mango" } }) @html.validationmessagefor(model => model.youritem.comment, "", new { @class = "text-danger" }) </div> </div> <div class="form-group"> <div align ="center" class="col-md-12"> <button type="button" id="min_knapp" class="btn btn-default-shop

php - How do i submit mulitple forms, using the same action, using a single button -

so, have looked through forum, , not found case similar mine on topic. i trying create form gives 9 options, each option 2 choices, give total of 18 possibilities. final 9 options, submit, via post method, php file, use information update sql database. i have got point in code, , have not been able find, or bring elements need make work. <table border="2"> <tr> <td colspan="2" align="center">game 1</td></tr> <form> <tr height="40px"><td><input type="radio" name="game1" value="home"/> home </td><td><input type="radio" name="game1" value="away" /> away</td></tr></form> <tr> <td colspan="2" align="center">game 2</td></tr> <form><tr height="40px"><td><input type="radio" name="game2" value=

arrays - HTTP GET requests data endlessly -

i can't figure out why code requests data endlessly. in service data array of objects. want http, map, subscribe in service, because need service contain local array, because need array in rest of webpage. using developer tool in browser method gets requested endlessly, until browser crashes. worth noticing incoming data not "file.json", plain url. in backend use jackson objectmapper sending data array objects. btw, when modify code service sending http.get('someurl') , doing map , subscribe in component, works fine. use delete data-methods, didn't work when modified mapping , subscription in component. hope can see obvious errors! the codes loop endlessly: myservice: export class myservice { private dummys: array<dummy>; constructor(private http: http) { this.dummys = new array<dummy>(); } getdata() { this.http.get('someurl') .map((res: response) => res.json()) .s

javascript - How to display image from drop down using linked values with JQuery -

i want display correct image upon selecting option in drop down. able display image if option value same displaying value; however, i'm not sure how display using echo rather value. example, if option value 1 , filename image.jpeg , image source uploads/1 , rather uploads/image.jpeg . <select class = "form-control" id="changeimage" onchange="changeimage" name="changeimage"> <option disabled selected value> -- select image -- </option> <?php foreach($images $imagedrop){ ?> <option value="<?php echo $imagedrop['id'] ?>"> <?php echo $imagedrop['filename'] ?> </option> <?php } ?> </select> <script> $('#changeimage').change(function(){ $('#image')[0].src= 'uploads/'+this.value; }); </script> you may want $().t

optimization - In JavaScript, how do I ensure floating point numbers stay under 32bits? -

obviously numbers in javascript aren't explicitly typed, represented types interpreter. saw thing google's v8 js engine said it's optimized 32 bit numbers, found odd many js programmers have need doubles floating point. examples think of if i'm dividing 2 integers, in order normalize screen coordinates between 0 , 1, , interpreter truncating result @ 64 bits instead of 32. seems unlikely me, again don't know how else needing such precision specify it. i'm wondering...is there way ensure quotient of 2 (not gigantic) integers under 32 bits in length? i saw thing google's v8 js engine said it's optimized 32 bit numbers this means v8 internally store numbers integers when can deduce stay in respective range. common counters or array indices, example. is there way ensure quotient of 2 (not gigantic) integers under 32 bits in length? no - arithmetic operations carried out if 64 bit floating point numbers (like numbers in js). thing c

Calling function from another javascript in html -

i have html input button calling function <button class="go" onclick="go();" disabled><div class="inner first">nah...not yet</div></button> but script created in javascript code name "test.js" function go() { window.location.href = 'https://google.com'; } how should input scriptype input button in order call function? you should add tag in html, , fine <script type="text/javascript" src="test.js">

javascript - Error with polymer build -

i triying learn how use new app-toolbox. in local, works fine; when use: polymer build i these errors: c:\users\marcos\documents\poly2>polymer build info: building application... info: generating build/unbundled... info: generating build/bundled... error: uncaught exception: error: file path not in root: c:/users/marcos/documents/poly2/index.html (c:\users\marcos\documents\poly2) error: error: file path not in root: c:/users/marcos/documents/poly2/index.html (c:\users\marcos\documents\poly2) @ streamanalyzer.urlfrompath (c:\users\marcos\appdata\roaming\npm\node_modules\polymer-cli\lib\build\analyzer.js:91:19) @ streamanalyzer.addfile (c:\users\marcos\appdata\roaming\npm\node_modules\polymer-cli\lib\build\analyzer.js:81:29) @ streamanalyzer._transform (c:\users\marcos\appdata\roaming\npm\node_modules\polymer-cli\lib\build\analyzer.js:48:14) @ streamanalyzer.transform._read (_stream_transform.js:167:10) @ streamanalyzer

c# - Find byte sequence within a byte array -

i have byte array , wish find "occurrences" of bytes. for example 00 69 73 6f 6d in large byte array (> 50/100 megabytes) or even better reverse operation: searching common pattern without knowing code should able read , find file. you can use boyer-moore algorithm efficiently search sequence of bytes in array of bytes. here's c# version converted java version the wikipedia entry on boyer-moore . public sealed class boyermoore { readonly byte[] needle; readonly int[] chartable; readonly int[] offsettable; public boyermoore(byte[] needle) { this.needle = needle; this.chartable = makebytetable(needle); this.offsettable = makeoffsettable(needle); } public ienumerable<int> search(byte[] haystack) { if (needle.length == 0) yield break; (int = needle.length - 1; < haystack.length;) { int j; (j = needle.length - 1; needle[j]

blob - MySQL bitwise AND 256-bit binary values -

i'm intending on storing 256-bit long binary value in mysql table column. which column type should using (blob?) such can run bitwise operations against (example of , ideal). i don't think find way perform bit-wise operation on 256-bit values @ sql level doc state that: mysql uses bigint (64-bit) arithmetic bit operations, these operators have maximum range of 64 bits. http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html#operator_bitwise-and as storing values, tinyblob possible, personal preference go binary(32) (a binary string of 32 bytes -- 256-bits). while writing this, 1 trick came mind. if limited 64-bit values ( bigint unsigned ), why not store 256-bit 4 words of 64-bits. not elegant work. here since need bitwise operations: abcd 32 & wxyz 32 == a 8 & w 8 , b 8 & x 8 , c 8 & y 8 , d 8 & z 8 very basically: create table t (a bigint unsigned, b bigint unsigned, c b

java - MySQL Return Predefined Column Value as Int -

i've got mysql query predefines column in query meant integer type: select id, 1 item_id table other_id = 1; when retrieve statement in java classcastexception: java.lang.float cannot cast java.lang.integer i've tried casting value integer using unsigned type: select id, cast(1 unsigned) item_id table other_id = 1; but gives me same type of error: java.math.biginteger cannot cast java.lang.integer i'm not sure if need fix in java or in actual sql statement, i'd value integer. the place in java can imagine in causing problem bringing value in object because i'm storing record hashmap , don't know exact column type. unfortunately can't change this. resultsetmetadata metadata = resultset.getmetadata(); int columncount = metadata.getcolumncount(); while(resultset.next()) { hashmap<string, object> row = new hashmap<string, object>(); for(int i=1; i<=columncount; i++) { row.put(metadata.getcolumnname(i), resul

MySql Replace and Regex -

i trying remove trailing letters building addresses e.g. 111a . i can find patterns with: select address table address regexp '^[0-9]{1,6}[a-z] ' however unsure how or if can include regexp inside replace don't have 10*26 different replaces e.g. update table set address=replace(address,'0a','0') address '%0a %' vs sort of (which i've tried): update table set address=replace(address,regexp ([0-9]{1,6})[a-z],\1) address regexp '^[0-9]{1,6}[a-z] ' can include regexp inside replace? no, not in mysql. sigh. missing feature. there's extension this, install need able control mysql server. here: https://github.com/mysqludf/lib_mysqludf_preg#readme

java - Google App Engine cron job sometimes fails due to too many retries -

i have google app engine cron job often, not always, fails because max retries java servlet has been reached. google app engine app works fine otherwise. my servlet shown below, , reaches "too many retries" point, not always. it scheduled run every few hours, , seems may failing due waiting instance of app startup, don't know sure. how can fix this? increase number of retries? how can debug know causing "too many retries" reached? public class someservlet extends baseservlet { private static final string header_queue_count = "x-appengine-taskretrycount"; ... @override protected void dopost(httpservletrequest req, httpservletresponse resp) throws ioexception { string retrycountheader = req.getheader(header_queue_count); if (retrycountheader != null) { int retrycount = integer.parseint(retrycountheader);

wpf - What is the most efficient way to extract information from a text file formatted like this -

consider text file stored in online location looks this: ;aiu; [myeditor45] name = myeditor 4.5 url = http://www.myeditor.com/download/myeditor.msi size = 3023788 description = latest version of myeditor feature = support other file types feature1 = support different encodings bugfix = fix bug file open bugfix1 = fix crash when opening large files bugfix2 = fix bug search in file feature filepath = %programfiles%\myeditor\myeditor.exe version = 4.5 which details information possible update application user download. want load stream reader, parse , build list of features, bugfixes etc display end user in wpf list box. i have following piece of code gets text file (first extracting location local ini file , loads streamreader. @ least works although know there no error checking @ present, want establish efficient way parse first. 1 of these files unlikely ever exceed more 250 - 400 lines of text. dim updateurl string = geturl() dim client new webclient() using

database - Java Servlet - Showing Column Names -

Image
this question has answer here: how map resultset unknown amount of columns list , display in html table? 2 answers i've been working on java servlet selects data table input user in index.html. i've encountered problem, because have db numerous different ids , show column names in table - right shows data without column names , i've been seemingly unable find solution or come 1 on own start.java: package start; import java.io.ioexception; import java.io.printwriter; import java.sql.connection; import java.sql.drivermanager; import java.sql.resultset; import java.sql.resultsetmetadata; import java.sql.statement; import java.sql.sqlexception; import javax.servlet.servletexception; import javax.servlet.annotation.webservlet; import javax.servlet.http.httpservlet; import javax.servlet.http.httpservletrequest; import javax.servlet.http.httpservletresponse;

nativescript Starting iOS Simulator Cannot read property 'state' of undefined -

i'm trying follow nativescript setup on os x: http://docs.nativescript.org/angular/tutorial/ng-chapter tns doctor tells me: no issues detected. but when run tns run ios --emulator after build error: starting ios simulator cannot read property 'state' of undefined what setup missing? i had same problem, opened in xcode , realised didn't have simulators installed. try either or both of these see if can build in xcode: open platforms/ios/*.xcworkspace/ open platforms/ios/*.xcodeproj/ ... , if problem same mine, fix in xcode this... xcode menu -> preferences -> downloads tab -> download newest ios simulator for me worked downloading ios 9.1.

linux - How can I obtain a newer GCC? I don't have root, and can't compile it (memory error) -

i have shared account on machine running older version of gcc. not have root. when try compile gcc, build process gets killed due memory usage following command: build/genattrtab ../../../work/gcc-6.1.0/gcc/common.md ../../../work/gcc-6.1.0/gcc/config/i386/i386.md insn-conditions.md \ -atmp-attrtab.c -dtmp-dfatab.c -ltmp-latencytab.c i'd able compile software on machine requires newer gcc. suggestions appreciated. you can manually unpack 1 of gcc packages major distribution, try use package closely matches distribution. these installable packages tar files meta data , install script. can unpack them , extract binaries you'll need. keep in mind might need more gcc package. distributions chop devtools tons of small packages ( gcc, g++, binutils, gdb) another source use pre-build gcc toolchain used embedded vendors, these vendors include host version of gcc cross-compiler. example android ndk 1 of such distributions. finally, can compile gcc on machi

javascript - How to achieve a zooming effect on a carousel background using CSS3 and JQuery -

i want add background zooming out effect same in this website carousel.. cannot figure out solution new web-designing. this code div want apply effect: markup: <div class="banner"> <div class="content block1 animated"> <h1>ceramic directory</h1> <span>world's largest ceramic hub, ceramic traders reside here!</span> <a href="#">register now</a> <span class="handler">&rarr;</span> </div> </div> css: .banner{ margin-bottom: 10px; background-image: url("../images/png.jpg"); background-repeat: no-repeat; height: 700px; background-size: cover; width: 100%; } .banner .block1{ background-color: rgba(256,256,256,0.7); margin-top: 10%; height: 300px; position: absolute; width: 90%; padding-top: 7%; animation-name: fadein; -webkit-anim

c# - Asynchronous MVC controller and HttpTaskAsyncHandler -

i'm trying implemented custom httptaskasynchandler custom content management solution. idea route /100/my-little-pony /details/my-little-pony . hope achieve following httptaskasynchandler : public override async task processrequestasync(httpcontext context) { try { var id = getcontentidfromroutedata(); // retrieve content identified specified id var contentrepository = new contentrepository(); var content = await contentrepository.getasync(id); if (content == null) throw new contentnotfoundexception(id); // initialize instance of content controller var factory = controllerbuilder.current.getcontrollerfactory(); var controller = (icontentcontroller) factory.createcontroller(_requestcontext, content.controllername); if (controller == null) throw new controllernotfoundexception(content.controllername); try { // retrieve content type values , p

database - Finding union or intersection of buckets using elasticsearch aggregations -

i have nested aggregations , want find union or intersections of 2nd aggregations buckets based on conditions on 1st aggregation bucket results.for eg aggregation. "aggs": { "events": { "terms": { "field": "event_name" }, "aggs":{ "devices":{ "terms":{ "field": "device-id" } } } } } and result of aggregation "aggregations": { "events": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "conversion_checkout", "doc_count": 214, "devices": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 6, "buck

php - Searching multidimensional array and returning key -

i trying see if value exists in array, , if so, return key: $letter = 'b'; $array[0]['id'] = 1; $array[0]['find'] = 'a'; $array[1]['id'] = 2; $array[1]['find'] = 'b'; $found = array_search($letter, $array); if ($found) { unset($array[$found]); } from can tell, not dropping array elements when value found. suggestions? if you're looking in specific column: $found = array_search($letter, array_column($array, 'find')); unset($array[$found]); this multidimensional array extract find column , search you need loop , unset() if find not unique or alternately: $array = array_column($array, null, 'find'); unset($array[$letter]); extract columns index them find can unset() that

grails - functions in coffee-file are not available from other js -

i try use coffeescript in grails-project. achive decided use coffeescript-resources plugin. compiled coffee in result view looks follows: (function() { var somefunc; somefunc = function() { return alert("hello"); }; }).call(this); and in case cant call it. have not found proper configurations in plugin documentation avoid using anonymous functions while compiling coffee-file. how can solve this? from fine manual : lexical scoping , variable safety [...] although suppressed within documentation clarity, coffeescript output wrapped in anonymous function: (function(){ ... })(); safety wrapper, combined automatic generation of var keyword, make exceedingly difficult pollute global namespace accident. if you'd create top-level variables other scripts use, attach them properties on window , or on exports object in commonjs. existential operator (covered below), gives reliable way figure out add them; if you're targe

Unexpected value change in 2D array in JavaScript -

i'm trying modify 1 value in 2d array. i'm finding weird behavior based on how array constructed. the difference between matrix , matrix2 how they're constructed. when change [1][1] value, of [x][1] values in matrix2 changed: matrix: [ [ 0, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 0 ] ] matrix2 (unexpected): [ [ 0, 1, 0 ], [ 0, 1, 0 ], [ 0, 1, 0 ] ] code: var row = [0,0,0]; var matrix = [[0,0,0],[0,0,0],[0,0,0]]; var matrix2 = [row, row, row]; console.log(matrix); console.log(matrix2); matrix[1][1] = 1; matrix2[1][1] = 1; console.log(matrix); console.log(matrix2); can explain what's going on? [row, row, row] you made array 3 references the same inner array. changes inner array can seen through reference it. you want create 3 copies of inner array. can create shallow copy of array calling .slice() .

c# - Facebook login returns Failure in ASP.NET MVC -

Image
i trying implement facebook login in asp.net mvc app. everytime tries run signinmanager.externalsigninasync(logininfo, ispersistent: false) , returns failure here's code- startup.auth.cs app.usefacebookauthentication( appid: social_networkbll.facebook_appid, appsecret: social_networkbll.facebook_secretid ); accountcontroller [httppost] [allowanonymous] [validateantiforgerytoken] public actionresult externallogin(string provider, string returnurl) { // request redirect external login provider return new challengeresult(provider, url.action("externallogincallback", "account", new { returnurl = returnurl })); } [allowanonymous] public async task<actionresult> externallogincallback(string returnurl) { var logininfo = await authenticationmanager.getexternallogininfoasync(); if (logininfo == null) { return redirecttoaction("login"); } // sign in user external login provider if user has login

spring - How to send information from a server to Android -

i've got server. how can send information server android app? 1 of controller methods: @requestmapping("/city/{cityid}") public modelandview showcity(@pathvariable("cityid") int cityid){ modelandview mav=new modelandview("city/citydetails"); mav.addobject(this.whatsnewservice.findcitybyid(cityid)); return mav; } i case can not pass modelandview (actually can). best option use rest. can make method rest api method. , pass jason object. in general, web applications expose service through rest api used third part applications or power mobile applications @restcontroller public class citycontroller { @autowire private whatsnewservice whatsnewservice; @requestmapping(method = requestmethod.get, value = "/city/{cityid}") public city showcity(@pathvariable("cityid") int cityid){ return this.whatsnewservice.findcitybyid(cityid); } } or can use same @controller class , @controller pu

php - Woocommerce add_filter only works when logged in -

i use filter provided woocommerce composite products plugin update quantities of products in set. when logged in filter works intended, when not logged in quantities not updated. i use following code: add_filter( 'woocommerce_composited_product_quantity', 'update_quantity', 10, 6); function update_quantity($qty_value, $min_quantity, $max_quantity, $product, $component_id, $composite_product) { $category = $_post['soort']; $retrieve_data = wc()->session->get( 'quantities' ); $postname = $product->post->post_name; if($postname == 'product-basis') { return 1; } else if (strpos($postname, 'product-')) { return 1; } else { $value = is_numeric($retrieve_data[$category][$postname]) && $retrieve_data[$category][$postname] > 0 ? $retrieve_data[$category][$postname] : 1; return (int)$value; } } the values of $soort_verwarming , $retrieve_data available,

html - Display cannot be overriden -

i have parts of page, doesnt want display, when device display smaller 600px. have css this: @media screen , (max-width: 600px) { .smallscreenhidden {dispay:none} } then have 1 <article> , has class, says display block. problem cant override it, displays. doesn't matter in order write classes, doesn't work. if novice css user of are, you'd do: display: block !important; however, if expert user , understand importance of css specificity, you'd try see why adding number of classes doesn't override display property of <article> now since haven't seen code , hence, cannot give css specificity solution, recommend check out article on css specificity smashing magazine

android - Custom fonts (*.ttf) -

Image
i have included ttf file in android assets folder. using day poster ttf. problem custom font not being supported in phones i.e.: appears different in phones. the same issue bebas.ttf . please tell me how can sort out appears same in mobile phones. output in micromax(see text peto) output in samsung(see text peto) try this, add paint flags setpaintflags(getpaintflags() | paint.subpixel_text_flag);

asp.net - getTimezoneOffset does not work all the time -

i register following javascript on web page. when user posts back, txttimezoneoffset hidden field comes blank. when test on computer, value. happens on different browsers (i.e, firefox, , safari). i trying users offset, when enter date, can convert utc on server , deal in same timezone, when render dates out them, make sure in timezone. <script type='text/javascript'> $(window).load(function () { var d = new date(); var tz = d.gettimezoneoffset(); $('#txttimezoneoffset').val(tz / 60); }); </script> does see why not work 100% of time? the jquery looks fine me, don't see why wouldn't work unless javascript disabled or didn't load jquery. however, worked on flawed assumption user's current offset same dates. in time zone has daylight saving time, wrong. the better approach convert utc on browser . or @ least use date/time in question in call gettimezoneoffset. upda

nginx - Docker letsencrypt does not appear to be creating webroot files -

i have nginx service running following configuration location /.well-known { root /tmp/letsencrypt/; } i execute following docker command sudo docker run -it --rm --name certbot \ -v /etc/letsencrypt \ -v /var/lib/letsencrypt \ -v /tmp/letsencrypt \ quay.io/letsencrypt/letsencrypt:latest certonly \ --webroot --webroot-path /tmp/letsencrypt \ -d dev.blockloop.io --renew-by-default i following output letsencrypt type: unauthorized detail: invalid response http://dev.blockloop.io/.well-known/acme-challenge/wupz1yyldrv8djryegofxfz24rjcwrrenqxboyndo30: "<html> <head><title>404 not found</title></head> <body bgcolor="white"> <center><h1>404 not found</h1></center> <hr><center>" and nginx logs this nginx_1 | 2016/05/28 20:10:44 [error] 6#6: *1 open() "/tmp/letsencrypt/.well-known/acme-challenge/wupz1yyldrv8djryegofxfz24rj

Compare elements of two lists in java -

i have 2 lists information stored. elements of first list extracted db (they ingredients of recipes), in second list favourite ingredients stored. want compare both lists , when ingredients match want add 1 sum. problem when parse first list ingredients compared second list, in first list have elements not made 1 string( 1 element has 2-3 words), , when compare lists, compared last elements, aren't compared components of elements. first list : [200 grame fusilli cu legume (spanac si mere); 200 grame smantana 12%; 50 grame iaurt; 50 grame cascaval afumat; 1/2 lingurite mustar; doi catei de usturoi sau o lingurita de usturoi deshidratat; o lingur? ulei de masline; mere] second list: [afine, almette, alune, alune, albus de ou de gaina, alune, andive, mere] and result [0, 0, 0, 0, 0, 0, 0, 0, 0] we can saw word "mere" met twice in first list once in second list,but result 0. how can resolve problem? here java code: rs=ps.executequery();

Trying to set the background of android actionbar version 2.1 or so (API 7) and up -

alright i've followed android tutorial try , style action bar , doesn't seem work themes.xml <resources> <!-- theme applied application or activity --> <style name="customactionbartheme" parent="@style/theme.appcompat.light.darkactionbar"> <!-- support library compatibility --> <item name="actionbarstyle">@style/myactionbar</item> </style> <!-- actionbar styles --> <style name="myactionbar" parent="@style/widget.appcompat.light.actionbar.solid.inverse"> <!-- support library compatibility --> <item name="background">@drawable/actionbar_background</item> </style> </resources> manifest.xml <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name

.net - Write Azure stream analytics output to Azure Tables -

i want write stream analytics output azure tabale. wrote below query it: select * azuretable datasource; but cannot see data in table. pointers? i figured out. problem in values of partition key , row keys values. these values should exists in data model, in case should part of input of stream analytics. example, if put row key = time , partition key = recordid time , recordid should valid properties present in input data model.

java - What is the difference between the terms non-primitive type and object type? -

when read java, see variables described either primitive type or object type . when read c#, see variables described either primitive type or non-primitive type ? what difference between terms object type , non-primitive type ? part of confusion may in that, in c#, (mostly) inherits object . refer object type in same way, refer every type in language, , useless. in c#, primitive types boolean, byte, char, double, int16, int32, int64, intptr, sbyte, single, uint16, uint32, uint64, uintptr. these types still inherit object, though treated differently language. there few types don't inherit object, not consider primitives (ie interfaces). list of c# primitives can acquired code, taken here : var primitives = typeof(int).assembly.gettypes().where(type => type.isprimitive).toarray(); a more appropriate dichotomy, if wanted such thing, value types versus reference types. when begin considering difference, can include things such enum types, , other values ty

Set php second configuration ( php.ini file ) -

i want set own (php2.ini) file, few lines must overwrite first php.ini settings - lines. so start looking on google , seems need parse_ini_file function. ok. now, in index.php have: parse_ini_file("php2.ini"); phpinfo(); exit(); but settings php2.ini not loaded.... trying see if file php2.ini read-it , is, beacause if set parse_ini_file("php2-not-exist.ini") tells me file cannot found. file php2.ini read, settings not overwrited. the php2.ini file has inside next lines: error_log = "errors.log" display_errors = "0" max_execution_time = "300" upload_max_filesize = "60m" post_max_size = "60m" date.timezone = "europe/bucharest" default_charset = "utf-8" mbstring.internal_encoding = "utf-8" mbstring.http_output = "utf-8" mbstring.encoding_translation = "on" mbstring.func_overload = "6" trying let file 1 line post_max_size = "60m", s