Posts

Showing posts from April, 2014

ios - How do I make a swift file with prewritten suggested methods? -

i've made new swift file named "customsearchbar" inherits uisearchbar, import uikit class customsearchbar : uisearchbar { } my question is, how fill .swift file nice, pre-made suggested functions apple's included comments , such. i've seen done before can't quite remember. thanks help. when add new file choose cocoa touch class not swift file . there, can choose new file subclass of uisearchbar . xcode generate nice suggested functions , comment you.

TeamCity error after addind SVN subrepo to Mercurial -

i added svn project subrepository mercurial project (following this instructions) , teamcity cannot build mercurial project. following error: [updating sources] failed build patch build #???, vcs root: "mercurial: https://myrepo" {instance id=41, parent internal id=22, parent id=mercurial_repo_id, description: "mercurial: https://myrepo"}, due error: cannot build patch: clientabortexception: java.io.ioexception [updating sources] problem while loading patch data stream: failed obtain stream server. server status: 504 (gateway time-out) problem while loading patch data stream: failed obtain stream server. server status: 504 (gateway time-out) java.io.ioexception: failed obtain stream server. server status: 504 (gateway time-out) when clone repo locally, goes fine, teamcity doesn't see subrepo , there no subrepo in changes graph. tried add different build steps, didn't help. tried change vcs checkout mode in teamcity agent-checkout, there error du

html - Javascript image changer: MDN Javascript basics -

Image
i'm going through web development guide on mozilla developer network, , in js basics section , came across example: var myimage = document.queryselector('img'); myimage.onclick = function() { var mysrc = myimage.getattribute('src'); if(mysrc === 'images/firefox-icon.png') { myimage.setattribute ('src','images/firefox2.png'); } else { myimage.setattribute ('src','images/firefox-icon.png'); } } when worked out example, although did execute expected, have question image path. here's file structure: my question is: when working images in html, if present .html file in folder called pages , along side other sibling folders images , scripts , etc, file structure have followed in case reach image so: ../images/filename.jpg . .. used reach main(root) folder pages folder, access images folder there. how image changer example work then, without .. being used? file here main.js in sub-f

Youtube Data API v3: commentThread call doesn't give replies for some comment threads -

Image
i have problem commentthread api call. here 1 specific case: comment id: z13ocxipdz3hwxqqe04cgbuadtmnhhmybyc0k https://www.googleapis.com/youtube/v3/commentthreads?id=z13ocxipdz3hwxqqe04cgbuadtmnhhmybyc0k&part=snippet%2c+replies&key= {your_developer_key}&alt=json&order=time there 44 replies now. but if use video_id (not comment id did above. link: https://www.googleapis.com/youtube/v3/commentthreads?videoid=ui-ulcwmpou&maxresults=100&pagetoken=chyqp7fipbfsxgiykngqiobjxqigacgdehqiabcq0aqkhupfahimqqkive-5ahgcikwc&part=snippet%2c+replies&key= {your_developer_key}&alt=json&order=time) , come across comment (you may have use pagetoken iterate on pages) see this: (screenshot: https://www.dropbox.com/s/d4bf9tk51eaw7dr/screenshot%202015-07-21%2021.08.31.png?dl=0 ) as noticed; there 39 replies (comments) not true. , if have replies; there no replies section. missing something? two questions: why number of replies don't match? why com

Split string that looks like a Python function call to arguments -

i trying make function accepts string looks function call in python , returns arguments function example: "fun(1, bar(x+17, 1), arr = 's,y')" will result: ["1", "bar(x+17, 1)", "arr = 's,y'"] the problem of using regular expressions don't know if possible not split @ commas inside parenthesis or quotes. thanks. edit: python: splitting function , arguments doesn't answer correctly quastions since doesn't treat commas in parenthesis or quotes. as @kevin said, regular expressions cannot solve this since can't handle nested parenthesis. you can keep track of own state def parse_arguments(s): openers = "{[\"'(" closers = "}]\"')" state = [] current = "" c in s: if c == "," , not state: yield current current = "" else: current += c if c in openers

arrays - Split a string while keeping delimiters Haskell -

basically i'm trying split string [[string]] , concat results keeping delimiters in resultant list (even repeating in row). something below kind of works, delimiter gets crunched 1 space instead of retaining 3 spaces unwords . map (\x -> "|" ++ x ++"|") . words $ "foo bar" -- "|foo| |bar|" ideally like: "|foo|| ||bar|" -- or "|foo| |bar|" i can't figure out how preserve delimiter, split functions i've seen have dropped delimiters resulting lists, can write 1 myself seems in standardish library , @ point i'm looking learn more basics includes getting familiar more colloquial ways of doing things. i think i'm looking function like: splitwithdelim :: char -> string -> [string] splitwithdelim "foo bar" -- ["foo", " ", " ", " ", "bar"] or maybe it's best use regexes here? you can split list, keeping de

javascript - Inject service/object into controller after an asynchronous (ajax) call -

i globalizing website developed both asp.net mvc , angularjs. js part using angular-localization load resource bundles. right have controller this: app.controller('mycontroller', ['$scope', function($scope) { $scope.msg = "hello world!"; }]); with nglocalize can use locale service, getting resource string in callback: app.controller('mycontroller', ['$scope', 'locale', function($scope, locale) { locale.ready('resourcefile').then(function() { $scope.msg = locale.getstring('resourcefile.helloworld'); }); }]); the problem have translate hundreds of strings , introducing callback makes hard review code, , forces me change controller logic (e.g: when need resource string inside function return message caller). call locale.getstring() directly, without callback: app.controller('mycontroller', ['$scope', 'locale', function($scope, locale) { $scope.msg = locale.getstring(

javascript - Filter table + virtual keyboard -

i have page jquery table filter , works fine regular keyboard not virtual keyboard. check jsfiddle see mean, below code filter function. https://jsfiddle.net/e3r76kdc/5/ $("#search").keyup(function(){ _this = this; // show matching tr, hide rest of them $.each($("#table tbody").find("tr"), function() { console.log($(this).text()); if($(this).text().tolowercase().indexof($(_this).val().tolowercase()) == -1) $(this).hide(); else $(this).show(); }); }); if type numbers on regular keyboard filters table if use virtual keyboard numbers appears filter doesn't work. i bet it's simple i'm having trouble solving it. thanks! the issue virtual keyboard not trigger keyup event. checked source , trigger focus on input. therefore can do: $("#search").on('keyup focus', function() { ... https://jsfiddle.net/e3r76kdc/6/

sockets - Android Application hanging on subscriber.recv() -

i writing android application receives continuous stream of data. i've set connection inside runnable so: runnable runnable = new runnable() { public void run() { zmq.context context = zmq.context(1); zmq.socket subscriber = context.socket(zmq.sub); subscriber.connect("tcp://[ip]:[port]"); textview strdisplay = (textview) findviewbyid(r.id.stringdisplay); while (!thread.currentthread ().isinterrupted ()) { // read message contents log.i("output", "the while loop ran here"); //*hangs on line below* string testcase = subscriber.recvstr(0); strdisplay.settext(testcase); log.i("output", "the while loop completed"); } now, after scouring of interwebs, i've come 2 conclusions: 1) recvstr() blocking call waits until receives something. means

excel - VBA: Textbox new/next line -

i need textbox. textbox content being fed cell value. construction of cell value goes this: "(date comments)" , happens progressively, can have multiple entries that. basically want textbox display each value single line in textbox in user form make them appear bullet list. is possible? i'm thinking of detecting each closing parenthesis sign ")" make go next line? cannot put finger on how code it. set multiline property of textbox = true and may have set scrollbars property 2-frmscrollbarsvertical then separate values vbcrlf "somecomment" & vbcrlf & "somecomment" & vbcrlf & "somecomment" these options newlines depending on doing. constant equivalent description vbcrlf chr(13) + chr(10) carriage return–linefeed combination vbcr chr(13) carriage return character vblf chr(10) linefeed character vbnewline chr(13) + chr(10) or, on mac

android - How do I open the LinkedIn app from my app without knowing the profile ID? -

i'm trying apply solution found here , have url of linkedin profile, not id. code ends o string username = "bill-johnson"; // inferred full url public void tolinkedin(){ intent intent = new intent(intent.action_view, uri.parse("linkedin://" + username)); final packagemanager packagemanager = getpackagemanager(); final list<resolveinfo> list = packagemanager.queryintentactivities(intent, packagemanager.match_default_only); if (list.isempty()) { // fall on full url, know. intent = new intent(intent.action_view, uri.parse(linkedin_url)); } startactivity(intent); } linkedin's android sdk provides function "deep link" profiles directly within official linkedin app. suggest check out: https://developer.linkedin.com/docs/android-sdk#deeplink

ajax - "lang" field disappears in JQuery post -

i had odd bug today, appeared in production version of software working on. i'm still scratching head trying understand happened. i'm using jquery.post() send form data php script on server. 1 of fields in data called "lang". on development machine went fine, on production version, value in field disappear. debugged far call jquery post. in debugger see lang had value @ point, looking @ network trace shows lang field empty string. the main difference between development , production version development use local non-minified copy of jquery , in production grab ajax.googleapis.com (currently using jquery 1.11.3). after pulling out of hair, changed name of field "lng" instead, , started working correctly. is known problem? post variables 1 needs avoid when using jquery ? partly i'm posting here save other poor souls having same issue.

python - Django, Initialize a field in child class from value in parent class -

in django, say have 2 classes, , b. b child of a. want there integer field in b pk of a. want field in b initialized such whenever create b object. thanks. p.s. want able access pk of parent object child class. if there easier/better way, please advise you need set class foreign key class b class b(models.model): = models.foreignkey(a) ... new b = b.objects.create(a=instance_of_class_a, ...)

join - Wrong data on SQL query -

Image
my requirement fetch details 2 tables report_api_usage & report_api_pages . need termname , count(termname) report_api_usage , count(ctype) both event , download report_api_pages . both table has common field termid . requirement termname , count(termname) related events , file-download. there 1 termid 24 in report_api_pages ctype download . result should face-to-face learning 1 0 1 i have page face-to-face learning termid' 24 . have added event , document reference of face-to-face learning . once viewed face-to-face learning page, count(termname) will store page hit value in report_api_usage table. once event , document pages viewed, report_api_usage will store details with termid reference. need create report of views. need get face-to-face learning` view count related event , document hits. you have 2 rows termname ='face-to-face learning' in table report_api_usage therefore returned 2 lines. you should use: select ap.t

Implementing OCR in python for local language -

i need implement ocr in python 1 of regional languages of home town. i searched around , read tesseract ocr engine. supports limited languages. how go modifying support other languages? you train tesseract support language , characters of choice, have howto guide here: https://code.google.com/p/tesseract-ocr/wiki/trainingtesseract3

c# - Updating rows on a table with condition -

i'm trying delete rows, starting bottom of table using condition, when conditions met want stop updating table , leave rest was. example, if last entry on table meets it, delete it, if 1 after not meet condition stop there, , exite loop. here's code got, deleting rows : private void button1_click(object sender, eventargs e) { messagebox.show("a atualizar dados"); bool check = true; { string connectionstring = @"data source=.\wintouch;initial catalog=bbl;user id=sa;password=pa$$w0rd"; string querystring = string.empty; using (sqlconnection connection = new sqlconnection(connectionstring)) { connection.open(); querystring = "delete wgcdoccab serie ='1' , tipodoc ='fss' , contribuinte ='999999990' , datadoc = convert(varchar(10),(dateadd(dd, -2, getdate())),120

asp.net - how to resolve this error in paypal sandbox -

Image
paypal payment standard method(sandbox), after doing setup in buyer account, when transaction time need retrieve payment status(success/failure), of these options, payment status. 1) instant payment notification (ipn) 2) payment data transfer(pdt) when enable payment data transfer(pdt) on. while doing transaction in paypal receive these error this... rapids::exception (n6rapids5tools13pimpexceptione): pimp rc: 3514 failure log: use of pimp_rc (4814), use of pimp_rc (3013), use of pimp_rc (4814), use of pimp_rc (3174), use of pimp_rc (14816), use of pimp_rc (9449), use of pimp_rc (9445), use of pimp_rc (4814), use of pimp_rc (3507), use of pimp_rc (4001), use of pimp_rc (4002), use of pimp_rc (3778), use of pimp_rc (4007), use of pimp_rc (4020), use of pimp_rc (7003), use of pimp_rc (3583), use of pimp_rc (3051), use of pimp_rc (3001), use of pimp_rc (3021), use of pimp_rc (3242), use of pimp_rc (3165), use of pimp_rc (3101), use of pimp_rc (3085), use of pimp_rc (3

serialization - Use Date constructor invocation in serialized json from SignalR hub -

in our project, use following custom jsonconverter datetime: public class javascriptdatetimeconverter: jsonconverter { public override bool canconvert(type objecttype) { return objecttype == typeof (datetime); } public override void writejson(jsonwriter writer, object value, jsonserializer serializer) { var datetime = (datetime)value; writer.writestartconstructor("date"); writer.writevalue(datetime.year); writer.writevalue(datetime.month - 1); writer.writevalue(datetime.day); writer.writevalue(datetime.hour); writer.writevalue(datetime.minute); writer.writevalue(datetime.second); writer.writevalue(datetime.millisecond); writer.writeendconstructor(); } public override object readjson(jsonreader reader, type objecttype, object existingvalue, jsonserializer serializer) { //some code } } so, want use converter in signalr. here startup clas

c++ - How can I initialise the vector of vectors of ints? -

if have 2-d vector (basically representing graph first column being initial vertex , second column being final vertex), this, vector<vector<int> > myvec ; and want store this, 0 -> 1 2 1 -> 2 3 2 -> 3 4 3 -> 4 5 5 -> 1 2 if want initialise myvec , is, total number of rows (number of vertices) , can insert second vertex @ appropriate position, i.e. after initialisation (if enter number of vertices 6), want this, 0 -> 1 -> 2 -> 3 -> 4 -> 5 -> and can insert appropriate edge using, myvec[startingvertex].push_back(endingvertex) // starting vertex , ending vertex taken input how can it? thanks! edit: have: class graph { int vertices; vector<vector<int> > edges; } in main , following int main (void) { int i,n; cout<<"how many vertices wish enter\n"; cin>>n; graph *mygraph = new graph; mygraph->vertices = n; mygraph->edges // how can initialise here?

c++ - Error in String class to CString Conversion -

i want put 3 string variables in 1 array besides each other cstring. code gives me error declaration. #include <iostream> #include <string> using namespace std; int main() { string str1, str2, str3; cin >> str1 >> str2 >> str3; int length_str1 = str1.size(), length_str2 = str2.size(), length_str3 = str3.size(); char acstring[length_str1+length_str2+length_str3+1]; string str_array [] = {str1, str2, str3}; strcpy(acstring, str_array.c_str()); return 0; } errors: there 2 errors in code: 1. 14:32: error: request member 'c_str' in 'str_array', of non-class type 'std::string [3] {aka std::basic_string<char> [3]}' 2. 14:39: error: 'strcpy' not declared in scope reasons: first error because trying call c_str str_array pointer array of strings, right way call string i.e. str_array[someindexofarray] reason behind second error string.h contains method strcp

oracle - Sql query alternative way -

i want find select no of employees joined respect year , month employee table my query is: select to_char(joining_date,'yyyy') "year", to_char(joining_date,'mm') "month", count(first_name) employee group to_char(joining_date,'yyyy'), to_char(joining_date,'mm'); no error, runs successfully. is there alternative way same results query? if group year , month, can following: select to_char(joining_date, 'mm-yyyy'), count(first_name) test_date group to_char(joining_date, 'mm-yyyy')

mysql - How do I cancel / abort a rollback in infinidb? -

when start infinidb, getting following error message, making impossible service start. in log file, says there problem rollback. there way abort rollback can start service again? ok losing data. starting calpont infinidb database platform: ....... done warning! dbrm in read-only mode! updates not propagate! starting calpont infinidb mysql: starting mysql . * validate infinidb system catalog: validation succesfully completed perform functionality test: infinidb logging check: done platform process check: error: problem infinidb process dmlproc, should single version running ***stopping infinidb allow process problem resolved. shutting down calpont infinidb mysql: shutting down mysql ... * shutting down calpont infinidb database platform: /var/log/calpont/crit.log dmlproc[4292]: 41.458706 |0|0|0| c 20 cal0002: dmlproc failed start due : problem rollback. version buffer file not exists. i tried removing files in /usr/local/calpont/data1/systemfiles/datatransaction st

css - IE11 stretches border-image -

Image
i'm trying css3 image-border work across modern browsers , find ie11 stretches 1px-wide image slices when should solid. here test image: http://i.imgur.com/bwwyjos.png - note how centre region (1px wide) solid white. my css: div { border-style: solid; border-width: 11px 24px 10px 25px; border-image-source: url(...); border-image-slice: 11 24 10 25 fill; border-image-width: 11px 24px 10px 25px; border-image-outset: 0s; border-image-repeat: stretch; } the image's regions (in 50x50 image): top-left: 0, 0 25,10 (25x11) top-span: 25, 0 25,10 ( 1x11) top-right: 26, 0 49,10 (24x11) left-span: 0,11 24,39 (25x29) centre: 25,11 25,39 ( 1x29) right-span: 26,11 49,39 (24x29) bottom-left: 0,40 24,49 (25x10) bottom-span: 25,40 25,49 ( 1x10) bottom-right: 26,40 49,49 (24x10) here jsfiddle: http://jsfiddle.net/rdgbotke/ rendering comparison: chrome 44: ie11: update noticed edge on windows 10 renders

c++ - Is that possible by only using while loop? -

my tutor gave me assignment have write code contains while loop , prints: 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 i tried 100 times , failed 100 times. due limited knowledge, began think tutor messing brain. if it's possible, please introduce me code prints numbers in order. thanks... int = 1; int limit = 5; while (i <= limit) { int j = 1; while (j <= limit -i) //loop print desired space. { cout << " "; j++; } int k = i; while(k) { cout<<k; //printing digits k--; } cout << endl; //adding new line character @ end. i++; } say hello tutor :)

for loop - Unable to pass dictionary to function in Python -

i trying match word list index (stored in csv) have using fuzzy matching. load index dictionary. create function compare 2 strings given. if ratio matched larger threshold, return index , indexed string. this have tried. def fuzzy_token_set_matching(index_dict, str_for_comparison): matching_threshold = 70 #if try dict size here, it's 0 print(len(index_dict)) index, indexed_string in index_dict.items(): max_ratio = 0 #compare 2 string using fuzzy matching fuzz_matching_ratio = fuzz.token_sort_ratio(indexed string, str_for_comparison) if fuzz_matching_ratio > max_ratio: max_ratio = fuzz_matching_ratio if max_ratio > matching_threshold: return index_index, title else: return none input_file = 'index.csv' output_file = 'results.csv' #load index list dictionary open(input_file, mode = '

regex - Python BeautifulSoup find_all re.compile finding anything within a set of tags -

here html data: <td>4.2.2</td>, <td align="center"><a href="https://blah.org/blah-4.2.2.zip">zip</a> (<a href="https://blah.org/blah-4.2.2.zip.md5">md5</a> | <a href="https://blah.org/blah-4.2.2.zip.sha1">sha1</a>)</td>, <td align="center"><a href="https://blah.org/blah-.2.2.tar.gz">tar.gz</a> (<a href="https://blah.org/blah-4.2.2.tar.gz.md5">md5</a>|<ahref="https://blah.org/blah-4.2.2.tar.gz.sha1">sha1</a>)</td>, <td align="center"><a href="https://blah.org/blah-4.2.2-iis.zip">iiszip</a> (<a href="https://blah.org/blah-4.2.2-iis.zip.md5">md5</a> | <a href="https://blah.org/blah-4.2.2-iis.zip.sha1">sha1</a>)</td>, <td>4.2.1</td>, <td align="center"><a href="https://blah.or

java - Opening flash web application in javafx-8 WebView -

i have application in want run web application has flash content. using javafx-8 . know there no support flash content in javafx-2 web-view. in application, url opening successfully, flash content asking flash player(showing old version of flash player detected). want know if possible run flash content using javafx-8? if yes, how? else how can achieve same?

php - Get records with max time inserted MySQL results -

i have data row in table. i want select age occurs most. person | group | age --- bob | 1 | 32 jill | 1 | 32 shawn| 1 | 42 jake | 2 | 29 paul | 2 | 36 laura| 2 | 39 desired set: the age appears 32. use following query select person, count(*) c tablename group age you can add limit 1 only record , order maximum or minimum age. use following query select person, count(*) c,age profile group age order c desc limit 0,1

how python by php code -

i want pass multiple variable php python .and print variable values through python code .(python3.4,runnning in localhost) sample code: <?php $v1 = "1"; $v2 = "2"; $v3 = "3"; exec ( "/cgi-bin/z1.py $v1 $v2 $v3" ); ?> python code: #!c:/python34/python.exe -u import sys import cgitb ,cgi print("content-type: text/html;charset=utf-8") print() print (sys.argv[1]) print (sys.argv[2]) print (sys.argv[3]) but in output it's not printing variable values.please suggest how can sent values or did mistake while specifying path couple of typos: exec("c:\python34\pyhton.exe d:\xampp\cgi-bin\z1.py $v1 $v2 $v3" ) ↑↑ ↑↑↑ in double quotes hexescapes \xaa interpreted byte sequences. user either single quotes. or standard path specifiers: exec("python 'd:/xampp/cgi-bin/z1.py' $v1 $v2 $v3") don't forget escapeshellarg reliable argument passin

Android blow detection -

i want make app appy birthday, in can detect blow whenever user blows in mic, using code not efficient detect noise , normal sound, using media record class . have tried approach detecting blow public boolean isblowing() { boolean recorder=true; int minsize = audiorecord.getminbuffersize(8000,audioformat.channel_configuration_mono, audioformat.encoding_pcm_16bit); audiorecord ar = new audiorecord(mediarecorder.audiosource.mic, 8000,audioformat.channel_configuration_mono, audioformat.encoding_pcm_16bit,minsize); short[] buffer = new short[minsize]; ar.startrecording(); while(recorder) { ar.read(buffer, 0, minsize); (short s : buffer) { if (math.abs(s) > 27000) //detect volume (if blow in mic) { blow_value=math.abs(s); system.out.println("blow value="+blow_value); ar.stop();

php - Browser thinks it's making a cross origin request, but it's not? -

i have have project , running online, using codeigniter framework. project deployed on server on aws. in aws, it's stored under: /var/www/html/gitprojects/purimproject didn't want have type http://urlname.com/gitprojects/purimproject changed httpd.conf base url under gitprojects, access purim project doing http://urlname.com/purimproject . when did this, whole system broke browser not make ajax calls api (on same server, had worked previously), saying cross origin requests, although they're not. it's trying post http://urlname.com http://urlname.com/purimproject/index.php/controllername , isn't working. idea have possibly changed?

sql - Improve Performance of execution time on 20k rows -

i using following code on 20k rows , takes 3 min, how can improve ? ;with abcd ( -- anchor select topicid, [description], parentid,topicgroupfk, topicgroupfk "groupfk", cast(([description]) varchar(1000)) "path" accounting.topics parentid='0' , financialperiodfk=1 union --recursive member select t.topicid, t.[description], t.parentid,t.topicgroupfk,a.groupfk "groupfk", cast((a.path + '/' + t.description) varchar(1000)) "path" accounting.topics t join abcd on t.parentid = a.topicid t.financialperiodfk=1 ) select * abcd parentid>=0 what datatype of [parentid]? i bet (hope) int or bigint. therefore can remove quote , implicit cast here: where parentid='0'

cabasicanimation - Swift: How to draw a circle step by step? -

i build project draw arc initially, arc 1/8 of circle. then put button on viewcontroller, whenever click button, draw 1/8 of circle seamless on . got problem: when click button, draws arc rapidly(0.25s), not duration set before(1s). how reach no matter when click button, consumes same time duration set before? import uikit let π = cgfloat(m_pi) class viewcontroller: uiviewcontroller { var i: cgfloat = 1 var maxstep: cgfloat = 8 var circlelayer: cashapelayer? override func viewdidload() { super.viewdidload() let startangle = cgfloat(0) let endangle = 2*π let ovalrect = cgrectmake(100, 100, 100, 100) let ovalpath = uibezierpath(arccenter: cgpointmake(cgrectgetmidx(ovalrect), cgrectgetmidy(ovalrect)), radius: cgrectgetwidth(ovalrect), startangle: startangle, endangle: endangle, clockwise: true) let circlelayer = cashapelayer() circlelayer.path = ovalpath.cgpath circlelayer.strokecolor = uicolor.bluecolor().cgcolor circlelayer.fillcolor = u

java - Running jzy3d demos result in ClassNotFoundException -

the problem follows, during startup of jzy3d demo scatterdemo.java : exception in thread "main" java.lang.noclassdeffounderror: javax/media/opengl/glprofile @ org.jzy3d.chart.settings.<init>(settings.java:19) @ org.jzy3d.chart.settings.getinstance(settings.java:48) @ org.jzy3d.analysis.analysislauncher.open(analysislauncher.java:18) @ org.jzy3d.analysis.analysislauncher.open(analysislauncher.java:13) @ org.jzy3d.demos.scatter.scatterdemo.main(scatterdemo.java:16) caused by: java.lang.classnotfoundexception: javax.media.opengl.glprofile @ java.net.urlclassloader$1.run(urlclassloader.java:366) @ java.net.urlclassloader$1.run(urlclassloader.java:355) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:354) @ java.lang.classloader.loadclass(classloader.java:424) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:308) @ java.lang.classloader.loadclass(classloader.java:357) ... 5 more java result:

c# 4.0 - Lifetime of a temporary file in ASP.NET -

i created file in asp.net temporary folder. how long file available in temporary dir? the file deemed temporary through 'tmp' extension , and it's placement in temporary folder user. such files not deleted os . see: https://msdn.microsoft.com/en-us/library/system.io.path.gettempfilename(v=vs.110).aspx

ios - Push notification not sending from my device only - Parse -

Image
i have app in beta-testing has messaging functionality. it's set deliver push notification when user receives new message user. only time push notifications work when user sends message me specifically. if try send message other user or users message each other don't include me, push notifications not work. only messages sent me trigger push notifications on device. here simple screenshots parse showing 1 push sent , 1 did not. this private message sent user named "alissa" me in receive push notification (as can see "pushes sent" = 1): here details of said push: now, here private message sent from device, same device received push notification properly, "alissa". can see, "pushes sent" = 0, meaning device sent message recipient did not receive push notification: and here details of push, containing virtually identical information working 1 sent me: finally, here push not working sent between "alissa" ,

Java-Getting running file location of a child process -

hi have program executed jar file public class maintestclass { public static void main( string[] args ) throws ioexception, interruptedexception { process proc = runtime.getruntime().exec( "java -jar c:\\users\\rijo\\desktop\\test.jar" ); proc.waitfor(); java.io.inputstream = proc.getinputstream(); byte b[] = new byte[is.available()]; is.read( b, 0, b.length ); system.out.println( new string( b ) ); } } and test.jar definition : public class testmain { public static void main( string[] args ) { system.out.println( "started" ); system.out.println( "path : " + new file( "" ).getabsolutepath() ); system.out.println( "end " ); system.out.println( system.getproperty( "user.dir" ) + " path" ); } } my intention running path of test.jar, test.jar executed maintestclass jar, system.getproperty( "user.dir&q

java - how to solve "injection of autowired dependencies failed" issue? -

i try develop server program. so, test program using junit4. injection of autowired dependencies failed error occurs. don't know how solve problem. please me. this context-servlet.xml <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"> <context:component-scan base-package="kr.ac.jbnu.sql.soremore" /> <bean id="viewresolver" class="org.springframework.web.servlet.view.urlbasedview