Posts

Showing posts from January, 2015

oracle - computing statistics at the schema level (11g) -

this question computing statistics @ schema level (11g).where schema level statistics stored .where can retrieve details of schema level statistics?and next step after gathering statistics? what tried far? begin dbms_stats.gather_schema_stats ('staging' ,estimate_percent => 20 ,method_opt => 'for indexed columns size 1' ,block_sample => false ,degree => 32 ,granularity => 'all' ,cascade => true); end; / what next step after this gathering statistics @ schema level means have stats tables in schema (and indexes, because cascade=>true ). can find values querying relevant data dictionary views (user_tables, user_indexes). what next step? considering refresh policy. best approach automate task. find out more .

linux - my first simple cgi bash file -

i use internet browser display images/graphs created gnuplot . each picture have plot.gp file contains gnuplot commands. final goal open editor file plot.gp when click on picture. the way found achieve use cgi run bash scripts. i'm not able make "hello word" code work... here did : i installed on linux packaged cgi-mapserver i saved in file hello.bash in /usr/lib/cgi-bin/ , gave correct permission ( chmod 755 /usr/lib/cgi-bin/hello.bash) . but when firefox /usr/lib/cgi-bin/hello.bash browser display whole file instead of "hello world!" my file /usr/lib/cgi-bin/hello.bash : #!/bin/bash echo "content-type: text/html" echo "" echo "<html><head><title>welcome</title></head>" echo "<body>" echo "hello world" echo "</body></html>" i'm sure forget basic... can't figure :-( you should use browser's file association...

python - How to fix the menu selection for quiting -

so want run when number 7 entered should quit current program. have tried rest of menu selection want fix quit @ moment. if menu_selection == "7": quit() i assuming guessing quit() way exit. should try sys.exit() : import sys # @ head of program ... program ... if menu_selection == "7": sys.exit()

Autoload imported namespaces in PHP -

the question asked here similar. i'm trying write autoloader support imported namespaces. directory structure looks (class files listed): /includes /php config.php shapes.php animals.php /petsmodule /classes cat.php dog.php pcontroller1.php pcontroller2.php /mathmodule /classes triangle.php square.php mcontroller1.php mcontroller2.php all of controllers include config.php file, has autoloader code: <?php spl_autoload_register(function($fqclassname) { $fqclassname = ltrim($fqclassname, '\\'); $lastslash = strrpos($fqclassname, '\\'); if($lastslash) { // class in namespace require '/' . str_replace('\\', '/', substr($fqclassname, 0, $lastslash)) . '/classes/' . substr($fqclassname, $lastslash + 1) . '.php'; } else { // class global require "/includes/php/$fqclassn...

Birt 4.2.2 new font issue with linux -

i using new font on birt 4.2.2 working fine on developers windows machine, not working on our linux server uses websphere application server v8. have changed fontsconfig.xml per link , had same issue. although, can see birt processed new fonts directory on application server log file. kindly advise. thanks lot in advance. just copy font file under ../jre/lib/fonts directory , run commands "mkfontscale" , "mkfontdir". restart application server after this.

cakephp - Cake PHP : Warning (2): vsprintf() [function.vsprintf]: Too few arguments [CORE\Cake\basics.php, line 562] -

Image
i'm upgrading cakephp application version 1.3 version 2.4.6 .i have copied of model, view , controller maintaining cake naming conventions.the application running showing these notice , warning.. warnings : warning (2): vsprintf() [function.vsprintf]: few arguments [core\cake\basics.php, line 562] notice: notice (8): indirect modification of overloaded property prospectscontroller::$paginate has no effect [app\controller\prospectscontroller.php, line 51] notice (8): indirect modification of overloaded property prospectscontroller::$paginate has no effect [app\controller\prospectscontroller.php, line 52] strict (2048): declaration of segment::beforesave() should compatible model::beforesave($options = array) [app\model\segment.php, line 41] and whats wrong pagination style ? showing these notice... notice (8): indirect modification of overloaded property prospectscontroller::$paginate has no effect [app\controller\prospectscontroller.ph...

c - Finding substring with equal number of characters -

for problem need find number of substrings of string number of repetitions of each character should same. given string consists of 3 characters(a,b,c). i make algo of o(n^2). for(;i<len;i++) { if(s[i]=='a') ac++; else if(s[i]=='b') bc++; else if(s[i]=='c') cc++; for(k=i+1;k<len;k++) { if(s[k]=='a') ac++; else if(s[k]=='b') bc++; else if(s[k]=='c') cc++; if(ac==bc && bc==cc) {count++;} } ac=0;bc=0;cc=0; } it takes long time calculate longer strings(for in range of 10^5). please in getting better solution. if willing implement hash map in c, can solve in believe o(n). keep normalised count of , bs. normalised mean c count in zero. c count implied, because string contains as, bs , cs , current string length must therefore + b + c. start hash map count of 1 (0, 0) count. pass through string once. when pass a, increment count. when pass b, increment b count. when pass c, decremen...

c++ - Pimpl idiom + moving? -

what standard way it? let's have class a has data member std::unique_ptr<impl> m_impl . for example, should class a's move assignment operator's contents this? m_impl = std::move(other.m_impl); or this? *m_impl = std::move(*other.m_impl); the first case more efficient second. raise few issues. after moving, m_impl data member of other nullptr. should moved-from object throw exceptions when it's being used or let user run runtime errors due dereferencing nullptr? for thread-safe classes mean m_impl usage needs synchronized. not sure if calling std::unique_ptr 's move constructor/assignment operator thread-safe or not. the former. when using unique_ptr , doing because object isn't copyable and/or movable in first place. moving pointee not option. after moving, m_impl data member of other nullptr. that correct moved-from std::unique_ptr . needs support destruction , reassignment , else undefined , not matter (segfault in ...

Problems with Drawer Navigation in Android -

i using drawer navigation provide android developer website. things have 1 of menubar @ bottom when slide sliding menu out cover bottom menubar, , problem. plz help you can translate menu : public void ondrawerslide(view drawerview, float slideoffset) { float movefactor = (yourdrawer.getwidth() * slideoffset); if (build.version.sdk_int >= build.version_codes.honeycomb) { if(drawerview.getright()==movefactor) { yourmenu.settranslationx(movefactor); } } }

iis - Removing Server version from Response Headers using URL Rewrite -

i have used information following post remove iis server verion reponse headers. http://blogs.msdn.com/b/varunm/archive/2013/04/23/remove-unwanted-http-response-headers.aspx add server variable create following outbound rule: though code works fine , url rewrite removing server version successfully, integration of same screwing couple of pages in legacy classical aspx website in: with url rewrite: fa 7 repcube 8a | default measure: 6b not set 4e | size: 84.28mb b3 65 c1 130 6 fy2014 bd 78 9 processed 76 6 actual 76 10 jan-14 dec-14 1 76 delete without url rewrite: repcube | default measure: not set | size: 84.28mb fy2014 processed actual 10 jan-14 dec-14 delete all data getting generated classical aspx page server side redirects in <% tags. can please me understand can problem same?

java - New String vs String s = "something" , what's the difference ? -

this question has answer here: what difference between “text” , new string(“text”)? 9 answers assign , create new string difference 4 answers consider code : public class strings { public static void createstr() { string s1 = new string("one"); string s2 = "one"; system.out.println(s1); system.out.println(s2); } public static void main(string args[]) { createstr(); } } what's difference between string s1 = new string("one"); , string s2 = "one"; ? string s1 = new string("one"); // created on heap , not interned unless .intern() called explicityly. string s2 = "one"; // created in string pool , interned automatically compiler. ...

Create image file from XML file in android during runtime -

Image
i have 2 activities in application working on @ moment. picture describes more. the red rectangle in activity represents particular child layout holds imageview s dynamically changed application runs , user assigns images image views . in activity b,the red rectangle image of red rectangle activity a(only red portion not whole layout file) along dynamically added images (i e screenshot of things inside red rectangle along red rectangle ). have been searching on internet solution , not find reasonable solution , tried screenshot goes not give right result. if have ideas how done kindly request opinion , answer . highly appreciated. thank in advance. though did not try think below link surely you. converting framelayout bitmap

UINavigationController push / pop bug on iOS 7.x when app is running in the background -

i have set uinavigationcontroller rootviewcontroller of mainwindow. i push , pop viewcontrollers code (so pushes , pops not triggered user interaction). when when applicaiton in foreground, everyhting works should. but when when application running in background, not correct viewcontroller shown. this issue reproducible on ios 7.x . a sample project can found under link : https://www.dropbox.com/sh/pmxnpgtrjxwehs7/_l3nw4xllf to reproduce issue, put app background , wait 12 second , return app foreground : when navigate using uinavigationbar's button, not navigationcontroller's rootview shown (as should) : background still green, , not yellow (the navigationcontroller's rootviewcontroller's background yellow). when app in foreground, tapping on button label "aaaaa" same navigation when it's done, gui in correct state. so in brief : works when app in foreground not work when app in background : dispatch_after(dispatch_time(dispatch_tim...

java - Passing object reference to a method -

this question has answer here: is java “pass-by-reference” or “pass-by-value”? 73 answers if employee reference made null in changedetails(), variable id value retained , nullpointerexception not thrown (code 1) may because pass copy of object's reference, in code 2 why variables value has changed code 1: public class javapassing { public static void changedetails(employee e) { e=null; } public static void main(string args[]) { employee emp = new employee("vishal",7); changedetails(emp); system.out.println(emp.id); } } code 2: public class javapassing { public static void changedetails(employee e) { e.id=9; } public static void main(string args[]) { employee emp = new employee("vishal",7); changedetails(emp); system.out.printl...

php - Resize Images (supports transparency) -

i need preview of image after upload.according me , better solution store thumbnails on server cache.however function using doesn't seems support transparency.it fill background black here function using <?php /** * resize image class allow resize image * * can resize exact size * max width size while keep aspect ratio * max height size while keep aspect ratio * automatic while keep aspect ratio */ class resizeimage { private $ext; private $image; private $newimage; private $origwidth; private $origheight; private $resizewidth; private $resizeheight; /** * class constructor requires send through image filename * * @param string $filename - filename of image want resize */ public function __construct( $filename ) { if(file_exists($filename)) { $this->setimage( $filename ); } else { throw new exception('image ' . $filename . ' can not found, try...

angularjs - How to send data to server from a select in a form -

i have controller: $scope.disciplines = disciplines; $scope.discipline = disciplines[0]; it's array. i have in form: <form class="form-horizontal" ng-submit="submit()" method="post"> <input type="text" name="prj_title" ng-model="project.prj_title" class="form-control" id="title"> <select id="discipline" class="form-control" name="prj_discipline" ng-model="discipline" ng-options="d d in disciplines"></select> <input type="submit" class="btn btn-block btn-success btn-lg" value="ansök"> </form> and post: $scope.submit = function(){ $http({ method : 'post', url : '/api/project', data : $.param($scope.project), // pass in data strings headers : { 'content-type': 'applic...

Unable to connect to MS SQL database using jdbc -

i'm trying connect ms sql 2008 database using jdbc below giving error class.forname("com.microsoft.sqlserver.jdbc.sqlserverdriver"); connection con = drivermanager .getconnection( "jdbc:sqlserver://vermdbhqd01:1433;databasename=irmreports", "irm", "1234"); my database name irmreports , instance name irm_dev . please advise how can provide both database instance name , database name in url. it says exception in thread "main" com.microsoft.sqlserver.jdbc.sqlserverexception: login failed user 'irm'. but when try login same user name , password db gui, getting logged in. wondering give details of database instance details in jdbc settings i had tried below dut doesnt work connection con = drivermanager .getconnection("jdbc:sqlserver://vermdbhqd01:1433;instancename=irm_dev;databasename=irmreports;user=irm;password=1234"); finally got wor...

c++ - codeblocks permission denied -

i can't seem c++ project working in codeblocks. the errors i'm receiving after trying compile: cannot find -lmingw cannot find -lsdl2main cannot find c:\c++libraries\mingw\sdl2-2.0.3\lib\64: permission denied. looking @ errors, see trying include sdl2. able compile programs without sdl2? if not, i'm guessing compiler isn't setup properly, in case link might you: setting codeblocks & mingw if have codeblocks , mingw (32 or 64) working , struggling including sdl2, might you: setting codeblocks & sdl2 if 100% sure both setup correctly , still exact same error, i'm assuming wrong file permissions, think it's 1 of first two.

jsf - How to move a primefaces iframe lightbox? -

i have make draggable/moveable lightbox iframe lightbox code: <p:lightbox id="draggable" iframe="true" width="910px" height="500px" style="overflow:none" widgetvar="dlg" iframetitle="flight"> <h:outputlink value="/airproject/flightbooking.xhtml" title="flight" styleclass="linkbutton"> </h:outputlink> </p:lightbox> tried this(for moving) <p:draggable for="draggable" /> and too: <script type="text/javascript"> $(function() { $( "#draggable" ).draggable(); }); </script> but these moving button not iframe popup. how drag/move iframe lighbox popup move p:dialog? assuming lightbox's widgetvar is: lightboxwv <script type="text/javascript"> $(function() { pf('lightboxwv').panel.draggable() }); </script> hope...

ruby - Rails Console goes crazy sometimes -

hi guys time now, sometime rails console goes crazy. seems not type or omit letters or move them around in sentence , i'll error messages because of that. tipically i'll exit console , have restart gitbash , trick not sure why? this happens when in rails console not anywhere else, ideas why? here sample error when went rails console , typed in u = user.new , hit enter happened: $ rails console dl deprecated, please use fiddle loading development environment (rails 4.0.3) irb(main):001:0> u = user.new syntaxerror: (irb):1: syntax error, unexpected '=' =sene ^ c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.3 /lib/rails/commands/console.rb:90:in `start' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.3 /lib/rails/commands/console.rb:9:in `start' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.3 /lib/rails/commands.rb:62:in `<top (required)>' bin/rails:4:in...

java - How to reduce Audio and Video file size while downloading from server in Android app? -

i need either play or download audio/video files hosted on server. while downloading, need file downloaded in compressed size. how achieve that? any appreciated. audio , video file formats typically employ compression already, can't further compression on them. news have nothing - current downloading mechanism includes compression!

c# - Fast way to remove some parts from string -

from following string string1 want remove before "am" , after "uhr" string string1 = "angebotseröffnung 27.03.2014, 11:00 uhr, ort: vergabestelle, siehe a)."; so @ end have string. "am 27.03.2014, 11:00 uhr" . i using code know not approach. can 1 me better options. string1 = string1.replace("angebotseröffnung", ""); string1 = string1.replace("ort", ""); string1 = string1.replace("vergabestelle", ""); string1 = string1.replace("siehe", ""); string1 = string1.replace("a)", ""); another option use regex.match. string output = regex.match(string1, "am.*uhr").value; but work if have am , uhr in string. depending on input may require am.*?uhr or (?:a|p)m.*?uhr regex.

javascript - Ember-Rails component -

i asked question wasn't answered, i'm trying ask in different way. let me start saying, created ember app using rails backend ember-rails gem. have done lot of research , find documentation conflicting , outdated. part of application works perfectly, i'm using story sort of function. however, when tried move on , create component application render line chart ran lot of errors , confusing outcomes. quite data not render @ all. error is uncaught error: <sample.chartview:ember344> handlebars error: not find property 'chart' on object (generated chart controller) my code on github.com/fatoblivion/sample my previous question: rendering ember component (google line chart) rails backend and if know current , up-to-date rails/ember tutorial components lot.

Insert PHP Code In PHP Variable -

i have simple question, how insert php code in php variable? example : echo $value = " bla bla <?php $q = "select * bla bla"; ?> "; you can using eval() $test = <<<end <p> <?php echo time(); ?> </p> end; ob_start(); eval("?>$test"); $result = ob_get_clean(); or other example w3s: <?php $string = "beautiful"; $time = "winter"; $str = 'this $string $time morning!'; echo $str. "<br>"; eval("\$str = \"$str\";"); echo $str; ?> will print this $string $time morning! this beautiful winter morning! source but carefull when use it, php page: caution eval() language construct dangerous because allows execution of arbitrary php code. use discouraged. if have verified there no other option use construct, pay special attention not pass user provided data without validating beforehand.

ios - Navigate to particular view controller when user tap the notification IOS7 -

hi have added push notification in application , want view particular viewcontrollers when user tap notification. in app delegate m file i'm trying register device token server , server i'm using php script device token server , i'm sending notification. the problem here i'm trying view particular view controller when user taps on notification not working have tried many different methods nothing had worked. here i'm view popup send notification app when user trying install application first time. - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { [[uiapplication sharedapplication] registerforremotenotificationtypes:(uiremotenotificationtypealert | uiremotenotificationtypebadge | uiremotenotificationtypenone)]; return yes; } - (void) clearnotifications { [[uiapplication sharedapplication] setapplicationiconbadgenumber: 0]; [[uiapplication sharedapplicat...

Using breeze to do change tracking -

i new breeze , looking working example change tracking. want enable or disable save button if there changes on page. want have same functionality creating dirty flag in knockout. on breeze website saw article change tracking couldnt follow much. appreciated. have googled lot couldnt find example. the breeze website has documentation on change tracking , knockout data binding , you've seen those. to see in action, @ temphire sample . example, details view uses cansave observable property exposed details viewmodel .

css - Is HTML label a replaced element? -

first, definition of replaced element from w3 : replaced element an element content outside scope of css formatting model, such image, embedded document, or applet. example, content of html img element replaced image "src" attribute designates. replaced elements have intrinsic dimensions: intrinsic width, intrinsic height, , intrinsic ratio. example, bitmap image has intrinsic width , intrinsic height specified in absolute units (from intrinsic ratio can determined). on other hand, other documents may not have intrinsic dimensions (for example, blank html document). user agents may consider replaced element not have intrinsic dimensions if believed dimensions leak sensitive information third party. example, if html document changed intrinsic size depending on user's bank balance, ua might want act if resource had no intrinsic dimensions. the content of replaced elements not considered in css rendering model. it ...

Popup window in android WebView -

i using webview open link in app. link works fine in webview when clicked on item of webview(link opened) open popup app got crashed. , gives me error . 03-24 16:40:10.680: w/system.err(5798): android.view.windowmanager$badtokenexception: unable add window -- token android.app.localactivitymanager$localactivityrecord@421e0760 not valid; activity running? 03-24 16:40:10.680: w/system.err(5798): @ android.view.viewrootimpl.setview(viewrootimpl.java:536) 03-24 16:40:10.680: w/system.err(5798): @ android.view.windowmanagerglobal.addview(windowmanagerglobal.java:259) 03-24 16:40:10.680: w/system.err(5798): @ android.view.windowmanagerimpl.addview(windowmanagerimpl.java:69) 03-24 16:40:10.680: w/system.err(5798): @ android.app.dialog.show(dialog.java:286) 03-24 16:40:10.690: w/system.err(5798): @ com.android.org.chromium.content.browser.input.selectpopupdialog.show(selectpopupdialog.java:217) 03-24 16:40:10.690: w/system.err(5798): @ com.android.org.chromium.c...

java - how to repaint the data of the JTable -

i have write following method create table when ever called every time list of task different table cannot change value of table public void displayalltaskbyprojectid(task[] task) { system.out.println("success call"); /** * table display tasks related selected project , timer * */ tbltasklist = new jtable(); log.info(" here"); int length; defaulttablemodel dm = new defaulttablemodel(0, 0) { private static final long serialversionuid = 1l; public class getcolumnclass(int column) { return getvalueat(0, column).getclass(); }; public boolean iscelleditable(int row, int column) { switch (column) { case 5: return true; default: return false; } }; }; dm.firetabledatachanged(); string header[] = new string[] { "prority", "task title", "start", ...

github - Atom - Change indentation mode -

Image
i haven't been able figure out yet. atom seems use spaces default indentation mode. prefer have tabs instead though. sublime text has built in functionality switching , converting indentation. anyone found out how change indentation mode of atom? some screenshots sublime text: see soft tabs , tab length under settings > editor settings . to toggle indentation modes can use ctrl-shift-p , search editor: toggle soft tabs .

javascript - How to show current location of multiple users on webpage? -

i working on website requirement show current locations of multiple users on pc. location needs show on pc website , users location needs fetched gps enabled mobile (android or iphone). there way can see current position of particular mobile device(android or iphone) on pc webapge? please , me achieve using js simply make them sign account, , have kind of user id. have logic user can upload & update location in site, save location id (alongside time stamp) in database, , create map, , load data database , show different users in map. then decide whether timestamps information used disqualify location, , how want refresh map.

vb.net - Edit DataGridView during Runtime and Update Database -

i working on vb.net. in windows form have datagridview control , modify button. want modify cell/row datagridview in sql server 2008. plz suggest me simple code this. on cellclick event of datagridview can fetch value identifying record uniquely (primary key). here code sample id = datagridview1.rows(e.rowindex).cells(0).value ' here 0 cell index having primary key then on button click event can fire query of update or delete passing id argument. after can load datagridview again.

ios - What happens if we don't check for "if (self)" in init methods? -

this question has answer here: in objective-c why should check if self = [super init] not nil? 9 answers i started code done our senior, found init method have code -(id)init method. used code following ways. code below used viewcontrollers. self = [super initwithnibname:@"viewcontroller" bundle:[nsbundle mainbundle]]; return self; what use of if(self) , self in part? //and in viewcontroller contains. self = [super initwithnibname:@"viewcontroller" bundle:[nsbundle mainbundle]]; if (self) { //do stuff } return self; when access instance variables in methods code equivalent addressing them via self pointer: - (void)method { ivar = 1; // following line executed: self->ivar = 1; } so if reason self pointer nil , access ivars in init method, application crash try derefenrence null poin...

chef - How are people testing opsworks cookbooks? -

i have complex deployment of dynamically configured instances of rail apps on nginx using passenger use capistrano for. trying automate entire process on opsworks creating stack, layers, instances , dynamic app deployment. none of existing opsworks recipes come close need started own custom cookbooks. trying test them using test-kitchen , vagrant opsworks cookbooks have many custom dependancies used locally. seems stuck either re-inventing wheel using own recipes don't depend on opsworks cookbooks or trying test cookbooks on aws slow , expensive. is doing custom cookbook development on opsworks , if how testing it? using community cookbooks , if how painful have been working on opsworks? opsworks supports chef 11.10 , berkshelf ( http://berkshelf.com/ ) manage dependencies makes using custom cookbooks so. much. easier. i've been pretty happy test kitchen ( https://github.com/test-kitchen/test-kitchen ) vagrant & chef solo local testing. additionally can m...

python - Send message to LCD via Command Line argument using Raspberry Pi -

i have piece of code (from adafruit website) write chars lcd. there possibility of doing via command line arguments? thank in advance. code: #!/usr/bin/python adafruit_charlcd import adafruit_charlcd subprocess import * time import sleep, strftime datetime import datetime lcd = adafruit_charlcd() cmd = "ip addr show eth0 | grep inet | awk '{print $2}' | cut -d/ -f1" lcd.begin(16,1) def run_cmd(cmd): p = popen(cmd, shell=true, stdout=pipe) output = p.communicate()[0] return output while 1: lcd.clear() ipaddr = run_cmd(cmd) lcd.message(datetime.now().strftime('%b %d %h:%m:%s\n')) lcd.message('ip %s' % ( ipaddr ) ) sleep(2) the relevant code example is: #!/usr/bin/python adafruit_charlcd import adafruit_charlcd lcd = adafruit_charlcd() lcd.begin(16,1) lcd.message(somekindofstring) ...where somekindofstring message. doesn't writing arbitrary hard. if it's...

excel - Adding parts of a second to time -

i writing excel vba script, , add parts of second time extracted cell. i using time function divide content 2, , convert using time function, , add result current time. tt = time(0, 0, cells(1, 12) / 2) i type mismatch error, result of division not integer. what @ end perform following addition. newtime = timecurrent + tt is there alternative time function used in case ? consider: sub timeonmyhands() dim tt date tt = timeserial(0, 0, cint(cells(1, 12).value / 2)) msgbox format(tt, "hh:mm:ss.000") end sub assuming cell contains seconds simple number rather time value.

java - How to run Jetty with SPDY on JDK8? -

for few days have jdk8. have tried run jetty spdy server. in jdk8 there no npn support ends with: [qtp22068985-16-selector-serverconnectormanager@12e7b0e/1] warn org.eclipse.jetty.io.selectormanager - exception while notifying connection sslconnection@e1448a{need_unwrap,eio=-1/-1,di=-1} -> npnserverconnection@382d40{idle} java.lang.nosuchmethoderror: sun.security.ssl.handshakehash.<init>(zzljava/util/set;)v @ sun.security.ssl.handshaker.activate(handshaker.java:493) i have run npn-boot-1.1.6.v20130911.jar on classpath works newest jdk7. is there workaround on how run jetty spdy on jdk8? i implementer of npn in jetty. npn implemented modifying jdk classes lack of tls extension api in jdk. npn versions match strictly jdk version specified in documentation . for jdk 8 don't plan support npn. instead, support alpn successor npn, , backport alpn implementation jdk 7 too. the implementations alpn done in branch, not integrated yet in main jetty buil...

java - How to maintain qualtiy of the image downloaded from url to imageview and crop them to a circle? -

i using following code of 'android universal image loader' library, quality of image poor , many skipped frames in logcat, here code, please , how can improve it? private class downloadimagetask extends asynctask<string, void, bitmap> { imageview bmimage; public downloadimagetask(imageview bmimage) { this.bmimage = bmimage; } protected bitmap doinbackground(string... urls) { string urldisplay = urls[0]; // bitmap micon11 = null; imageloader imageloader = imageloader.getinstance(); bitmap bitmap = imageloader.loadimagesync(urldisplay); bitmap circlebitmap = bitmap.createbitmap(bitmap.getwidth(), bitmap.getheight(), bitmap.config.argb_8888); bitmapshader shader = new bitmapshader(bitmap, tilemode.clamp, tilemode.clamp); paint paint = new paint(); paint.setshader(shader); canvas c = new canvas(circlebitmap); c.drawcircle(bitmap.getwidth...

computer vision - OpenCV createsamples - invalid background description file -

i'm in opencv_root folder , running following command in win-x64: opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 40 -img absolute_path_to_positive_images_folder\car.jpg -bg absolute_path_to_project\negatives.txt -vec absolute_path_to_samples_folder\car.jpg.vec -num 125 my negatives.txt looks this: negative_images\city01_02.jpg negative_images\city01_04.jpg negative_images\city01_05.jpg negative_images\city01_06.jpg negative_images\city01_07.jpg this output: info file name: (null) img file name: absolute_path_to_positive_images_folder\car.jpg vec file name: absolute_path_to_samples_folder\car.jpg.vec bg file name: absolute_path_to_project\negatives.txt num: 125 bg color: 0 bg threshold: 0 invert: false max intensity deviation: 40 max x angle: 1.1 max y angle: 1.1 max z angle: 0.5 show samples: false width: 80 height: 40 create training samples single image applying distortions... invalid background de...

asp.net mvc - Type of Iqueryable at runtime -

i have method returns iqueryable result, result based on if else condition, if condition satisfies use "assetdetails" class object ,otherwise "userandclientdetails" object. here code: private iqueryable<?> getassetdetails(shareviewmodel item) { ... if (type == "video") { if (type == "video") { return meta in my.assets().oftype<model.video>() join content in my.contents() on meta.contentid equals content.id join channel in my.channels() on content.channelid equals channel.id meta.id == item.id select new assetdetails { contenttitle = content.title, channelname = channel.channelname, ... ...

jmeter - Response too large to be displayed -

in jmeter, have been experiencing "response large displayed. size: 340188 > max: 204800" error in response data in often. though have tried update "view.result.tree.max size 0. again facing same issue. in user.properties file add this: view.results.tree.max_size=0 case important, , _ not . in max_size restart jmeter that's it

c# - Loading a button, loses functionality -

edit.: here projekt http://www.fast-files.com/getfile.aspx?file=71686 the project i'm working on wants easy manage protocol creator. can create dynamic text fields. 1 row description of the content other row content itself. 2 row has button works traffic light because of number of reasons. i'm @ point "alpha" of thing finished can save , load problem functionality of button gets lost is, assume because, doesn't saves reference event handler. namespace ampelthingy { public class load { public void loading() { streamreader sr = new streamreader(@"aa.xaml"); string text = sr.readtoend(); sr.close(); stringreader stringreader = new stringreader(text); xmlreader xmlreader = xmlreader.create(stringreader); stackpanel wp = (stackpanel)system.windows.markup.xamlreader.load(xmlreader); ((mainwindow)system.windows.application.current.mainwindow).sp2.children.clear(); // clear existing children foreach...

How to make fullcalendar to get current month events only? -

i using fullcalendar plugin , display holidays of month via ajax. problem having, method retrieves holidays accepts year , month parameter, not date range. when using month view of fullcalendar, start , end parameter ranges feb 23rd , apr 6th. need range mar 1st mar 31st. way, can year , month part call method. this tried without success: $('#calendar').fullcalendar({ monthnames: ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], monthnamesshort: ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], daynames: ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'], ...

ajax - Infinite Scrolling with wookmark plugins scrolling -

with ref. above subject, using wookmark plugin scroll our home page data dynamically….i have studied tutorial provided on wookmark , m using exact script provided wookmark , working fine shorts of not 100% working. things stucks when reaches @ bottom of window press arrow key, loads products again , happens randomly time scrolls , time stucks , if presses arrow key starts working again. kindly me out m going wrong. kindly provide me easy working script same. i m using following code : (function ($) { $('#main').imagesloaded(function () { var handler = null; // prepare layout options. var options = { itemwidth: 200, // optional min width of grid item autoresize: true, // auto-update layout when browser window resized. container: $('#main'), // optional, used css styling offset: 20, // optional, distance between grid items outeroffset: 20, // optional dis...

How to reorder output of shortcode -

i have following shortcode part of theme using: //contactform shortcode function contactform_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( 'class' => 'content' ), $atts ) ); $returncontent = '<div class="' . esc_attr($class) . '">'; $returncontent .= '<a href="#" id="info" class="open">contactinformation</a> <h5>get in touch</h5><div id="contactform"> <div id="response"></div> <form id="precision-contact-form" method="post" class="form"> <div id="main"> <p class="name"> <input type="text" name="uname" id="uname" /> <label for="uname" class="overlab...

javascript - Karma/Jasmine testing custom directive controller -

i'm trying test angularjs custom directive karma + jasmine. found way checking many references around web. solution doesn't appear correct way. let's first check example, test.js: angular.module("app", []) .directive("test", function() { return { restrict: 'e', scope: { defined: '=' }, templatefile: "test.html", controller: function($scope) { $scope.isdefined = function() { return $scope.defined; }; } }; }); describe("test directive", function() { var elm, scope; beforeeach(module("app")); beforeeach(module("test.html")); beforeeach(inject(function($rootscope, $compile, $injector) { elm = angular.element("<test defined='defined'></test>"); scope = $rootscope; scope.defined = false; $compile(elm)(scope); scope.$digest(); })); it("should not d...

https - Getting java.security.cert.CertificateException, however the certificate is imported into the truststore -

i receive a java.security.cert.certificateexception: no subject alternative names present exception, i've imported certificate trusrstore. here setup: i'm using small https server based on com.sun.net.httpserver.httpsserver . i've create keystore self signed certificate: keytool -genkey -keyalg rsa -alias mycert -keystore keystore.jks -storepass mypass -validity 360 -keysize 2048 i'm passing path , password keystore vm arguments djavax.net.ssl.keystore=/tmp/truststore.jks djavax.net.ssl.keystorepassword=mypass if run openssl s_client -connect 192.168.1.101:4443 can see uses right certificate. to trust certificate on client site, i've exported certificate server keystore , imported client truststore: keytool -export -alias mycert -file mycert.crt -keystore keystore.jks keytool -import -trustcacerts -alias -file mycert.crt -keystore truststore.jks for client use small test program using jersey. i'm passing path truststore vm argumen...

javascript - Add css class after 10 seconds without jquery -

how can add css class after 10 seconds without jquery? i want javascript in html code var elem = document.getelementbyid("div");//based on fabrizio's comment declare outside settimeout(function(){ elem.classname = elem.classname + " otherclass"; },10000);

java - error message : stream closed -

upon running following code under class flightsearch string moresearch = "y"; list<flight> resultlist; // load initial flight data db if (!init()) { return; } // background thread monitor changes in csv repository filelistner fl = new filelistner(); fl.start(); { inputstreamreader isr = new inputstreamreader(system.in); bufferedreader br = new bufferedreader(isr); // main thread gets input input inputquery = new input(); try { inputquery.getquery(); } catch (invalidexception e1) { e1.getmessage(); } { fl.stopthread(); } // main thread starts processing task background monitors csv // repo queryprocessor processor = new queryprocessor(); resultlist = null; resultlist = processor.matchquery(inputquery); displayresult(resultlist, inputquery.getflightclass()); system.out ...