Posts

Showing posts from August, 2010

python 3.x - Why don't two sequential coroutines (async functions) execute in parallel? -

so, i'm trying wrap head around async programming (in particular tornado framework), , thought i'd start basics: calling "awaiting" on 2 coroutines: from tornado.ioloop import ioloop tornado.web import application, url, requesthandler tornado.gen import sleep class testhandler(requesthandler): async def get(self): f1 = await self.test("f1") f2 = await self.test("f2") self.write(f1 + " " + f2) async def test(self, msg): in range(5): print(i) await sleep(1) # tornado's async sleep return msg app = application([url(r'/', testhandler)], debug=true) app.listen(8080) ioloop = ioloop.current() ioloop.start() the issue, however, when hit localhost:8080 in browser, , stare @ python console, don't see 2 interwoven sequences of 0 1 2 3 4 , 2 sequential sequences... i've read tornado faq over-and-over again , can't seem understand i'

html - CSS not loading on mobile? -

so website looks fine on devices (even friends mobiles) css not load on iphone. can view contents of css file not being applied. help? site : ( http://www.jacksewell.uk/ ) my host said can't anything. head content: <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>jack sewell - home</title> <meta name="description" content="jack sewell - freelance web developer & designer"> <meta name="author" content="jack sewell"> <meta name="msapplication-tilecolor" content="#ffffff"> <meta name="msapplication-tileimage" content="assets/favicon-144.png"> <meta name="application-name" content="name"> <meta name="msapplication-tooltip" content="tooltip"> <meta name="msa

html - Banner height not the device height only on iPad -

http://darrenbachan.com/playground/diamond-hand-car-wash/index.html i've tested site on desktop chrome, android, samsung tablet, iphone 6, , ipad. banner doesn't work on ios, ipad. height becomes massive , doesn't match height of device. i'm not sure in code it's incorrect, on devices i'd banner height of window, hope used term right. the code banner grabbed article responsive height/width video header here's code have: #banner.container-fluid { padding: 0; position: relative; } #banner.overlay:after { position: absolute; content:" "; top:0; left:0; width:100%; height:100%; display: block; z-index:0; background-color: rgba(0,0,0,0.8); } header { position: relative; overflow: hidden; width:100vw; height:100vh; max-height:100vh; text-align:center; } .banner-text { position: relative; top: 55%; -webkit-transform: translatey(-50%); -ms-transform: translate

Passing Parameters JavaFX FXML -

how can pass parameters secondary window in javafx? there way communicate corresponding controller? for example: user chooses customer tableview , new window opened, showing customer's info. stage newstage = new stage(); try { anchorpane page = (anchorpane) fxmlloader.load(hectorgestion.class.getresource(fxmlresource)); scene scene = new scene(page); newstage.setscene(scene); newstage.settitle(windowtitle); newstage.setresizable(isresizable); if(showrightaway) { newstage.show(); } } newstage new window. problem is, can't find way tell controller customer's info (by passing id parameter). any ideas? recommended approach this answer enumerates different mechanisms passing parameters fxml controllers. for small applications highly recommend passing parameters directly caller controller - it's simple, straightforward , requires no frameworks. for larger, more complicated applications, worthwhile investi

php - Squid Proxy Returns Different Error Messages For HTTP vs. HTTPS -

i'm using php 5.3.13 curl extension 7.25.0 on windows 7 pro 64-bit laptop. connecting upstream squid v3.3.10 proxy server using php , curl. authenticating proxy using basic authentication. the problem i'm experiencing different error messages php curl_error($ch) function when try connect http url vs. http s url via proxy . when purposely send bad authentication credentials proxy using http url, error message receive php curl_error($ch) function is: the requested url returned error: 407 when sent same request using bad credentials http s url receive following message php curl_error($ch) function: http response code said error the http url response expect, meaning returns http error code (407 because of bad credentials). http s url error message doesn't return http code @ all. i'm trying understand why happens can account these different responses in error handler project. have experience issue? squid proxy https authentication configuration issue?

html - Is it possible to hard code the contents of an iframe? -

a script, example, can either linked: <script src="myscript.js"></script> or embedded: <script type="text/javascript"> //myscript </script> is there way iframes? manually embed webpage within webpage before reaching client's browser? to same effect, possible embed decoded base64 of image between img tags? you're looking srcdoc attribute. it's got pretty support, no ie/edge yet. http://caniuse.com/#feat=iframe-srcdoc

android - How can I fix this misbehavior of SwipeRefreshLayout -

Image
i'm trying implement pull down refresh , using swiperefreshlayout. it's malfunctioning. when pull down, swiperefreshlayout pulls down should remove hand, jumps top of first item in recyclerview. halve of loader hides behind toolbar , other half visible on top first item in recyclerview. if pull down again, doesn't work. my layouts activity_main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.drawerlayout android:id="@+id/drawer_layout" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true" tools:opendrawer="start"> <include layout="@layout/app_bar_main" andro

sql - The INSERT statement conflicted with the FOREIGN KEY constraint (Cursor) -

my task duplicate company information using stored procedure. have use cursor complete task order tech lead. got error whenever run sp. other tables such person, address have mentioned in previous questions solved, what's left phone & phone link table giving me headache. p/s: entityid = 5 (company) below code: set ansi_nulls on go set quoted_identifier on go alter procedure [dbo].[duplicatecompanyinfo] @comp_companyid nvarchar(80) begin set nocount on; declare @companyid nvarchar(30), @personid nvarchar(30), @addressid nvarchar(30), @phonelinkid nvarchar(30), @phoneid nvarchar(30) exec @companyid = crm_next_id 5 exec @personid = crm_next_id 13 exec @addressid = crm_next_id 1 -- add company insert company ( comp_companyid, comp_primarypersonid, comp_primaryaddressid, comp_name, comp_type, comp_status, comp_createdby, comp_createddate, c

python 2.7 - Finding the two closest numbers in a list using sorting -

if given list of integers/floats, how find 2 closest numbers using sorting? such method want: >>> def mindistance(lst): lst = sorted(lst) index = -1 distance = max(lst) - min(lst) in range(len(lst)-1): if lst[i+1] - lst[i] < distance: distance = lst[i+1] - lst[i] index = in range(len(lst)-1): if lst[i+1] - lst[i] == distance: print lst[i],lst[i+1] in first for loop find out minimum distance, , in second loop, print pairs distance. works below: >>> lst = (1,2,3,6,12,9,1.4,145,12,83,53,12,3.4,2,7.5) >>> mindistance(lst) 2 2 12 12 12 12 >>>

javascript - MMO WebSocket Server: Node.js or C++? -

i have been thinking of making real-time game websockets web. know how use node.js, , tempting make on there. everywhere look, c++ seems popular server language because of speed. should give making in node.js go, , worry c++ later, or should learn c++ , make in there scratch? if decide go c++ route (and offer best performance of language), there's great open source websocket library heavy lifting you. header-only , uses boost. comes example code , documentation: http://vinniefalco.github.io/ here's complete program sends message echo server: #include <beast/websocket.hpp> #include <beast/buffers_debug.hpp> #include <boost/asio.hpp> #include <iostream> #include <string> int main() { // normal boost::asio setup std::string const host = "echo.websocket.org"; boost::asio::io_service ios; boost::asio::ip::tcp::resolver r(ios); boost::asio::ip::tcp::socket sock(ios); boost::asio::connect(sock,

All the stored procedures in SQL Server are stored in which database? -

can please tell me know stored procedures in sql server stored in database? have confusion between master db or model db? stored procedures stored in database in created. stored procedures stored in master ones shipped sql server, master database used sql server engine. the model database template other databases. when create new database new copy of model database created. if have tables or stored procedures wish have in newly created databases can add them model database.

How to interact with 2 databases in C using MySQL? -

i working on project have count runners. @ point, have transfer data local database (mysqllocal) 1 of high school i'm working in (mysqllycee). i think doing idea, reason have segfault when executing program. #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netdb.h> #include <netinet/in.h> #include <unistd.h> #include <string.h> #include <mysql.h> int main(int argc, char *argv[]){ mysql mysqllocal; mysql_res *result = null; mysql_row row; char requete[150]; int num_champs; char noparticipant[5]; char kmparcourus[3]; mysql_init(&mysqllocal); if(!mysql_real_connect(&mysqllocal,"127.0.0.1","root","debianccf","localccf",0,null,0))printf("error on first connect"); sprintf(requete,"select no_participant, kmparcourus participants no_course = %s",argv[5]); if(!mysql_quer

vba - I'd like to run a loop, but change 2 variables each instance -

i trying edit vba code. customized needs, repeating same process on 20 times, , have entered code 20 times , changed variables. i have 100 instances, , don't want manually this. how can edit code runs 100 times while changing variables? as see, have included same code twice slight changes. need change ticker , range each iteration, , also, destination range need move 1 column on each time. by way, pulling yahoo finance stock info. sub data_get() ' ' data_get macro ' dim ticker1, ticker2, ticker3 string, sday, smonth, syear, eday, emonth, eyear long ticker1 = range("l1") ticker2 = range("l2") ticker3 = range("l3") sday = day(range("l4")) smonth = month(range("l4")) - 1 syear = year(range("l4")) eday = day(range("l5")) emonth = month(range("l5")) - 1 eyear = year(range("l5")) ' activesheet.querytables.add(connection:= _ "text;http://real-chart.finance.

shell - To pick certain entries from a file in unix -

i have text file 4 entries. when run shell script first time, first entry should picked . when run 2nd time, 2nd entry should picked , when run script 5th time again 1st entry should picked up. basically should pick entries in text file 1 one , when reaches last , again should start first. i thought of keeping 1 more file , current running entry , when runs next time check file , process next line. cannot keep files. logic should handled inside script without keeping other files. i hope explained problem.. please me logic in unix .. you can use trap in brute force call sed update index within file on termination or exit. example: #!/bin/bash declare -i current_idx=0 trap 'sed -i "s/^declare[ ]-i[ ]current_idx[=].*$/declare -i \ current_idx=$(((current_idx+1) % 4))/" $(readlink -f "$0")' sigterm exit case "$current_idx" in 0 ) printf "picked %d entry\n" "$current_idx";; 1 ) printf "picked %d

cypher - Cannot successfully import csv to neo4j -

i trying import csv file neo4j database using following query: using periodic commit load csv headers "file:///i:/traces.csv" row merge (e:event {systemcall: coalesce(row.syscall, "no value"), returnvalue: coalesce(row.retvalue,"no value"), returntime: coalesce(row.rettime,"no value"), calltime: coalesce(row.calltime,"no value")}) merge (s:subject {processname: coalesce(row.processname, "no value"), pid: coalesce(row.pid, "no value"), tid: coalesce(row.tid, "no value")}) merge (o:object {argument1: coalesce(row.arg1, "no value"), argument2: coalesce(row.arg2, "no value")}) merge (e)-[:is_generated_by]->(s) merge (e)-[:affects]->(o) merge (e)-[:affects] ->(s) the csv file hosted @ location: https://drive.google.com/open?id=0b8vcvm9jictzrktrtgpxouzxqja the query takes 80k milliseconds run returns no row. please help. there 2 problems. you must not have su

Regex MySQL, Find string with at least 2 letters and 2 numbers -

i'm using regular expression regexp '^([a-z]){2,}([0-9]){2,}$' find strings more 2 letters , more 2 numbers in combination regexp '^([0-9]){2,}([a-z]){2,}$' . covers strings starting numbers or ending numbers. i need 1 regex find numbers in between letters also. mysql version 5.1.73 assuming want test column val try following: ... (val regexp '^[0-9a-z]*$') +(val regexp '[a-z].*[a-z]') +(val regexp '[0-9].*[0-9]')=3 this combination test val made of only numbers , characters (first regexp), contain at least 2 letters' (second regexp) , at least 2 numbers (third regexp).

rest - Is there any way to hide xmlhttprequest log from chrome console -

Image
in project i'm sending request server , found each request displaying in xmlhttprequest log (attached screenshot) , when open browser show data. i'm going create api key method rest api, while take time want hide logs console. question how hide such types of log chrome console. from point of view not possible hide request sending ajax, , thing is not compulsory use chrome browser use, user can use different browser, showing console log in-build functionality, normal user not see console log. if worried developers there many plugin(like firebug) can use monitor request/response flow. if find way hide them it's not 100% solution. my advice use server side method call api if possible. or second thing can call console.clear(); function after calling ajax function(possible after success/fail).

python - if-else comprehension with dictionary not working in python3 -

dlist=['all loving','all bros','and sis'] i create dictionary such words (as keys) assigned value index of dlist in words appear. example, 'all':{0,1}, 'my':{0,1},'sis'={2} etc. somehow not work: dict={} {w:{num} if w not in dict.keys() else dict[w].add(num) (num,strn) in enumerate(dlist) w in strn.split()} this returns {'all':{2}, 'my':{2}} looks else statement being ignored. pointers? thanks this doesn't work because trying access dict.keys while creating dict in dict comprehension. if in loop, dict.keys updated each element, dict comprehensions ensures dict not updated mid-creation improve speed. something should work: mydict = {} (num, strn) in enumerate(dlist): w in strn.split(): if w not in mydict: mydict[w] = {num} else: mydict[w].add(num)

c++ - Executable wont' run after moving to a different folder -

i had existing c++ program compiled in ubuntu 14.04 using g++-4.8 . run program on terminal passing file, prints processed data in console: #./my_program.cpp.exe < data.in employee id 1 marital status s grosspay 100 tax amount 5 netpay 95 this program stored in ~/documents/module2 . created new directory ~/documents/module3 , copied both files, my_program.cpp.exe , data.in , folder , when run it, doesn't print output console. #./my_program.cpp.exe < data.in # i'm not sure if c++ issue or linux/ubuntu issue i'm asking here. feel either or them. when list files show: #ls -rw-r--r-- 1 user user -rwxr-xr-x 1 user user my_program ... plus other files (11 total) but when list folders come as: drwxr-xr-x 2 user user module3 drwxrwxr-x 3 user user module2 which i'm not sure if 2 after permissions makes sense. to info file i'm using: ifstream fin( "employee.txt"

javascript - Dropdowns in AngularJS -

i have angularjs interdependable dropdowns, here demo plunker : http://plnkr.co/edit/mifckko5azr4ljyoge5r?p=preview . when select option first(country) dropdown, want second (state)dropdown displayed checkbox dropdown , not normal dropdown(like in above plunker) , after selecting option second multiple dropdown should multiple dropdown again. here sample checkbox dropdown, fiddle : https://jsfiddle.net/michaeldeongreen/22et6sao/9/ need displayd both state , city dropdowns in plunker. finally when select country first normal dropdown, second multiple dropdown menu checkbox selecting state should enabled , after selecting state, checkbox dropdown menu selecting city have enabled. until select option first dropdown, second , third dropdowns have disabled , till select option second dropdown third dropdown has disabled. hope me. in advance!!

java - How to get rid of null elements from inner arrayList in 2 dimensional arrayList -

i have following of type arraylist<list<string>> array_acidexp[[statistics (ph), upright, recumbent, total], [upright, normal, recumbent, normal, total, normal], [clearance ph : channel 7], [minimum, 4.69, , 2.42], [maximum, 7.88, , 7.51, , 7.88], [mean, 6.33, , 6.41, , 6.37], [median, 6.62, , 6.40, , 6.49]] i have tried following without luck: (int = 0; < arr_acidexp_pattern_table2d.size(); i++) { arr_acidexp_pattern_table2d.removeall(collections.singleton(null)); arr_acidexp_pattern_table2d.get(i).removeall(collections.singleton(" ")); } what should rid of empty elements? this remove internal nulls (list<string> internal : array_acidexp) { if (internal != null) { (int = 0; < internal.size(); i++) { if (internal.get(i) == null) { internal.remove(i) } } } } did not run ...

java - persist/update collection of data into database using hibernate -

i newbie hibernate framework , curious way persist , update work. currently in project when persist or update collection of data database, doing 1 one via looping method. instance, public persistdata(){ list<person> personlist = new arraylist<>(); for(person person : personlist){ session.persist(person); } } is possible to, example, session.persist(personlist); or there anyway else can persist/update collection of data @ once without looping? editted: have found hibernate batch processing in how insert multiple rows database using hibernate? , best way insert amount of records in hibernate i developing generic class persist/update/delete data hibernate, should provide method with public void (list<t> addeditemlist) or public void (t addeditem) for understanding, bulk persist should done large amount of transactions right? if times there 1 or 2 objects persisted, batch processing still app

C++ cout.endl() clear the buffer, cout.flush() dont -

Image
problem in ide using - clion 1.2.4 gives incorrect output inside own output window, solved. following code gives repeating output when working vectors, bigger ~1000, like: bubblebubble0.265596bubble0.2655960.171889bubble0.2655960.1718890.265644 shell000 if call endl after every output, seems fine: bubble 0 0.015626 0.015628 shell 0 0 0 but when try clear buffer .flush(), i'm getting same repeating output. #include <iostream> #include <vector> #include <chrono> #include <algorithm> using namespace std; vector<int> type_sort(string type, vector<int>input) { int n = input.size(); if (type == "bubble") { for(int = 0; < n; i++) for(int j = 0; j < n - 1; j++) if(input[j] > input[j+1]) { swap(input[j], input[j+1]); } } else if (type == "shell") { int gap, i, j, temp; (gap = n/2; gap > 0;

How to convert image to GIF with only two color index in Imagick -

Image
i want convert image gif format 2 color, black , white so every pixel in output image black or white does know way convert in imagick ? although final conversion write out two-color gif same, there subtly different ways of converting image 2 color black , white. here methods below: helper method force images pixels of values 0,0,0 , 255,255,255 function forceblackandwhite(imagick $imagick, $dithermethod = \imagick::dithermethod_no) { $palette = new imagick(); $palette->newpseudoimage(1, 2, 'gradient:black-white'); $palette->setimageformat('png'); //$palette->writeimage('palette.png'); // make image use these palette colors $imagick->remapimage($palette, $dithermethod); $imagick->setimagedepth(1); } just use remap palette force image 2 colors without dithering. function twocolorpaletteonly() { $imagick = new imagick(__dir__."/../images/biter_500.jpg"); forceblackandwhite($ima

java - AWS S3 using grails -

i trying establish connection aws perofrming basic operations on s3 bucket. following code: def list(){ awscredentials credentials = new basicawscredentials("access key", "secret key"); amazons3 s3client = new amazons3client(credentials); string bucketname = "sample-bucket-from-java-code"; system.out.println("listing buckets : "); (bucket bucket : s3client.listbuckets()) { system.out.println(" - " + bucket.getname()); } } this gives me error: request- received error response: com.amazonaws.services.s3.model.amazons3exception: request signature calculated not match signature provided. check key , signing method. i have double checked access key , secret key using. cannot figure out issue. its use "cognito accountid" rather access , secret key. because using cognito accountid has limited access aws, can changed. // initialize amazon c

apache pig - the number of vowels in a file -

Image
can me this? much. , code: g = load 'input.txt' (line:chararray); b = foreach g generate flatten(strsplit(lower(line), '(?<=.)(?=.)')) s:chararray; c = foreach b generate flatten(tobag(*)) letter; result = filter c ( letter == 'a' or letter == 'e' or letter == 'i' or letter == 'o' or letter == 'u' ); e = group result letter; f = foreach e generate group, count(result) ; dump f; first tokenize line words , characters words.use replace slice characters in words.instead of using tobag(*),use tokenize split characters along replaced delimiter.filter aeiou,then group character , counts. pigscript a = load 'test4.txt' (line:chararray); b = foreach generate flatten(tokenize(line)) words; c = foreach b generate flatten(tokenize(replace(lower(words),'','|'),'|')) letter; d = filter c (letter == 'a' or letter == 'e' or letter == 'i' or letter == 'o' or

Android ViewPager setCurrentItem not loading the requested page -

i trying move specified page in viewpager. my code - if(isfirstcall) { mpageradapter = new screenslidepageradapter(getfragmentmanager(), pageid); mpager.setadapter(mpageradapter); } new handler().post(new runnable() { @override public void run() { mpager.setcurrentitem(currentpageposition); } }); mpager.addonpagechangelistener(new viewpager.simpleonpagechangelistener() { private static final float thresholdoffset = 0.5f; @override public void onpagescrolled(int position, float positionoffset, int positionoffsetpixels) { super.onpagescrolled(position, positionoffset, positionoffsetpixels); if (checkdirection) { mpager.setpagingenabled(false); if (thresholdoffset > positionoffset) { checkdirection = false; // call service next page position } else {

android - Link fragment button to another activity -

below edited code @override public void onclick(view v) { switch (v.getid()){ case r.id.btn_chg_password: showdialog(); break; case r.id.btn_order: changemenu(); break; } } private void changemenu() { sharedpreferences.editor editor = pref.edit(); editor.putboolean(constants.is_logged_in,false); editor.putstring(constants.email,""); editor.putstring(constants.name,""); editor.putstring(constants.unique_id,""); editor.apply(); order(); } private void order(){ fragment login = new loginfragment(); fragmenttransaction ft = getfragmentmanager().begintransaction(); ft.replace(r.id.activity_activityresult1,activityresult1); ft.commit(); i want change link activity_activityresult1 after press btn_order believe cannot link because fragment activity? on clicking btn_order want direct activity_activityresult1 <----- layout below ori

Fetch 'top stories' by facebook api -

it seems facebook api not 'top stories' setting of facebook account top stories. indeed, shows 'recent stories'; want ask there anyway can top stories (in same order see in our news feed) instead of recent stories graph api or fql? thanks, moti

Insert data into mysql table using java applets -

Image
i have been given college assignment insert data mysql table using java applets. when press submit button, command prompt throws lot of exceptions(pic attached) , no data inserted table. following code: //student registration form (using applets , awt controls) import java.awt.*; import java.awt.event.*; import java.applet.*; import java.sql.*; import java.util.*; public class mysql4 extends applet implements actionlistener{ label l1 = new label("roll no. : "); textfield t1 = new textfield("",10); label l2 = new label("name : "); textfield t2 = new textfield("",20); label l3 = new label("gender : "); checkboxgroup radiogroup = new checkboxgroup(); checkbox r1 = new checkbox("male", radiogroup, false); checkbox r2 = new checkbox("female", radiogroup, true); label l4 = new label("hobbies : "); checkbox c1 = new checkbox("sports"); checkbox c2 =

A strange C++ class declaration -

have read thread in stackoverflow: strange class declaration , still confused below code in foo.h : class foo checkleakdcl { i sure foo should class name, since there constructor , deconstructor can imply this. i cannot see macro definition related checkleakdcl in .h file. also confused answer strange class declaration , saying that: q_core_export isn't identifier. it's platform-dependent macro, , it's used signal class that's intended used across library boundaries. can give more explanation of this? update: found line in .h file, included in foo.h : #define checkleakdcl : private checkleak so class declarition should : class foo : private checkleak { so foo extending checkleak , right? if compile windows (using visual studio), highly possible evaluated 1 of microsoft specific linkage identifiers, dllexport or dllimport : https://msdn.microsoft.com/en-us/library/81h27t8c.aspx it used when create class exported d

How can I get the list of files in a folder and all its subfolders using C or C++? -

this question has answer here: read file names directory 8 answers how can list of files in directory using c or c++? 18 answers i want list of files in folder, if there subfolders inside, want list of files within these subfolders, too. i have read question how can list of files in directory using c or c++? didn't me solve problem. all want function this: vector<string> filelist; //return number of files within folder. // @ dir: folder directory // @ list: output list of files // @ filetype: multiple similar types int getfilelistfrom(const string & dir, vector<string>:: list, const string & filetype); int getfilelistfrom(const string & dir, vector<string>:: list, const vector<string> & filetypes); i hope functio

uploading data to MySQL with android -

hi works in android project mysql db ... have 1 database multiple tables. when upload data table1 saved, when insert data table2 show error .. both table have same colomns name, wrote same php script same table name mention above..plz post answers. if have solution.

java - Set setCachePeriod for static resources in spring boot -

i using spring boot, , /static served static resources js , css, far good, while want set cache header of these files, tried this: @configuration public class basemvcconfig extends webmvcconfigureradapter { @override public void addresourcehandlers(resourcehandlerregistry registry) { registry.addresourcehandler("/static/**").addresourcelocations("classpath:/static/").setcacheperiod(24 * 3600 * 365); } } however after that, application can not serve /static folder. what's problem? in opinion, it's better use spring.resources.cache-period property set cache period of default boot resource handler . add following application.properties : spring.resources.cache-period = 31536000 and delete basemvcconfig config file.

javascript - How to debug website which only chrashs on iphone/ipad under windows -

after time googel'ing decided ask on so. is there possibilty debug iphone/ipad mobile safari browser on windows? i read tip in iphone browser simulator windows? set user agent of safari 1 of iphone/ipad didn't help. my problem following: have page uses javascript , page works fine in: desktop firefox + waterbox, ie, opera, chrome, safari (safari user agent), safari (iphone/ipdad user agent) but js doesn't work when use page updated iphone / ipad up-to-date mobile safari. i know desktop safari version 5 unknown if safari 6 ever come - think user agents of safari version possibly "outdated". any suggestions how can debug page under iphone/ipad circumstances find mistake? thanks in advance

executing runtime.getruntime in java is not creating json file -

i using: try{ process p = runtime.getruntime().exec("/home/desktop/crt_json); p.waitfor(); } catch (exception ex) { ex.printstacktrace(); system.out.println("i caught: " + ex); } to run c++ file named crt_json creates json file. when run through terminal working when run through java code json file not being created. know fact program crt_json being executed beacuse couple of other things , it's doing every single 1 of them except creating json file. know if there problem creating json files when executing c++ file runtime or something? the c file being created in "current folder" , current folder in crazy directory changed code force in path of choosing.

How to run a command in .sh file during startup for Intel Edison? -

as there no rc.local file in intel edison, how run command in .sh file during startup? i'm running iwconfig wlan0 | grep -e -o ".{0,1}-.{0,6} |.{0,4}mb/s.{0,3}|.{0,3}/70.{0,0}" , want execute during every startup , save text file. intel edison uses systemd handling services. can find these services in /lib/systemd/system , e.g., create copy of iotkit-agent.service, rename .service , modify accordingly. now have is systemctl daemon-reload systemctl start <yourscript>.service to run script on boot, can enable running systemctl enable <yourscript>.service now reboot , see if runs script. can check status running command systemctl status <yourscript>.service