Posts

Showing posts from May, 2010

bash - Setting popup box with osascript and a 10 second delay -

bash - Setting popup box with osascript and a 10 second delay - i'm looking setup popup box users see has 10 sec delay before exits , script continues. far i've got following. osascript -e 'tell app "system events" display dialog delay "10" "running health check \r \rplease allow 30 seconds or more complete." title "health check"' i've read can utilize "delay" function, i'm having problems getting inline. i found answer, needed add together in following... giving after 10 so overall script looks this... osascript -e 'tell app "system events" display dialog delay "10" "running health check \r \rplease allow 30 seconds or more complete." giving after 10 title "health check"' bash osascript

BizTalk integration with google drive -

BizTalk integration with google drive - i looking integrate biztalk 2010 google drive basic operations such create folders, upload files, share , alter permissions. has thought it? google-drive-sdk biztalk biztalk-2010

javascript - collapse article when next article is expanded (Readmore.js - Extension) -

javascript - collapse article when next article is expanded (Readmore.js - Extension) - i'm using readmore.js plugin. looked various solutions next issue none of them seemed perfect. i want add together function collapses expanded article - if any, when readmore pressed. thank's josh, manage flag variable isopen true or false when article expanded/collapsed. i'm trying figure out how collapse article when new 1 expanded. <script> $('#info').readmore({ morelink: '<a href="#">more examples , options</a>', maxheight: 390, aftertoggle: function(trigger, element, expanded) { if(! expanded) { // "close" link clicked $('html, body').animate( { scrolltop: element.offset().top }, {duration: 100 } ); } } }); $('article').readmore({maxheight: 240}); var isopen = true; $('article').readmore({ aftertoggle: function(trigger, element, expanded) { if (expanded) { isopen = true; } if(! expa

android - When an sqlite3 query returns ? for some character, what does this mean about the underlying data? How do i vew that data in its unicode form? -

android - When an sqlite3 query returns ? for some character, what does this mean about the underlying data? How do i vew that data in its unicode form? - i'm receiving: ������ sqlite3 queries, , i'm trying determine means underlying data. these characters supposed cyrillic alphabet characters. these queries on desktop. i attempting render them on android application, values returned related queries in android application (when viewed in debugger at-least) are: \u0003Ȓ\u0001-500-300 in text view show them in see number of empty squares. i believe there must kind of encoding issue somewhere, i'm sure how check , see actual values stored in db, vs i'm getting etc... android sql unicode sqlite3

ruby on rails - Nginx timeout on Digital Ocean -

ruby on rails - Nginx timeout on Digital Ocean - i have ruby on rails application running on digitalocean. maintain running 504 gateway timeout error nginx. happened when running service unicorn restart , service nginx restart . don't see apparent in production logs problems nginx or unicorn. in fact saying root view rendered, despite me getting time out error. i'm bit confused might causing error , i'm not little unsure info can provide in question of help. edit unicorn config @ /home/unicorn/unicorn.conf , comment out line user 'rails' then: service unicorn restart ruby-on-rails nginx unicorn digital-ocean

xcode - Importing whole NSArray to core data -

xcode - Importing whole NSArray to core data - i have uitextview, user come in copied text, structured in lines: peter paul sonia edgar then run script store text in lines in nsarray. finally, want import array core data, imports lastly object - edgar - why? i have 2 functions - 1 fill array , sec loop through array , save context: - (ibaction)savearray:(id)sender { if ([inputtv.text length] > 0) { // --------- decrypt text nsstring *importtxt = inputtv.text; nsmutablearray *importedtext = [[nsmutablearray alloc] init]; nscharacterset *cs = [nscharacterset newlinecharacterset]; nsscanner *scanner = [nsscanner scannerwithstring:importtxt]; nsstring *line; while (![scanner isatend]) { if ([scanner scanuptocharactersfromset:cs intostring:&line]) { nsstring *copy = [nsstring stringwithstring:line]; nslog(@"copy: %@",copy); [importedtext addobject:copy]; //[newmanagedobject

user interface - How to add multiple Jquery UI sliders on a page -

user interface - How to add multiple Jquery UI sliders on a page - kindly check illustration of jquery ui slider. using 3 sliders on single page. when scroll slider other sliders move. drag 1 scroll other 2 scroll remain on same place inner content scroll. there alot of code in example. how can utilize 3 sliders minimal redundant code. kindly see illustration below , click view source link on page. http://jqueryui.com/slider/#side-scroll sample code $(function() { //scrollpane parts var scrollpane = $( ".scroll-pane" ), scrollcontent = $( ".scroll-content" ); //build slider var scrollbar = $( ".scroll-bar" ).slider({ slide: function( event, ui ) { if ( scrollcontent.width() > scrollpane.width() ) { scrollcontent.css( "margin-left", math.round( ui.value / 100 * ( scrollpane.width() - scrollcontent.width() ) ) + "px" ); } else { scrollcontent.css( "margin-left", 0 );

jquery - CSS3 animation speed after hover not right in Webkit browsers -

jquery - CSS3 animation speed after hover not right in Webkit browsers - its hard explain problem i'm trying solve. i've made simple jsfiddle help. http://jsfiddle.net/8njmz/1/ #image { width:400px; height:400px; background-image:url('http://th07.deviantart.net/images3/pre/i/2004/142/8/b/tileable_checkered_floor.jpg'); background-size:150%; background-position:left center; transition:5s linear; -moz-transition:5s linear; -webkit-transition:5s linear; } #image:hover { background-position:right center; } basically works i'd in firefox, when hover on background scrolls across, , if take mouse away if reverts @ same speed, if animation hadn't finished. in safari/chrome animates on same time, much slower if animation hadn't finished, if don't understand you'll see mean when see it. there simple prepare through css or going need write javascript prepare this? thanks! alex just add together tra

ruby on rails - Bamboo infinite loop -

ruby on rails - Bamboo infinite loop - having major issues bamboo. i run rails project, runs on engine yard. my build strategy follows checkout source code bundle install rspec (run tests) tag build (code create tag causes new commit, tag used in deploy) git remote remove origin git remote add together origin <my repo> git tag bamboo-${bamboo.buildnumber} git force origin bamboo-${bamboo.buildnumber} in deploy way engine yard works deploy based on branches or tags ( there no build artifacts) so in deploy it's single script uses gem https://github.com/engineyard/engineyard and runs ey deploy --environment <staging> --tag=bamboo- ${bamboo.buildnumber} --app <my app> engine yard rails 'stuff' prep build , deploy it. need bamboo run test , if works tag build. problem i using bitbucket source command , have configured hook trigger bamboo build on commit master. the issue step 4) pushing tag causes bitbucket execute buil

php - Using jQuery/Ajax to get data from database to apply discount -

php - Using jQuery/Ajax to get data from database to apply discount - i'm wanting know best way create form not utilize button homecoming valid discount code , apply cost , show on page. <input type="text" name="discount_code" value="" class="text" id="discount_code" title="discount code"> this posts same page. i understand onchange , ajax used not sure how this, looking help/examples on please. many thanks. fully working script, developed lastly week only, need understand steps, not going explain. <script type="text/javascript"> function applycouponcode() { $("#csuc, #cerr").hide(); $("#csuc, #cerr").html(''); var coupon = $("#ccode").val(); if(coupon!='') { $("#cload").show(); $.post('ajax/coupon.php', { coupon: coupon }, function(data) { /*optional stuff after su

Git: How can I reconcile a locally rebased feature branch with its remote equivalent? -

Git: How can I reconcile a locally rebased feature branch with its remote equivalent? - i've branched off of master , done work on feature-branch . pushed feature-branch remote. other people's work gets merged master . pull changes master , rebase local version of feature-branch off updated master . next time seek force feature-branch remote can't because it's out of sync remote version, due rebase. solution when working lone has been forcefulness push, there improve solution? coworker of mine, rather forcefulness pushing, did pull , push, results pretty weird (other people's commits appear when doing pull-request master). don't ever rebase branch have pushed. you should never alter history after became public (which became pushing). rebase alters history (among others, e.g. amend). you might think: "i can forcefulness it, right?" no: pulled feature-branch need forcefulness next pull, too. worse: if there commits based on

Getting all datas from xml through xslt -

Getting all datas from xml through xslt - this xslt: <?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <graph> <categories> <category> <xsl:attribute name="name"> <xsl:value-of select="rows/row/@date" /> </xsl:attribute> </category> </categories> <dataset> <xsl:attribute name="seriesname"> <xsl:value-of select="rows/row/@actual_amount"/> </xsl:attribute> </dataset> <dataset> <xsl:attribute name="seriesname"> <xsl:value-of select="rows/row/@threshold"/> </xsl:attribute> </dataset> <da

netlogo - How to make turtles move around patches with specific rules? -

netlogo - How to make turtles move around patches with specific rules? - i new netlogo, , have questions. great if help me. i create fruit flies moving around tree made greenish patches. fruit flies attracted tree. turn tree if fruit flies move away distance (such 5 grids) tree. in beginning, not stop on greenish patches because have plenty energy. time passed, loss energy. find closest greenish patch, , remain on time 1 time energy reaches 0. gain energy after that, , can short hops bottom branch top 1 (3 hops). flies move bottom branch when on top part of tree. think need while loop, have no thought how that. please @ codes. breed [flies fly] breed [suns sun] turtles-own [energy] flies-own [count-down] setup clear-all setup-suns setup-flies setup-patches reset-ticks end setup-suns ;; create sun set-default-shape suns "sun" create-suns 1 [ setxy max-pxcor - 3 max-pycor - 3 set color yellowish set size 7

java - how to Display HTMLs, PDFs, Imges inside same JSP page -

java - how to Display HTMLs, PDFs, Imges inside same JSP page - i new java/html/jsp. have jsp page(designed using eclipse running apache tomcat server) contain table. on left side of table have several href links htmls, pdfs, images. have created htmls folder, pdfs fodler , images folder within webcontent directory in project's workspace , stored respective files. now when user clicks these links want respective file stored in directory displayed on right side within same page rather navigating other page or downloading it. can suggest me how can accomplish that. here code <body> <table style="width:1000px;" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" style="background-color:#ffa500;"> <h1 style="margin:0;padding:0;">main title of web page</h1> </td> </tr> <tr> <td style="background-color:#ffd700;width:100px;vertical-align:top;">

android - how to use Google plus integration in titanium? -

android - how to use Google plus integration in titanium? - i working application in have integrate google plus using titanium. var win = ti.ui.createwindow({ barcolor : '#000', navbarhidden : true }); var texttoshare = encodeuricomponent('this text shared'); var urltoshare = encodeuricomponent('http://www.company.com'); var webview = ti.ui.createwebview({ url : 'https://plus.google.com/share?client_id=123456789.apps.googleusercontent.com&continue=' + ti.app.id + '%3a%2f%2fshare%2f&text=' + texttoshare + '&url=' + urltoshare + '&bundle_id=' + ti.app.id + '&gpsdk=1.0.0' }); win.add(webview); var close = ti.ui.createbutton({ title : 'close' }); close.addeventlistener('click', function() { win.close(); }); win.open({ modal : true }); webview.addeventlistener('load', function(e) { if (e.url.indexof('https://accounts.google.com') == -1) {

ios - video filter via GPUImageMovie not played clean video -

ios - video filter via GPUImageMovie not played clean video - i add together gpuimage framework video editing in project, can't play video clean (as per screen shot) checked illustration in gpuimage framework i.e. "simplevideofilefilter", have same issue , sound clean , , save easily(movie author code not show here) checked different video format i.e. "mp4", "mov", "m4v" have same issue my code below, .h file #import <uikit/uikit.h> #import <gpuimage.h> #import <avfoundation/avfoundation.h> @interface viewcontroller : uiviewcontroller<gpuimagemoviedelegate> @end and .m file following #import "viewcontroller.h" @interface viewcontroller () { gpuimagemovie *moviefile; gpuimageoutput<gpuimageinput> *filter; gpuimagemoviewriter *moviewriter; } @property (nonatomic,strong) gpuimageview *gpuimageviewobj; @property (nonatomic,strong) avplayer *player; @property (nonatomic,stro

c# - Why reversing a string array inside method does not persist -

c# - Why reversing a string array inside method does not persist - so i've got simple string array. passed function reverses input , displayed content of array. expecting contents of array reverse since arrays passed reference, string array did not change. string[] words = { "metal", "gear", "is", "awesome!" }; mutatearray(ref words); foreach (string word in words) console.write(word + " "); this mutatearray function: public static void mutatearray(ref string[] arr) { arr = arr.reverse().toarray(); } i know mutatearray method changes array persist 1 time state parameter must passed in keyword ref . aren't arrays passed in reference default? why changes persist when keyword ref involved? what's difference between passing reference type ( classes , interfaces , array , delegates ) value vs passing them reference (with keyword ref )? all parameters passed value default i

jquery - Not able to add images to unordered list items in columns -

jquery - Not able to add images to unordered list items in columns - i made these 2 work standalone not able create them work , can't figure out why. i need accomplish 2 things on page : - have unordered list of items in 3 colums ( there lot of list items listed) - have tick box in front end of every list item. i managed accomplish column view , managed accomplish icon in front end of each list item. cannot create them work together. i testing on jsfiddle : http://jsfiddle.net/glee/fa722/ here's html <div class="licol"> <ul id="ul.ticklist"> <li>apples</li> <li>pears</li> <li>bananas</li> <li>grapes</li> </ul></div> <div class="licol"> <ul> <li>cheese</li> <li>milk</li> <li>cookies</li> <li>oreos</li> </ul></div> <div class="licol"> <

How to find neighbors in 4D array in MATLAB? -

How to find neighbors in 4D array in MATLAB? - i bit confused , appreciate help. i have read many posts finding neighboring pixels, beingness extremely helpful: http://blogs.mathworks.com/steve/2008/02/25/neighbor-indexing-2/ however have problem applying on 4d matrix (a) size(a)=[8 340 340 15]. represents 8 groups of 3d images (15 slices each) of want neighbors. not sure size utilize in order calculate offsets. code tried, think not working because offsets should adapted 4 dimensions? how can without loop? %a 4d matrix 0 or 1 values aidx = find(a); % loop here? [~,m,~,~] =size(a); neighbor_offsets = [-1, m, 1, -m]'; neighbors_idx = bsxfun(@plus, aidx', neighbor_offsets(:)); neighbors = b(neighbors_idx); thanks, ziggy have considered using convn ? msk = [0 1 0; 1 0 1; 0 1 0]; msk4d = permute( msk, [3 1 2 4] ); % create 1-3-3-1 mask neighbors_idx = find( convn( a, msk4d, 'same' ) > 0 ); you might find conndef useful defining bas

android - addAction buttons in notification bar don't appear -

android - addAction buttons in notification bar don't appear - i have code notification n = new notification.builder(this) .setticker("here text") .setcontenttitle("title") .setcontenttext ("alot of text")) .setsmallicon(r.drawable.icon_notif) .setcontentintent(sender) .setautocancel(true) .addaction(r.drawable.btn_media_play, "play", playpendingintent) .addaction(r.drawable.btn_media_pause, "pause", pausependingintent) .build(); n.icon = r.drawable.ic_stat; notificationmanager.notify(1, n); but in notification bar (when send app in backgorund) doesnt show buttons below play , pause, has ideea why ? i've tested app on galaxy 2 , galaxy 3 , shows buttons, main problems were: in first place had unplug usb cable computer , run app 1 time again in order see buttons and in sec galaxy tab 3 lite 7.0 (i t

java - Is it possible to write Join Condition explicitly? -

java - Is it possible to write Join Condition explicitly? - i want write bring together status explicitly on non key columns using jdoql in datanucleus.is possible write in datanucleus?if yes how can write using jdoql? you don't write joins in jdoql. whole point of jdoql ... java syntax, , using object relationaships. if object "model" has assorted longs/ints around think relationships need revisit design, since not o-o. same applies jpa fwiw, except can explicit joins joined on intents , purposes relation field (i.e not on non-key columns). you set status (for non-key columns) filter of jdoql query (as long have field in persistable class) equates want do. java datanucleus jdoql

javascript - How to chage width 1024px to 100% in js script -

javascript - How to chage width 1024px to 100% in js script - <script> $(function(){ var slider = new beaverslider({ structure: { container: { id: "my-slider", width: '1024', height: 520, } }, content: { images: [ "images/slider/1.jpg", "images/slider/2.jpg", "images/slider/3.jpg", "images/slider/4.jpg", "images/slider/5.jpg", "images/slider/7.jpg", "images/slider/8.jpg", ] }, animation: { effects: effectsets["slider: big set 2"], interval: 1000 } }); }); </script> you can seek screen.width instead of 100% asked. ... width: screen.width, ... javascript

html - How can I create a button with an image? -

html - How can I create a button with an image? - i have image want utilize button on page links other pages. want create in way can utilize little , big texts on it. the image in question: i have tried can go no it. a { background:url(http://i.imgur.com/8isga60.png); background-size:contain; background-repeat:no-repeat; display:inline-block; padding:30px 100px; height:20px; color:black; font-size:16px; } js fiddle i think have split image, if seek repeat using finish image, repeat rounded parts. take left , right, , pixel center. see reply reference button using 3 (3) background images css the old school version using 3 classes left , right , 1 center repeating background.create button using 3 images now, mentioned in comments, unless decided on background images part, pure css solution work better. html css button

Elasticsearch on Hadoop - Should ES nodes be Colocated with Hadoop DataNodes? -

Elasticsearch on Hadoop - Should ES nodes be Colocated with Hadoop DataNodes? - from elasticsearch hadoop documentation: whenever possible, elasticsearch-hadoop shares elasticsearch cluster info hadoop facilitate info co-location. in practice, means whenever info read elasticsearch, source nodes ips passed on hadoop optimize task execution. if co-location desired/possible, hosting elasticsearch , hadoop clusters within same rack provide important network savings. does mean ideally elasticsearch node should colocated every datanode on hadoop cluster, or misreading this? you may find joint presentation elasticsearch , hortonworks useful in answering question: http://www.slideshare.net/hortonworks/hortonworks-elastic-searchfinal you'll note on slides 33 , 34 show multiple architectures - 1 es nodes co-located on hadoop nodes , have separate clusters. first alternative gives best co-location of info of import managing hadoop performance. s

javascript - Prevent click before AJAX response -

javascript - Prevent click before AJAX response - i'm submitting file ajax. until reply request, show modal window, if users click on modal before answer, ajax request gets canceled. i'm looking way prevent that. i'm using https://github.com/malsup/form/ post ajax full code here : http://jsfiddle.net/wc9xn/4/ thanks $('form').on('submit', function (e) { // show loading modal popup $("#dialog-modal").dialog({ height: 140, modal: true }); $(".ui-dialog-titlebar").hide(); e.preventdefault(); // prevent native submit $(this).ajaxsubmit({ url: '/unitary/import_ajax', type: 'post', datatype: 'json', iframe: true, success: function (data) { $('#dialog-modal').hide(); if (data == 'error') { alert('error, invalid file'); } else { var event = jquery.event; submitform(event, data); } }

Perl cpan module to execute multiple commands -

Perl cpan module to execute multiple commands - net::ssh::expect allows login remote router , run commands. is there way run these commands in single line. i mean there way execute 3 commands listed below 1 single variable $cmd instead of using $cmd1, $cmd2, $cmd3 ls, configure , exit respectively. my $cmd1 = $ssh->exec("ls"); $cmd2 = $ssh->exec("configure"); $cmd3 = $ssh->exec("exit"); for remote login following: my $ssh = net::ssh::expect->new (host => "ip addr", password=> 'pwd', user => 'username', raw_pty => 1); similarly there way execute commands? perl mod-perl

jquery - How do I load a PHP page after the page has fully loaded? -

jquery - How do I load a PHP page after the page has fully loaded? - i relatively new working php , more jquery, please excuse lack of knowledge :3 i trying load little html table has php info have queried game servers so. except... creates quite big loading time page, , wondering if there way load html page, display "loading..." sort of text , load php table separate file. php/html table can found here. so sum up, if possible, page says "loading..." (or of sort) , 1 time entire html page has been loaded, table of servers appear. i hope have provided relevant info , if more required please inquire below, help appreciated! again, please excuse lack of knowledge relatively new of this!thanks in advance! create php file "yourtablefile.php" with, example <table> <?php foreach ($toto $tutu) echo "<tr><td>" . $tutu . "</td></tr>"; ?> </table> and in first p

mysql - Real world total sales SQL query -

mysql - Real world total sales SQL query - i'm new sql , having difficulty solving problem. 'what total sales across products salespeople sell @ to the lowest degree 1 unit of each of 5 individual products highest sales unit? create sure query returns total sales dollars in descending order. consider sales take place on 6 finish months prior @target_date parameter.' 3 tables exist in db. salesperson (salespersonid,salesytd) salesorderheader (salesorderid,orderdate,shipdate) salesorderdetail (salesorderid,salesorderdetailid,orderqty,productid,unitprice) this i'm @ far. need compile have 1 statement , create necessary revisions. please help! to capture top 5 highest sales unit, next syntax should work: select productid, sum(orderqty*unitprice) salesorderdetail grouping productid orderqty >=1 , count(productid) =5 order sum(orderqty*unitprice) desc limit 5; for target_date parameter, think along these lines? select

javascript - Remove blinking tip for other tr in table -

javascript - Remove blinking tip for other tr in table - i have problem display of tip on table cells. in 1 line tr link date of sec tr in same column content tip. problem tip flashes , reference can not pressed inside. tried utilize settimeout unfortunately not work. tip appeared after moving field td on same link. single row of table: http://jsfiddle.net/65jlc/ link little source: http://jsfiddle.net/9me9y/ please help me. thanks. html `<div class="view-content"> <div class="calendar-calendar"><div class="month-view"> <table class="full"> <thead> <tr> <th class="days sun" id="sunday">sun.</th> </tr> </thead> <tbody> <tr class="date-box"> <td id="kalendarz_wydarzen-2014-05-20-date-box" class="date-box past" colspan="1" rowspan="1" data-date=&q

html - Hover not working inside an tag -

html - Hover not working inside an <a href> tag - i'm new html/css excuse me if simple question a:hover (using id , not class) isn't working within href tag when utilize in th tag does. html <a href='http://www.example.com' id='link1'>example text</a> css #link1 a:hover { text-decoration: none; color: #e0e0e0; } the thing if set in div , set class instead of id, works moves rest of links afterward downwards line on page. that's because you're trying find anchor link within id 'link1' while link1 anchor link. seek this: a#link1:hover { text-decoration: none; color: #e0e0e0; } http://jsfiddle.net/kf8ey/ html class href

Rest java class is not calling for new jersey version -

Rest java class is not calling for new jersey version - i trying create simple demo rest-application using latest version of jersey. can create rest phone call using old-version (1.x). don't know, can't create newer version. below pom.xml file.. missing dependency ? <?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>testproject</groupid> <artifactid>testproject</artifactid> <version>1.0</version> <packaging>war</packaging> <properties> <jersey.version>2.9</jersey.version> </properties> <dependencies> <!-- <depen

javascript - How to achieve recursive call - jquery -

javascript - How to achieve recursive call - jquery - i have custom created dialog module. passing mvc view called cart module. cart view has link called 'create new contat' clicking on view(cart) replaced view(contact ) using ajax call. contact view has button called cancel . when user clicks on cancel old view(cart) replace existing view(contact ). problem facing after replacing view none of links or buttons work on view. can body pls directed me towards improve way of doing this. pasted below code. $(document).on('click', '.ddlcart li', function(e) { var ddlselectedval = $(this).attr('id'); var selectedlistinscount = selected_listings.length; var selectedmlsnums = selected_listings.join(); var agentid = $("#agentid").val(); var action; var environmenturl = $("#environmenturl").val(); var postdata = { agentid: agentid,

java - Polynomial Linked List does not return the list -

java - Polynomial Linked List does not return the list - this first time asking in here. creating polynomial using linked list in java. i'm trying convert string of polynomial nodes in linked list , add-on , subtraction. i create method split polynomial terms , store in linked list. tried print out list within method, , works. however, when want print list using tostring method or phone call add together or subtract method, says list null. can help me, , explain me why list go null? this term class public class term { int coef; int exp; term next; public term() { coef = 0; exp = 0; next = null; } public term(int coef, int exp) { this.coef = coef; this.exp = exp; this.next = null; } public void setcoef(int coef) { this.coef = coef; } public void setexp(int exp) { this.exp = exp; } public int getcoef() { homecoming coef; } public int getexp() { homecoming exp; } public void setnext(term next) { this.next

try-with-resources are not supported at this language level - Android -

try-with-resources are not supported at this language level - Android - i have problem "try-with-resources not supported @ language level" in android in next posted code, tried set language 7 stills keeps giving me same illustration plus keeps giving me alternative alter language 7. public string readfile(string filename) { seek (bufferedreader br = new bufferedreader(new filereader(filename+".txt"))) { stringbuilder sb = new stringbuilder(); string line = br.readline(); while (line != null) { sb.append(line); sb.append(system.lineseparator()); line = br.readline(); } string = sb.tostring(); homecoming everything; } grab (filenotfoundexception ex) { logger.getlogger(savenloadrank.class.getname()).log(level.severe, null, ex); } grab (ioexception ex) { logger.getlogger(savenloadrank.class.getname()).log(level.severe, null, ex); }

mysql - GROUP BY in SUBQUERY WITH UNION ALL -

mysql - GROUP BY in SUBQUERY WITH UNION ALL - i have 2 tables, 1 showing search queries history, other showing locations. the first table search queries: searchterm | date | userid | historyid sec locations: userid | date | historyid | lat | lng i using union bring these in sub query bring together left & bring together right create total join. select st, fa (select webhistory.searchterm st, locationhistory.fulladdress fa webhistory left outer bring together locationhistory on webhistory.historyid=locationhistory.historyid union select webhistory.searchterm st, locationhistory.fulladdress fa webhistory right outer bring together locationhistory on webhistory.historyid=locationhistory.historyid) t every thing working beautifully i'm getting results entries in webhistory table, , same locationhistory table. issue have when i'm getti

maven - Error when running GWT in intellij -

maven - Error when running GWT in intellij - i trying run gwt on tomcat server build framework maven. maintain getting next error java: unable find requestfactory built-in type. requestfactory-[client|server].jar on classpath? any thought why happening? thanks reading error, seems lib missing. check if request-factory-server in pom.xml , if config okay. i working maven , gwt-requestfactory. here sample of working maven config: <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <parent> <!-- --> </parent> <artifactid>docentryeditor</artifactid> <packaging>war</packaging> <name>doc-entry-editor</name> <properties> <!--

ios - UISegmentedControl: how not to highlight already selected segment when using custom images -

ios - UISegmentedControl: how not to highlight already selected segment when using custom images - i using custom images normal/selected states of uisegmentedcontrol . when tap selected segment, it's appearance changes highlighted. i've tried set image highlighted+selected state, it's ignored: [segmentedcontrol setbackgroundimage:appearance.selectedbackground forstate:uicontrolstateselected | uicontrolstatehighlighted barmetrics:uibarmetricsdefault]; is there way (including non-breaking private ones) have selected segment in selected state when it's tapped again? i know it's late have same issue: have set dividerimages each states // set background images uiimage *normalbackgroundimage = [uiimage imagenamed:@"segmented-background-unselected"]; uiimage *selectedbackgroundimage = [uiimage imagenamed:@"segmented-background-selected"]; [self setbackgroundimage:nor

.net - PDF4NET: Change orientation of Canvas.DrawText() -

.net - PDF4NET: Change orientation of Canvas.DrawText() - in 1 of application utilize pdf4net to print info onto pdf-file. goal utilize method drawtext . right question has arisen specific countries/labels (arabic) orientation must alter left right right left current method print text: page.canvas.drawtext(strobj, mainxmlnode.pdffont, nothing, pdfnode.pdfbrush, pdfnode.x , pageposy, pdfnode.angle) method definition of drawtext public sub drawtext(byval text string, byval font o2s.components.pdf4net.graphics.pdffont, byval pen o2s.components.pdf4net.graphics.pdfpen, byval brush o2s.components.pdf4net.graphics.pdfbrush, byval x single, byval y single, byval orientation single) changing orientation/angle +180 or -180 causes text drawn upsidedown . not quite result needed. my thought utilize strinverse inverse order of string , print right left . yet lastly step keeps bugging me. can't seem find right method/parameters alter direction string p

Excel VBA - Run Macro / Open another file / Run that files macro / Save & Close -

Excel VBA - Run Macro / Open another file / Run that files macro / Save & Close - this i'm trying do. run macro in file x file x macro opens file y then calls file y's macro file y's macro runs file y closes currently, i'm getting far opening file y file x's macro, macro ends 1 time file y open , doesn't step through past opening. i had , attempted using info thread run excel macro on multiple files, didn't help. appreciate help can offer. here part of code gets before ending. opens file y, ends macro; workbooks.open (mypath & filey & ".xls") i want macro this; activeworkbook.application.run fileysmacro thanks. don't utilize activeworkbook. use: workbooks("workbookname").application.run excel vba excel-vba

java - Can't fetch result -

java - Can't fetch result - i tried simple programme check equality of 2 numbers. defined 2 methods. first 1 numbers , sec 1 check equality. first method working fetching numbers other method yielding nothing. if come in 55 , 55, should numbers equal instead nothing. please help! import java.util.scanner; public class check { int first; int second; string c; public void get(){ scanner s = new scanner(system.in); system.out.println("enter first number : "); first = s.nextint(); scanner p = new scanner(system.in); system.out.println("enter sec number : "); sec = p.nextint(); } public string check(){ if (first>second) { c = "first number greater"; } if (first<second) { c = "second number greater"; } if (first==second) { c = "numbers equal"; } homecoming c; } public static void main(string[] args) { check obj = ne