Posts

Showing posts from September, 2011

I am getting an exception while working with JSON library to get data on an android application. It says JSONObject cannot be converted to JSONarray -

this android (java) code, trying fetch data using json library (volley). private void makejsonarrayrequest() { jsonarrayrequest req = new jsonarrayrequest(urljsonarry, new response.listener<jsonarray>() { @override public void onresponse(jsonarray response) { log.d(tag, response.tostring()); try { // parsing json array response // loop through each json object jsonresponse = ""; (int = 0; < response.length(); i++) { jsonobject person = (jsonobject) response.get(i); string name = person.getstring("id"); string email = person.getstring("title"); jsonresponse += "name: " + name + "\n\n"; ...

javascript - Watching for a message in an iframe -

i'm wondering if there's way in javascript/angularjs out message of sort when appears in iframe. example have form in iframe, , complete form , tells me i've completed it, there way detect via js? any help/suggestions appreciated, thank you. :) outside iframe listen event window.addeventlistener( "message", function (e) { alert(e.data); },false); within iframe trigger event window.postmessage('form complete');

google chrome extension - Content Script pattern patch confusion -

i'm trying write first chrome extension , can't content script loading correctly. load home page of tube (ie, https://www.youtube.com/ ); however, not load other page, example, after user searches (ie, https://www.youtube.com/results?search_query=programming ). here have: "content_scripts": [ { "matches": ["*://*.youtube.com/*"], "exclude_matches": ["*://*.youtube.com/"], "js": ["jquery.js", "content.js"] } ] using above code, content.js doesn't load @ all; however, if take out "exclude_matches", content script loads on https://www.youtube.com/ . currently manifest includes all of youtube pages except main page. the following include main page: "content_scripts": [ { "matches": ["*://www.youtube.com/"], "js": ["jquery.js", "content.js"] } ] however youtube uses histor...

ios - Audio from merge not working -

i used reference: concatenate 2 audio files in swift , play them i'm trying create alarm clock, due restrictive apple policy cannot execute code in bg past 10 minutes, if opt out of bg modes , leave app in foreground "sound" suspends if user clicks home button, need sound go on until user something. uilocalnotifs don't work due silent/do not disturb buttons. want run blank audio until alarm time , play sound. so used following run it: this happens when save button clicked (user has selected alarm time) let seconds = double(comp.second) let notification = uilocalnotification() notification.alertbody = "testbody" notification.firedate = duedatepicker.date notification.alerttitle = "testtitle" println("seconds:\(seconds)") var results:nsarray = managedobjectcontext!.executefetchrequest(request, error: &error)! let audiourl1 = nsbundle.mainbundle().urlforresource("alarm", withextensi...

php - How to check if no image is selected don't update? -

i working on project update function using pdo update function working fine, problem when try update record , stay , when see database image column emplty..how can check if file empty , when empty not update?because when try update record image , hit update button image gone.. user.class.php public function upload($id,$file_name,$file_size,$file_type,$username,$password,$province) { if(empty($_file['myimage']['name'])){ echo "error"; } else { $stmt = $this->db->prepare("update tish_images set file_name=:file_name,file_size=:file_size,file_type=:file_type,username=:username,password=:password,province=:province id=:id"); $errors= array(); foreach($_files['files']['tmp_name'] $key => $error ) { if ($error != upload_err_ok) { $errors[] = $_files['files']['name'][$key] . ' not uploaded.'; //continue; return false; } $file_name = $key.$_files['files'...

java - Android Change View After Certain Amount of Time -

i'm new androidstudio , having trouble finding way change views without requiring action user. more specifically, i'm trying make app display title screen when opens, switch main interface after few seconds. found code changing views current view displaymessageactivity class in android tutorials: intent intent = new intent(this, displaymessageactivity.class); startactivity(intent); i tried use code in oncreate method of title screen activity such: protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.title_screen); try { thread.sleep(5000); } catch (exception e) { e.printstacktrace(); } intent intent = new intent(this, displaymessageactivity.class); startactivity(intent); } then set second view in new activity. tried use 2 separate views in oncreate method: protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontent...

java - Avoiding methods returning Wildcard types -

here's application design i'm trying avoid returning wildcard types method can invoke methods on returned object. suggestions? poor idea have static utility method find , return right handler implementation below after all? the problem: have bunch of requests (and responses corresponding them). these requests have handled , results of handling (the responses) may used further processing. request handled @ given moment depends on few criteria (this enum ). my approach: solution build several handlers, 1 each of request-response type combos , having them implement common interface method handle request. here's how goes: a family of handler classes implementing handler interface: interface handler<q extends request, r extends response> { r handlerequest(q); } and static utility method companion class find right handler matching given criteria: class handlers { handler<? extends request, ? extends response> handlerforcriteria(criteria crit...

asp.net - where is Web Site Administration on visual studio 2015 -

i cannot found web site administration tool in visual studio 2015. it? it used on menu "website > administration tool" or "project > administration tool" not anymore. i experienced same issue. can via iis or did, copy development folder future use. here 2 options... 1. launch web site admin tool using command window: open command window running admin change folder iis express: cd c:\program files\iis express\ run following command start iis express: iisexpress.exe /path:c:\windows\microsoft.net\framework\v4.0.30319\asp.netwebadminfiles /vpath:"/asp.netwebadminfiles" /port:8082 /clr:4.0 /ntlm access admin site via following url: http://localhost:8082/asp.netwebadminfiles/default.aspx?applicationphysicalpath=c:[your site path here]\&applicationurl=/ 2. launch web site admin tool using iis: can try running site windows folder after couple of issues moved folder. steps below cover process. copy admin site followi...

javascript - jQuery not displaying appended content -

Image
when drop debug point in source file can see following image: but when remove debug point, see following: the change in color affected overlay opacity. the relevant code is: flashsuccessmessage = function(msg) { $('#overlay').hide(); var $ch = $("#content-header"); $ch.after('<div id="flash_message" class="alert"></div>'); var $fm = $("#flash_message"); $fm.addclass("alert-success"); $fm.append(msg); $fm.show().children().show(); $fm.fadeout(3000); $fm.empty(); } and in case msg "job type added successfully" i can't understand why see message when break on execution after point call $fm.append(msg); doesn't matter break on after (of 3 lines), appear. when don't have break , let page execute script, green alert appears no words. any ideas? i've tried various jquery methods here - instead of .append() using .html() examp...

html - In a flexbox, how can I arrange 2 items in a row and 2 items in a column? -

i trying move towards flexboxes , stumbled across first problem. have created wrapper, logo fits on left , message area takes same height, on far right. in middle 2 stacked flexboxes, top being news ticker , bottom being menu. problem having news ticker not @ top, , menu not underneath it. driving me nuts. can me please. body { color: #cf6; margin: 0 auto; font-size: 1.0em; max-width: 1280px; overflow-y: scroll; text-transform: uppercase; font-family: "tahoma", verdana, sans-serif; background: black; } #head_main { height: 112px; margin-bottom: -112px; border: 2px solid #444; } #head_wrap { width: 92%; display: flex; margin: 0 auto; xmin-width: 40em; max-width: 84em; flex-flow: row wrap; border: 1px solid orange; } #head_logo { top: 0; left: 0; order: 1; width: 77px; height: 112px; border: 1px solid red; } #head_info { top: 0; flex:1; ...

parsing - Using regular expressions in Python to parse LaTeX code -

i trying write python script tidy latex code. find instances in environment started, there non-whitespace characters after declaration before next newline. example, match \begin{theorem}[weierstrass approximation] \label{wapprox} but not match \begin{theorem}[weierstrass approximation] \label{wapprox} my goal insert (using re.sub) newline character between end of declaration , first non-whitespace character. sloppily stated, want find (\begin{evn}) ({text} | [text]) ({text2}|[text2]) ... ({textn}|textn]) (\s) to replacement. i've tried expr = re.compile(r'\\(begin|end){1}({[^}]+}|\[[^\]]+\])+[^{\[]+$',re.m) but isn't quite working. last group, it's matching last paired of {,} or [,]. you can this: import re s = r'''\begin{theorem}[weierstrass approximation] \label{wapprox} not match \begin{theorem}[weierstrass approximation] \label{wapprox}''' p = re.compile(r'(\\(?:begin|end)(?=((?:{[^}]*}|\[[^]]*])*)...

java - Generating annotations using JavaPoet -

i writing code generator using javapoet , need put annotation on class for example : package some.package import org.hibernate.annotations.cacheconcurrencystrategy; import javax.persistence.entity; import javax.persistence.cache @entity @cache(usage = cacheconcurrencystrategy.nonstrict_read_write) public class someclass { } my code looks this: typespec spec = typespec .classbuilder("someclass") .addannotation(entity.class) .addannotation(annotationspec.builder(cache.class) .addmember("usage", "$l", cacheconcurrencystrategy.nonstrict_read_write) .build()) .build() this code generates class resulting code missing import statement cacheconcurrencystrategy. how can generate code required code outputted? try this: typespec spec = typespec .classbuilder("someclass") .addannotation(entity.class) .addannotation(annotationspec.builder(cache.class) .addmember("usage", "$t.$l", ca...

php - html forms: auto_increment field -

i'm making simple ticketing system. i'm starting off simple form user generate tripticket. 1 problem encountered wanted "ticket #" field have default value based on next incremented number. make more clear, example generated 1st trip ticket ("1") , submitted saved database.. when user generate tripticket, form must display "ticket #" field default value of "2". currently have in html, <form method="post" action="<?php echo htmlspecialchars($_server["php_self"]);?>"> <table border=0 width="500" cellspacing=1 cellpadding=3 bgcolor="#353535" align="center"> <tr> <td bgcolor="#ffffff" colspan=2 align="center"> <span class="error">* required field.</span> </tr> <tr> <td bgcolor="#ffffff" width="30%">tt ref #:</td> <td bgcolor="...

Python module to beep Windows motherboard speaker at specified frequency and length? -

windows 8.1, python 3.4 i'm looking python library allow me beep speaker on motherboard specified length @ specified frequency. i've looked around, , main suggestion use winsound module. however, sends sound external speaker , not internal one. i'm looking try make simple chiptune ("8-bit") song using motherboard speaker. thanks! would work: https://docs.python.org/2/library/winsound.html ? looks similar c# console.beep. pass in frequency , duration.

android eclipse how to use intent to show the second window in default navigation drawer -

so guys new in android programming , have no background in java. my problem : code possible? this default navigation drawer project code, added code intent when run app "unfortunately app has stopped" on switch case 1. im trying when user clicked section1 drawer window section 1 show. sorry newbie here. package com.example.example; public class mainactivity extends activity implements navigationdrawerfragment.navigationdrawercallbacks { /** * fragment managing behaviors, interactions , presentation of * navigation drawer. */ private navigationdrawerfragment mnavigationdrawerfragment; /** * used store last screen title. use in * {@link #restoreactionbar()}. */ private charsequence mtitle; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); mnavigationdrawerfragment = (navigationdrawerfragment) getf...

java - onAccessibilityEvent not called in Kitkat -

i building app listens notifications , display onto calendar using accessibilityservice , whenever receive notification (i'm using emails test continually send mail myself) onaccessibilityservice never called , referred answers around here point jellybean think not case i'm looking in accessibilitylistener.class @override public void onaccessibilityevent(accessibilityevent event) { final int eventtype = event.geteventtype(); notificationinfo info = new notificationinfo(); toast.maketext(getapplicationcontext(), "received event", 1000); log.d("tag","onaccessibility event running"); if (event.geteventtype() == accessibilityevent.type_notification_state_changed) { info.packagename = (string) event.getpackagename(); info.eventtime = event.geteventtime(); info.eventtext = event.gettext().tostring()...

grails - Suppose I have a list or map in controller, so how can I access them in GSP view using render method? -

def map = [name : "akshay"] def name_map = [full_name : map] //map def list = ["c", "c++", "java"] //list //want render above map , list gsp , want display on page render method accepts map. in controller provide view name want render , model map containing data , can directly access model map on gsp. def map = [name: "akshay"] def name_map = [full_name: map] //map def list = ["c", "c++", "java"] //list render view: 'index', model: [namemap: name_map, langlist: list] in gsp, iterate on list: <g:each in="${langlist}" status="index" var="lang"> ${lang} </g:each> and iterate on map of map: <g:each in="${namemap}" status="index" var="fullnamemap"> ${fullnamemap.key} <g:each in="${fullnamemap.value}" status="subindex" var="map"> ${map...

Config logstash for elasticsearch -

i have installed logstash-elasticsearch-kibana on local. want config logstash push data elasticsearch, there codes below same tutorial in guide on elastic page. can't run config file successful. excepted 1 time don't know why , try test again fail anyway this first-pipeline.conf input { file { path => "d:/grok.log" start_position => beginning } } filter { grok { match => { "message" => "%{combinedapachelog}"} } } output { elasticsearch { protocol => "http" host => "localhost" port => "9200" } stdout {} } this grok.log 83.149.9.216 - - [04/jan/2015:05:13:42 +0000] "get /presentations/logstash- monitorama-2013/images/kibana-search.png http/1.1" 200 203023 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "mozilla/5.0 (macintosh; intel mac os x 10_9_1) applewebkit/537.36 (k...

node.js - Streaming an API using request module -

the api endpoint need access provides live streaming option only. need regular non streaming api. using request node module can achieve this? you can hook stream on server , store data arrives in stream locally on server in database , when rest request comes in data, in local database , satisfy request database (the traditional, non-streaming way). other that, can't figure out else might trying do. cannot "turn streaming api non-streaming one". aren't close same thing. streaming api subscribing feed of information. don't make request, new data sent when it's available. typical non-streaming api client makes specific request , server responds data specific request. here's discussion of twitter streaming api might helpful: https://dev.twitter.com/streaming/overview

How to git clone an OpenShift application to Android -

i make changes in source of openshift web application on android tablet. i trouble git clone because git client (eg. sgit) cannot recognize given link openshift. ssh://r4nd0mh4sh@myapp-me.rhcloud.com/~/.git/myapp.git/ has experience how clone repo normal git client? there workaround solve this, or "better" app eats link correctly? i know linux can installed second os, , using ssh clien possible edit source directly. i cloned openshift repositories via ssh using sgit. follow these steps: import private key in sgit (main page > menu > private keys) provide corresponding public key in openshift account add new repository in sgit provide openshift ssh url "remote url" choose individual "local path" leave "username" , "password" empty press "clone"

How to show autocomplete jquery ui on textbox in html -

this code: getting values ajax , showing autocomplete. tried lot of solutions in stackoverflow. didn't this. please 1 me recover this: $(document).on("change", "#selectbox-city-list2", function(){ $("#inputarea").val(''); $("#inputareactrl").val(''); $.ajax({ url: "<?= base_url ?>/shop/area.html", type: "get", data: {city_key: $("#selectbox-city-list2").val()}, datatype: "json", success: function(data){ $options = []; $.each(data, function(i, field){ $option = {"label":field.location, "value": field.area_key}; $options.push($option); }); $("#inputarea").autocomplete({ source: $options, select: function(event, ui){ ...

javascript - Showing number of slides on the web page -

i wrote custom slider shown in codepen: http://codepen.io/anon/pen/nqqpjg added feature counts total number of slides moved. example, if total slides 8, starting value this: slides: 0/8 . when 1 slide moves, becomes slides: 1/8 , on. here code: <div> <span id="numberslides">0/0 offers</span> </div> js var slide = new slide('.swiper-slide', { var totalslides = 10; var newslide = document.getelementsbyclassname('swiper-slide'); var newvalue = newslide + 1; document.getelementbyid('numberslides').innerhtml = newvalue + "/" + totalslides + " slides"; }); but isn't working. how can display number of slides moved? edit: slides in these divs : <div class="swiper-container"> <div class="swiper-wrapper"> <div class="swiper-slide">slide 1</div> ...

html - How to fix a footer at bottom using absolute position? -

Image
here design i'm trying do. so decided put 3 part. top_bg content footer_bg i have given absoulte position bg s fix @ top , bottom. thing footer_bg image not sitting @ bottom instead coming @ top though have given bottom 0. code markup <div id="top_bg"> <img src="https://images.unsplash.com/photo-1438368915865-a852ef86fc42?q=80&fm=jpg&s=15e4744077e36852ba57f46f4660dc7a" /> </div> <div id="content"> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit. maecenas semper, massa quis aliquet rhoncus, diam lorem euismod ante, sed vulputate nulla magna id dui. sed sit amet libero mi. fusce suscipit, lorem @ dignissim rutrum, urna est scelerisque nisl, nec interdum orci tortor @ ante. nam sollicitudin massa, sit amet pretium nisl. morbi @ velit maximus, commodo ligula vel, pharetra dui. vivamus mollis mi eget nunc accumsan scelerisque. fusce non mauris sit amet nibh malesuada faucibus.</...

jsf - af:popup is throwing required field validation error as soon as it opens (Jdev version 11.1.2.4) -

today came across 1 exception not able find root cause error unpredictable. my requirement simple, developing adf form performing simple dml operation. adding new record , using popup. issue comes here, whenever click on add button popup opens , automatically throws required field validations. please go through below popup code reference. (jdev version 11.1.2.4) <af:popup childcreation="deferred" autocancel="enabled" id="p1" popupfetchlistener="#{pageflowscope.bean.onpopupfetch}" contentdelivery="lazyuncached" popupcanceledlistener="#{pageflowscope.bean.oncancelpopup}"> <af:dialog id="d1" dialoglistener="#{pageflowscope.bean.ondialoglistener}" type="okcancel"> <af:panelformlayout id="pfl1"> <af:inputtext value="#{bindings.code.inputvalue}" label="#{bindings.code.hints.label}" required="#{bindings.co...

How to create a collapsible div using Javascript? -

i have added collapsible div images. working 1 image. if add image not working: function expand(showhidediv, switchtextdiv) { var ele = document.getelementbyid(showhidediv); var text = document.getelementbyid(switchtextdiv); if (ele.style.display == "block") { ele.style.display = "none"; text.innerhtml = "+"; } else { ele.style.display = "block"; text.innerhtml = "-"; } } <h1 class="expand">chart1<a id="expand" href="javascript:expand('expand-content','expand');" >+</a></h1> <div id="expand-content" style="display: none;"> <img src="imagelink" width="100%"> </div> <h1 class="expand">chart2<a id="expand" href="javascript:expand('expand-content','expand');" >+</a></h1> <div id=...

Time difference in HIVE -

i trying find difference between 2 timestamps in hive. date_time field string, need convert date_time format before finding time difference. this code using, null. select unix_timestamp(to_date("2016-12-30 10:39:46"),'hh:mm:ss') - unix_timestamp(to_date("2016-12-30 10:39:31"),'hh:mm:ss'); i need difference 15 seconds. any suggestions great !! please try this: select unix_timestamp('2016-12-30 10:39:46') - unix_timestamp('2016-12-30 10:39:31'); it should give time difference in seconds.

c# - xaf how to show a listview when a record in listview is clicked -

i have smsreport table smses recorded same packetid if sent @ same time. using id want show listview , when record clicked want detailed listview shown(all smss has clicked packetid). how can made possible in xaf? you can use nonpersistent listview. see more @ : https://documentation.devexpress.com/#expressappframework/customdocument113167

javascript - Client Side Validations not working for second row in ASP.NET MVC -

model below: public class user { [displayname("id")] [range(0, 9999)] public int id { get; set; } public string mask { get; set; } } and controller returns iqueryable of above model there 2 views. parent view , partial view renders each row model main view @model iqueryable<user> @{ var array = model.toarray(); } //header here <tbody id="table-body-vlan"> @{ (var = 0; < array.length; i++) { html.renderpartial("_addrow", array [i], new viewdatadictionary() { { "index", } }); } } </tbody> </table> </div> } **and partial view ** @model user @{ var index = viewdata["index "]; } <tr class="js-deletable-item" id="row-@index" data-id="@model.id" > <td class=...

matlab - s function usage error- code generation -

my s function build sfunctionbuilder block existing c source code & tlc file generated it. takes 2 nubers input & output sum of 2 numbers. void add(unsigned char *ip_1,unsigned char *ip_2,unsigned char *result) { *result = *ip_1 + *ip_2; } i have integrated matlab s-function in model. i getting following error while generating code, model. error: simulink coder error in block: "one_mdl_extention/one model/s-function builder", block type "s-function": block output output_1 uses custom storage class, level 2 compliance level of block 1; use different block or different custom storage class, level 1 or lower how resolve error ? i have made simple c function & used s-function builder create s function, how can decide level-1 or level-2 s function ? short answer: use level 2. level 1 s-function block still exists in matlab legacy reasons, level 2 improved version. there nothing can implement in level 1 s-function can...

java - Deployment of my application in existing tomcat -

i want deploy web application in real tomcat 6 server uses other applications. problem is, when put war-file in webbapps, error in log file , error 404: java.lang.unsupportedclassversionerror: metier/utilisateurs/compte : unsupported major.minor version 51.0 (unable load class metier.utilisateurs. compte) @ org.apache.catalina.loader. webappclassloader.findclassinternal( webappclassloader.java:2822)... i googled , found there no compatible jdk , compiler of jsp. my question is: can deploy application in different tomcat (7) server , use 2 tomcat in same server? tried when start new tomcat (tomcat7/bin/startup), server starts old tomcat automatically! you compiled war using java 7 , trying run inside tomcat 6 java 6. configure tomcat 6 point java 7 installation , should work there well. also, possible have 2 tomcats running on same machine, on different ports. if this, should use load balancer or proxy in front distribute requests. however, using 2 dif...

javascript - How to post form to two different pages with a single button click? -

i have form single button below: <form name="sampleform" id="sampleform" method="post" action="" enctype="multipart/form-data"> <input type="text" id="biosample" name="biosample" class="sample"/> <input type="text" id="library" name="library" class="sample"/> <input type="submit" name="btnadd" id="btnadd" class="buttonsub" value="next>>"> </form> ajax code is: <script> $(document).ready(function(){ var encoded_project_id = $('#encoded_project_id').val(); $('#sampleform').on('submit', function(){ var target = 'windowformtarget'; window.open('', target, 'width=500,height=300'); this.setattribute('target', target); $.post('postdata.php', $(this).serialize(), function(){ ...

ajax - hi i got error on pop up modal using jquery -

when try create new page in asp . error pop up. $(document).ready(function () { blockui("<%=pnladdedit.clientid %>"); }); error : syntax error, unrecognized expression: #<%=pnladdedit.clientid %> file: jquery-1.11.2.min.js, line: 2, column: 12711 try this: $(document).ready(function () { blockui('<%=pnladdedit.clientid %>'); }); "" makes string value , not evaluate expression. should ideally work if change ''

jsf - "javax.el.ELException: Property not found on type" on a method expression -

i using primefaces 5.2, jsf 2.2 , tomcat 8 on linux server. line in xhtml: <p:fileupload fileuploadlistener="#{uploadcontroller.complete}" multiple="true"/> the method in class uploadcontroller: public void complete(fileuploadevent fileuploadevent) { uploadedfile item = fileuploadevent.getfile(); // ... etc. nothing special, standard reading } if start page in jetty, works fine. but if start on linux server tomcat 8, got javax.el.elexception property 'complete' not found on type exception. tried run code on windows machine in tomcat 8 (started maven in cargo container). no problem there. one step further put parameter method uploadcontroller.complete : <p:fileupload fileuploadlistener="#{uploadcontroller.complete(fileuploadevent)}" multiple="true"/> ...the way parameter excepted (no f:param , f:attribute,... accepted => same elexception). event "fileuploadevent" in uploa...

how to identify encryption or hash value type -

i have hash or encrypted string 861004c2-a9e0-4dae-a436-f46cecf14591 please tell me encryption or hash algorithms used generate values , how can decrypt it. search web string type , check previews threads related encryption , hash methods fail identify string. thanks based on byte values alone impossible distinguish algorithm used. desired characteristic of hashes , encryption algorithms though deterministic, output indistinguishable real randomness. follows indistinguishable 1 another. now formatting may help, in hamed's post may indicate guid. there no way know based on byte values alone.

java - Itext hyphenation in Table cells -

i´m creating table using itext. output looks bad, because of hyphenation, seems not done properly. allready read question how hyphenate text? , example http://itextpdf.com/sandbox/tables/hyphenationexample tried example in eclipse after added itext_hyph_xml.jar class path. no error thrown when run code, lines hyphenator h = new hyphenator("de", "de", 2, 2); hyphenation s = h.hyphenate("leistungsscheinziffer"); system.out.println(s); print null console instead of "lei-stungs-schein-zif-fer" or similar expected. tried playing parameters in chunk.sethyphenation(new hyphenationauto("de", "de", 2,2)); but output in document never differes slightly. the code i´m trying work looks kind of way: for(string s: interest){ chunk chunk = new chunk(s,font[0]); chunk.sethyphenation(new hyphenationauto("de", "de", 2,3)); table.addcell(new phrase(chunk)); } ok figured ...

visual studio - Published project can't find my files -

i published project , can't find manual file. i'm using getting file: private void btnhelp_click(object sender, eventargs e) { system.diagnostics.process.start(environment.currentdirectory + @"\handleiding lijmlijnen tekenen.pdf"); } pretty straight forward, , works when i'm debugging. when published it, shows error can't find specific file. points location: c:\users\bart\documents\visual studio 2015\projects\testdxflibrary\testdxflibrary\bin\debug\handleiding lijmlijnen tekenen.pdf the "current directory" in release can change (and change). display simple dialog path check if correct. check if file in there copying , pasting path file explorer. if trying deliver pdf file along project, change properties of pdf file in project file: set copy output directory copy always / copy if newer set build action content btw. better use path.combine method, like that .

android - How to persist big RecyclerView data on orientation changes? -

i'm making app content structure similar reddit. in mainactivity.java have recyclerview possibly have content. content loaded web, , don't want load again everytime when screen rotates. so, have recyclerview setup this: mainactivity.java list<customitem> data; // volley , gson magic load content web data list gsonrequest gsonrequest = new gsonrequest<customresponse>("http://example.json", customresponse.class, null, new response.listener<customresponse>(){ @override public void onresponse(customresponse response) { for(customitem item : response.getitems()){ data.add(item); } madapter = new customadapter(data); mrecycler.setadapter(madapter); }, new response.errorlistener(){ @override public void onerrorresponse(volleyerror error) { log.d("e", error.getmessage()); } }); volleysingleton.getinstance().getrequestqueue().add(g...

java - Cannot import webservice stubs in client -

i trying learn jax-ws , created simple bottom-up helloworld webservice in order train myself: import org.jboss.annotation.ejb.localbinding; import javax.ejb.remote; import javax.ejb.stateless; import javax.jws.webmethod; import javax.jws.webservice; import javax.jws.soap.soapbinding; @webservice(servicename = "helloworldwebserviceexperiment", portname = "helloworldport", name = "helloworld") @soapbinding(style = soapbinding.style.document, use = soapbinding.use.literal, parameterstyle = soapbinding.parameterstyle.wrapped) @stateless @remote @localbinding(jndibinding = "training.webservice.helloworldwebserviceremote/local") public class helloworldwebservicebean { private static final string hello_world = "hello world"; @webmethod public string helloworld() { return hello_world; } } when deploy webservice can access wsdl, seems work fine. tried generate webservice client. , needed creat...