Posts

Showing posts from February, 2010

weblogic12c - set JMS redelivery limit in weblogic -

Image
i using jms in weblogic. if mdb throws exception, message redelivered. problem trying fix set message redelivery limit. because message deleivery not stop. goes on 300 times until delete entire deployment. have done set message redelivery in jboss, new weblogic, , want set redelivery limit queue alone. i have looks @ post here : https://docs.oracle.com/cd/e24329_01/web.1211/e24387/implement.htm#jmspg233 did not help. where set max number of times message should delivered ? thanks redelivery limit on weblogic 12c default -1, means try 2147483647 times before give up. try lower value 10, maybe. you should search tab inside queue , change default value redelivery limit. hope helps !

linux - how can i set a terminal in context-free grammar with a value by using Perl language -

i have file scirules.in when defined nonterminal symbol manually , example in file have : ... sci_person chemist sci_person physicist sci_person information theorist sci_a_fact work of sci_country sci_person sci_source ... my objectif use database postgresql stock different terminal (chemist,physicist,information theorist) , change file scirules.in using perl language set sci_person random value database , generate latex file. problem how can integrate perl code in file scirules.in .

javascript - Three.js SpotLight class on an animating JSON mesh -

i'm trying grasp on three.js light classes. i've tinkered around three.js example in attempt 3d mesh model screen , add basic rotate animation it. how achieve static light source on moving object? light reflected object seems follow path along rotation. here's code: http://codepen.io/jagomez8/pen/bzbyez i've switched out various other light classes think issue lies in meshphongmaterial. when apply flatshading material renders desired result except flat gets.the relevant code on line 105. if ( ! detector.webgl ) detector.addgetwebglmessage(); var renderer = new three.webglrenderer(); var camera = new three.perspectivecamera( 35, window.innerwidth / window.innerheight, 1, 1000 ); var controls = new three.orbitcontrols( camera, renderer.domelement ); var scene = new three.scene(); var egg; var matfloor = new three.meshphongmaterial(); var matbox = new three.meshphongmaterial( { color: 0x4080ff } );

python - Change figsize in matplotlib -

it seems figsize option changes ratio of height width. atleast case when using jupyter notebooks. here example: import matplotlib.pyplot plt %matplotlib inline import numpy np plt.figure(figsize=(16,8)) plt.plot(np.arange(1,10),np.arange(1,10)) plt.show() plt.figure(figsize=(24,6)) plt.plot(np.arange(1,10),np.arange(1,10)) plt.show() i hoping figsize intended inches, not relative ratio. how go enforcing in python/ jupyter notebooks. after change figsize figure size changed when parameter in range.in condition,size not growing after size above (24,8).when it's still below range size increase.it's base on displayer dpi , can set dpi in figure it's rely on hardware. figaspect set matplotlib.figure.figaspect if save figures files use savefig ,you see image size increase also.

eclipse - programmatically find the repository URL of a project -

i want programmatically find repository given project in eclipse connected to. have 3 java projects in eclipse, project -- connected svn repository - url - svn://localhost/prja , project b -- svn://localhost/prjb , project c -- svn://localhost/prjc. given "projecta" -- want url connect to.please suggest way information... look @ this page information implementing what's called repository provider eclipse. there's repository provider each version control "product": there's 1 git, 1 svn, etc. basically there 2 times when provider gets called - when eclipse project gets associated provider , when project becomes disassociated provider. it's @ first point such things repository url stashed away in provider-specific means. to answer question, you'll have know how provider(s) associated projects stash association metadata away. that's how , code info want.

PHP Mysql WHERE clause not working -

i have query below doesn't seem work. in 1 blow wanted update rows who's current price not equal temporary price. want column prevprice copy or same column currprice. it not give errors, never updates prevprice. $previousprices = mysqli_query($conn,"update allproducts temporaryprice != currprice set prevprice=currprice"); set comes before where update allproducts set prevprice = currprice temporaryprice != currprice and, yes, != valid mysql: http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_not-equal

Asynchronous threading using python -

i learning multithreading in python , don't understand why thread isn't acting asynchronous. here code. def send_email(): .... thread1 = threading.thread(name='thread1',target=send_email) thread1.start() return 'email sent' i don't understand why, thread1 waiting until target completed , coming next line. need understanding this.

excel - Inserting Contents of Range of Cells Into Another Range -

i working on setting column of cells in excel , each cell in column pull data multiple columns of cells sheet, each cell having one-on-one relationship each other. instance, have column on sheet 1 , automatically populated data in column , column b on sheet 2 (once column runs out of data). if of data changed on sheet 2, changes updated on sheet 1. if item added, automatically inserted on sheet 1. possible using standard formulas or array formulas, or need use macros or vba? suggestions appreciated. thank in advance. either copy formula such if(isblank(sheet2!a2),"",sheet2!a2+sheet2!b2 down greater number of rows you're need. or write macro run each copy formula you. lr = sheets("sheet2").usedrange.specialcells(xlcelltypelastcell).row sheets("sheet1").select range("a2").select selection.copy range("a3:a" & lr).select activesheet.paste

fortran - Printing/writing a nested derived data type -

i obtained following module colleague. trying make program returns data in derived data types. not have experience derived data types. tried program table (end of file) not able anything. how can print or write derived data type? c======================================================================= module mod_asoscommdates c======================================================================= implicit none integer, parameter :: ncommdates=2 type asosdata character (len=40) :: city character (len=60) :: location character (len=2) :: state integer :: iwban character (len=4) :: intcall character (len=3) :: usacall real :: ddlat real :: ddlon character (len=8) :: commisdate character (len=3) :: pub character (len=3) :: sitetype real :: anem_feet real :: anem_meters end type asosdata ty

How to resolve circular dependency of nested type in C++? -

for code like: // forward declaration: error c2653: 'b': not class or namespace name // without forward declaration: error c2027: use of undefined type 'b' struct b; struct { using size_t = int; typename b::size_t index; }; struct b { using size_t = char; typename a::size_t index; }; void main() { a; b b; } class , b reference nested types size_t of each other. but forward declarations class a; works classes declared in current scope or outer scope. so how resolve circular dependency without changing semantics of code ? solving easier case forward declaration, or java , c# not kind of circular dependency problem? p.s. thankes galik's suggestions, original example in question template <typename t> class { using iterator = t*; b<t>::iterator iter; }; template <typename t> class b { using iterator = t*; a<t>::iterator iter; }; contains other bugs iterator inaccessible private

javascript - Not able to pass ng-repeat value into custom directive from table? -

i want pass ng-repeat value table directive, not working. in custom-elememt directive, want pass ng-repeat value it, not take ng-repeat value. if try same thin in div working, why not able pass ng-repeat value customer directive table. not working <tbody ng-repeat="entry in entries track $index"> <tr> <td> {{ entry.id }}></td> <td>{{ entry.name }}</td> </tr> <products-table products="entry.products"></products-table> </tbody> working <div ng-repeat="entry in entries"> <products-table products="entry.products"></products-table> </div> please find demo http://plnkr.co/edit/dfmvhm6cozts1piglot3?p=preview put directive within table cell. <tbody ng-repeat="entry in entries track $index"> <tr> <td> <products-table products="entry.products"&

dependency injection - Spring injecting one reference bean into another reference bean -

in below spring configuration snippet, injecting reference of "somemanager" bean "someworker" , "somelocal". reference of "somelocal" injected "someworker". my doubt is possible inject same reference of "somemanager" injected "someworker" bean, here in "somelocal". problem if inject separately "someworker" , "somelocal" unnecessarily there 2 instances of "somemanager" not required in scenario "somelocal" referred within "someworker" <bean id="someworker" class="com.test.worker.someworker"> <property name="somemanager" ref="somemanager" /> <property name="somelocal" ref="somelocal"/> <bean id="somelocal" class="com.test.local.somelocal"> <property name="somemanager" ref="somemanager" /> </bean> <b

java - How to add user input into an array -

this parent class public class holding { private string holdingid, title; private int defaultloanfee, maxloanperiod, calculatelatefee; public holding(string holdingid, string title){ this.holdingid = holdingid; this.title = title; } public string getid(){ return this.holdingid; } public string gettitle(){ return this.title; } public int getdefaultloanfee(){ return this.defaultloanfee; } public int getmaxloanperiod(){ return this.maxloanperiod; } public void print(){ system.out.println("title: " + gettitle()); system.out.println("id: " + getid()); system.out.println("loan fee: " + getdefaultloanfee()); system.out.println("max loan period: " + getmaxloanperiod()); } } this child class: public class book extends holding{ private string holdingid, title; private final int defaultloanfee = 10; private final int maxloanperiod = 28; public book(string holdingid, string title){

insert javascript in yii2 layout file -

i want insert javascript this link on navigation bar, here code in layout file. $useritems = []; if (yii::$app->user->isguest) { $useritems[] = [ 'label' => 'how works?', 'items' => [ ['label' => 'video', 'url' => ['/site/howto']], //i want insert javascript here ['label' => 'slide', 'url' => ['/site/index']], ], ]; $useritems[] = [ 'label' => 'support', 'items' => [ ['label' => 'faq', 'url' => ['/site/index']], ['label' => 'live chat', 'url' => ['/site/index']], ], ];

c# - I accidentally deleted the Window Form Designer generated code in form.designer.cs -

i accidentally deleted of contents in windows form designer generated code in form.designer.cs , right design form not update automatically. no matter toolbox added (label, textbox or any), still remains old form. how can solve this? you can't regenerate designer code, because designer ui reflects designer code , not vice-versa. when add designer through toolbox, designer code updated based on new design. there no possible way, afaik old designer unless you're using source control ( team foundation server , git , etc..) , have committed previous changes somehow. probably reason not update designer code manually next time.

ios - Customised UIActionSheet -

Image
how can customise uiactionsheet : also, if customise uiactionsheet , there chance of app getting rejected ? if want give go. can't guarantee it'll approved apple , honestly, it's not recommended ui , apple hig perspective. keep in mind uiactionsheet has been deprecated , it's recommended use uialertcontroller preferredstyle of .actionsheet that's example going use. import uikit class viewcontroller: uiviewcontroller { override func viewdidappear(animated: bool) { super.viewdidappear(animated) let controller = swiftdemoalertcontroller(title: nil, message: nil, preferredstyle: .actionsheet) controller.addaction(uialertaction(title: "reset default", style: .destructive, handler: nil)) controller.addaction(uialertaction(title: "save", style: .default, handler: nil)) self.presentviewcontroller(controller, animated: true, completion: nil) } override func viewdidload() {

TCP Python Socket Server Response -

i'm writing tcp python script act server , retrieve temperature reading machine (the client). need pass command client server , listen output of response. reach cmd definition line, when s.accept() called i'm left hanging no response client. server.py import socket port = 7777 ip = raw_input('192.168.62.233') s = socket.socket(socket.af_inet, socket.sock_stream) s.bind((ip, port)) s.listen(1) print "waiting on port: ", port while true: cmd = raw_input('krdg? a[term]')#command send client conn, addr = s.accept() s.send(cmd) print "it sent" data = conn.recv(4096) print "received:", data, " address ", addr edit: i believe you're correct, should consider code client , temperature readout @ server. left hanging after "here 2" when go s.recv(). client.py import socket ip = '192.168.62.233' port = 7777 # same port used server s = socket.socket(sock

mysql - rewrite queries from deprecated mysql_connect to PDO in PHP -

i rewriting code mysql_connect deprecated below work in pdo cannot work properly. no error showed. have tried could. can me deprecated mysql_connect <?php include('config.php'); ?> <?php if(isset($_post['page'])): $paged=$_post['page']; $sql="select * `users` qualify='po' order `uid` desc "; if($paged>0){ $page_limit=$resultsperpage*($paged-1); $pagination_sql=" limit $page_limit, $resultsperpage"; } else{ $pagination_sql=" limit 0 , $resultsperpage"; } $result=mysql_query($sql.$pagination_sql); $num_rows = mysql_num_rows($result); if($num_rows>0){ while($data=mysql_fetch_array($result)){ $userid=$data['uid']; $fullname=$data['fullname']; echo "<li><h3>$userid</h3><p>$fullname<p></li>"; } } if($num_rows == $resultsperpage){?> <li

c# - error MSB3027: Could not copy "C:\pagefile.sys" to "bin\roslyn\pagefile.sys". Exceeded retry count of 10. Failed -

every time getting error vs 2013 could not copy "c:\pagefile.sys" "bin\roslyn\pagefile.sys". exceeded retry count of 10. failed. unable copy file "c:\pagefile.sys" "bin\roslyn\pagefile.sys". process cannot access file please me. as indicated in this answer pramod's comment problem stems microsoft.codedom.providers.dotnetcompilerplatform nuget package, upgrading version 1.0.0 1.0.1 . for me however, downgrading using visual studio caused further build errors. solve problem had manually edit csproj , packages.config files, removing references microsoft.net.compilers , microsoft.codedom.providers.dotnetcompilerplatform . specifically, meant: removing relevant <import project="... sections versions of both libraries (usually towards beginning of csproj) removing <reference include="... sections both versions of both libraries removing <error condition="!exists(... sections both v

c - Create process and anonymous pipe -

update question: have been able create process , programs compiled. however, run new problem. when try pipe source program filter program. doesn't seem feed in input sink program. there no error message. have test of standalone program using pipe operator in windows' cmd. i'm trying small project learn anonymous pipe , create process. created 3 small standalone programs called source, filter, , sink. these 3 compiled , run fine. here's descriptions 3 standalone programs. source: obtains source text-file filename commandline, opens file,and reads , copies file contents 1 character @ time directly standard output(stdout). when file has been copied, source terminates (closing of open file handles). filter program not utilize filename commandline parameters. instead, filter reads text file standard input (stdin) , writes standard output (stdout) copy of input upper-case letters converted lower-case. filter must designed read 1 character, convert it, output it, ,

javascript - Angular table-sort and drag and drop table row conflict -

i using angular table-sort , angular drag-drop in project. when dragging row , trying drop row, table sort forcefully sort rows previous position. if remove table sort directive ts-repeat , drag , drop works perfectly. need default table column sorting "age" ascending. have made example on plunker better understanding. https://plnkr.co/edit/phltufpayfab4he8bn6y so, how prevent table-sort when drag , dropping row? can me solving issue? appreciate this. in advance. i think should rid of ts-repeat , , sort data (in service/controller). it's not bug, it's feature. imagine, remove , re-add element table, sorted. want keep sorted, right?

ionic2 - invalid name @angular/common : npm -

Image
i trying ionic2, getting error while trying install default npm packages ionic2. tried run following command , getting error below: npm install @angular/common like here also tried this solution getting same error. package.json file content: { "dependencies": { "@angular/compiler": "^2.0.0-rc.1", "@angular/core": "^2.0.0-rc.1", "@angular/http": "^2.0.0-rc.1", "@angular/platform-browser": "^2.0.0-rc.1", "@angular/platform-browser-dynamic": "^2.0.0-rc.1", "@angular/router": "^2.0.0-rc.1", "es6-shim": "^0.35.0", "ionic-angular": "2.0.0-beta.7", "ionic-native": "^1.1.0", "ionicons": "3.0.0", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.6", "zone.js": "^0.6

Display correct image with coffeescript fancybox-rails -

i have thumbnails, when click them image displayed in .big-img. use fancybox-rails display image in full-size. works great, problem selected thumbnail displayed fancybox. right path leads first image, no matter thumbnail displayed in big-img, first image displayed fancybox. html.erb <%=link_to (@product.images.first.url), :class => 'fancyframe', :rel => 'group' %> <div class="big-img"> <%= image_tag(@product.images.first.url) %></div> <% end %> <% if @product.images.count > 1 %> <% @product.images.each |image| %> <%= link_to image_tag((image.url), :class => 'thumb')%> <% end %> <% end %> js.coffee jquery -> $(".thumb").click -> val = $(this).attr("src") $(".big-img").html "<img src=\"" + val + "\" />" return false; jquery -> $(".fancyframe").fancybox type:

c# - How do I only get the year? -

i have following code: string ship = ""; foreach (htmlelement el in webbrowser1.document.getelementsbytagname("div")) if (el.getattribute("classname") == "not-annotated hover") { ship = el.innertext; int startpos = ship.lastindexof("ship date:") + "ship date:".length + 1; int length = ship.indexof("country:") - startpos; string sub = ship.substring(startpos, length); textbox3.text = sub; } this date textbox3. let's string sub may 19, 2013 , how year of string , take int? note: date changes! assuming extraction of date part sub correct existing cases, can use datetime.parse() parse date datetime , access year: int year = datetime.parse(sub).year;

rust - What is the advantage of using the same lifetime for multiple arguments? -

fn xory<'a>(x: &'a str, y: &'a str) -> &'a str { x } what advantage of above code on using 2 lifetimes? there situations in above code work, 2 lifetimes won't? it depends on use case. given exact code wrote: fn xory<'a>(x: &'a str, y: &'a str) -> &'a str { x } here disadvantage use 1 lifetime, because return value depends on x argument, not on y one. let's imagine user code: let x_in = "paul".to_owned(); let out = { let y_in = "peter".to_owned(); xory(&x_in, &y_in) }; we expect works fine, because out x_in . compiler complains: <anon>:12:22: 12:26 error: `y_in` not live long enough <anon>:12 xory(&x_in, &y_in) ^~~~ <anon>:13:7: 14:2 note: reference must valid block suffix following statement 1 @ 13:6... <anon>:13 }; <anon>:14 } <anon>:11:39: 13:6 note

windows runtime - How to generate secure random numbers under WinRT? -

this question has answer here: what cryptographically secure options there creating random numbers in winrt? 1 answer according windows api reference windows store apps , following security related classes available winrt application: windows.security.authentication.onlineid windows.security.authentication.web windows.security.credentials windows.security.credentials.ui windows.security.cryptography windows.security.cryptography.certificates windows.security.cryptography.core windows.security.cryptography.dataprotection windows.security.enterprisedata windows.security.exchangeactivesyncprovisioning i checked in windows.security.cryptography , windows.security.cryptography.core , , not locate secure generator (similar rngcryptoserviceprovider ). in addition, wincrypt stuff missing. how 1 generate secure random numbers under windows run

php - How to store a Rating -

im working on website display pictures, , pictures have 5 stars rating. the question is, where, or how can store rating of each pic. example: subject 1 gives 4 stars picture( how can store rating) subject 2 gives 2 stars picture. so picture have 3 start rating im using html, css, php, , mysql. is there way of storing in mysql rating? hope can me. save rating so: insert ranting (picture_id, user_id, ranting) value (1, 1, 5); and average, follows: select avg(ranting) ranting, count(ranting) total ranting picture_id=1;

Java generic return type (with similar input parameters) -

this questions close this , there major difference. may requirements: (1) want generate java function generic return value. (2) list of input parameters same. (unlike in link above ). (3) function shall know, type of return parameter expected. my tries: public <t> t getproperty(string name) { t value; try { if (t instanceof string) {value = (t) getstringproperty(name);} if (t instanceof long) {value = (t) getlongproperty(name);} if (t instanceof boolean) {value = (t) getbooleanproperty(name);} } catch (exception e) { logger.error("error @ getproperty", e); } return value; } this not working, since no instance of t generated. trys t value = new t(); failed. any quick fixes? or approach not recommended? what want not possible due type erasure of generics @ runtime. in other words <t> erased object in case. you can pass cla

java - Static synchronized methods and non-synchronized static methods confusion -

i have small confusion. please have @ code below. public class threaddemo { //non-static synchronized method synchronized void a(){ actbusy(); } //static synchronized method static synchronized void b(){ actbusy(); } //static method static void actbusy(){ try{ thread.sleep(1000); } catch(interruptedexception e) { e.printstacktrace(); } } public static void main(string[] args){ final threaddemo x = new threaddemo(); final threaddemo y = new threaddemo(); runnable runnable = new runnable() { public void run() { int option = (int) (math.random() * 4); switch (option){ case 0: x.a(); break; case 1: x.b(); break; case 2: y.b(); break; case 3: y.b(); break; } } } ; thread t1 = new thread(runnable); thread t2 = new thread(runnable); t1.start(); t2.start(); } }

java - I am getting an Exception while serializing an object -

the exception java.io.notserializableexception : com.mysql.jdbc.singlebytecharactersetconverter package business_logics; import java.util.arraylist; import java.util.iterator; public class purchase implements java.io.serializable { string client; int purchaseid; string issue; string due; arraylist<particulars> myparticulars=new arraylist(); string personal; double total; double otheramount; double previous; double grandtotal; string paymentmode; double paid; double cbalance; public purchase(int id,string client, string issue, string due,string personal, double otheramount, double previous,string payment ) { this.purchaseid=id; this.client=client; this.issue=issue; this.due=due; this.personal=personal; this.otheramount= otheramount*(-1); this.previous=previous; this.paymentmode=payment; } public void settransaction(double paid) { this.paid=paid; this.cbalance=this.grandtotal+this.paid; } public void setparticulars(arra

ios - Object parameter in method postNotification of NSNotificationCenter -

in ios application, posting nsnotification , catching in 1 of uiview in main thread. want pass information along notification. using userinfo dictionary of nsnotification that. [[nsnotificationcenter defaultcenter] postnotificationname:@"notifyvaluecomputedfromjs" object:self userinfo:@{@"notificationkey":key,@"notificationvalue":value,@"notificationcolor":color,@"notificationtimestamp":time}]; key, value, color , time local variables contains value need pass. in uiview adding observer notification , using notification.userinfo these data [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(receivenotification:) name:@"notifyvaluecomputedfromjs" object:nil]; -(void)receivenotification:(nsnotification *)notification { if ([notification.userinfo valueforkey:@"notificationkey"]!=nil && [[notification.userinfo valueforkey:@"notificationkey"] isequaltostring:se

magento - Decrease image size in product view page -

Image
we have backend condfiguration resize product images. set 850 * 850 our images. now in product view page images showing in large size, want reduce 350 * 350 size we using below code : <?php echo $dexxtz->getimagefeatured($this->helper('catalog/image')->init($_product, 'image')); ?> this same query asked in previous post, check previous post. need modify css etalage .etalage_thumb_image{height:350 !important; width:350 !important;}

java - how to add image or Logo in pdf Using Html Worker for Saving Html to Pdf in Jsp -

import java.io.file; import java.io.filenotfoundexception; import java.io.fileoutputstream; import java.io.ioexception; import java.io.outputstream; import java.io.stringreader; import com.itextpdf.text.document; import com.itextpdf.text.documentexception; import com.itextpdf.text.html.simpleparser.htmlworker; import com.itextpdf.text.pdf.pdfwriter; public class myclass { public static void main(string[] args) { string result = "<html><body><div>(i) recognised association shall have approval of forward markets commission established under forward contracts (regulation) act, 1952 (74 of 1952) in respect of trading in derivatives , shall function in accordance guidelines or conditions laid down forward markets commission; </div> <body> </html>"; try { outputstream file = new fileoutputstream(new file("e:\\test.pdf")); document document = new document(); pdfwriter.geti

android - Service does not give the correct Location -

i have service running in implement "location listener", create locationmanager this: lm = (locationmanager) getsystemservice(context.location_service); lm.requestlocationupdates(locationmanager.gps_provider,1000*2,0, this); and try make string on onlocationchanged(location location) this: route = string.valueof(location.getlatitude()) + "," + string.valueof(location.getlongitude()); the problem unless wait lot of time listener won't location updates, because gps_provider takes time ready. i have permissions in manifest feature, , ask gps enabled before starting service. is there option making app wait until gps ready? i want app wait until gps ready give locations, tell user he/she must wait until moment start.

javascript - MomentJS possible bug with the add() function -

i'd add several months in array cannot add() function of momentjs work properly. here's how goes : function getmonths(begin, end){ var cursor = moment(begin); var momentend = moment(end); var arraymonths = []; while(cursor.month() != momentend.month() || cursor.year() != momentend.year()){ cursor.add(1, 'month'); // adds 1 month cursor console.log(cursor.todate()); // because display cursor added month arraymonths.push(cursor.todate()); // cursor being pushed doesn't have added month console.log(arraymonths); // verified here } return arraymonths; } the console log shows cursor has been incremented (as add() mutator) proper value isn't added array. i cannot figure out if issue in code or if inherent momentjs. have clue ? thank ! the documentation todate says: to native date object moment.js wraps, use moment#todate.

ajax - How check WebBrowser completed fully? -

how check when webbrowser has completed? code doesn't work heavy ajax websites. fire before site has completed , return html code while javascript still running. i need check when website completed. code tested http://www.html5test.com procedure browser_documentcomplete(asender: tobject; const pdisp: idispatch; var url: olevariant); var curwebrowser: iwebbrowser; topwebbrowser: iwebbrowser; document: olevariant; windowname: string; begin curwebrowser := pdisp iwebbrowser; topwebbrowser := (asender tembeddedwb).defaultinterface; if (curwebrowser = topwebbrowser) , not browser.busy , (browser.readystate >= readystate_complete) begin fdocumentloaded:=true; end; end; a web page uses ajax loaded browser , executes javascript update / modify content. the client not know when "fully completed" state has been reached. javascript methods might run after delay, or periodically.

mysql - Does index work with view? -

assume have 2 tables: table1(id, attribute1, attribute2) , table2(id, attribute1, attribute2) id primary key of 2 table and have view: create view myview select id, attribute1, attribute2 table1 union select id, attribute1, attribute2 table1 can use advantage of index of primary key (in sql in general , mysql in case), when execute query following query ? select * myview id = 100 "can use advantage of index of primary key (in sql in general , mysql in case), when execute query following query?" mysql consider using indexes have been defined on underlying tables. cannot create index on view. check link mysql restrictions on views further explanation. using mysql explain on query using view show keys being considered under "possible_keys" column. explain select * myview id = 100;

regex - Data frame column vector manipulation -

i have dataframe mydf: content term 1 search term: abc| na 2 search term-xyz na 3 search term-pqr| na made regex: \search term[:]?.?([a-za-z]+)\ to terms abc xyz , pqr. how extract these terms in term column. tried str_match , gsub, not getting correct results. we can try sub sub(".*(\\s+|-)", "", df1$content) #[1] "abc" "xyz" "pqr" or library(stringr) str_extract(df1$content, "\\w+$") #[1] "abc" "xyz" "pqr" update if | found in string @ end gsub(".*(\\s+|-)|[^a-z]+$", "", df1$content) #[1] "abc" "xyz" "pqr" or str_extract(df1$content, "\\w+(?=(|[|])$)") #[1] "abc" "xyz" "pqr"

Fortran array pointers to scalar -

in fortran, can reshape arrays pointers: program working implicit none integer, dimension(:,:), pointer :: ptr integer, dimension(6), target :: trg trg = (/1,2,3,4,5,6/) ptr(1:2,1:3) => trg ! here, can use 6-sized 1d array trg ! or 2 3-sized 2d array ptr @ same time. ! both have same content (6 integers), indexed ! differently. write(*,*) ptr(1,2) end program working this program writes "3", according reshape rules. similarly, attempted same, not 1d 2d, 0d 1d. program not_working implicit none integer, dimension(:), pointer :: ptr integer, target :: trg trg = 1 ptr(1:1) => trg ! hoped able use scalar trg @ same time ! one-sized 1d array ptr. thought both have same ! content, indexed differently. write(*,*) ptr(1) end program not_working i expected see "1". not compile. gfortran 4.9 says: error: rank remapping target must rank 1 or contiguous @ (1) ifort 14.0.2 says: <file>.f

reverse engineering - ida pro sigstop android mediaserver -

i have debug libmedia.so on android 5.1 (lg g4) kernel 3.10. use ida pro 6.8. after i'm attached mediaserver process, in segment view, ida shows code segment of libmedia.so exact starting , ending addresses (controlled in /proc/pid/maps) routine's addresses of libmedia.so outside code segment of libmedia.so. ignoring , going on debugging, set breakpoint @ startinput routine, called when microphone needed. after setting breakpoint, ida returns: f75ec260: got sigstop signal (stop unblockable) (exc.code 13, tid 8552) the address 0xf75ec260 in libc.so , corresponds instruction: svc 0 has encountered problem? there anti-debug protection in android 5.1? in previous versions of android, there no problems debugging.

c# - use slash as parameter for action method in mvc -

i have 1 mvc application have 1 action method in home controller, below details: public actionresult index(int id) { //some value return view(); } now when run application in url put "localhost:1469/home/index/10" so 10 value should appear in id parameter of action method. below route code used: routes.maproute( name: "default", url: "{controller}/{action}/{id}", defaults: new { controller = "home", action = "about", id = urlparameter.optional } ); how achieve same?

c# - UWP ListView Drag item custom UI -

i'm building uwp app using c# , i'm having problems customize drag ui when i'm doing drag & drop listview. i'm using dragitemsstarting object set data want drag & drop, event doesn't allow customize ui. i've added dragstarting it's not being called, don't have chance modify drag ui. anyone has found problem? idea on how customize drag ui when using listview? i'm not sure if understand correct , particular case , requirements use default reorder behavior in list view: <listview x:name="mylistview" itemssource="{binding items}" reordermode="enabled" canreorderitems="true" allowdrop="true"> ... </listview> this code allows reorder existed items in listview . adding new items drag&drop need subscribe drop event on listview , add dropped item items collection should of type observablecollection<youritemtype> , assigned/bind listview.itemssource .

java - Change/Update JTable content with JComboBox(category) -

i have problem jtable. jtable displays content of database. 1 database table has name category. every category displayed in jcombobox. if click on category should update table content. here short snipped of code you, easier me. code should runable: (testclass - main) package test; import java.awt.borderlayout; import java.awt.gridlayout; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.util.linkedlist; import javax.swing.jcombobox; import javax.swing.jframe; import javax.swing.jpanel; import javax.swing.jscrollpane; import javax.swing.jtable; public class testclass implements actionlistener{ string[] header = {"head", "head", "head"}; object[][] data = {{boolean.false, "text", "text"}, {boolean.false, "text", "text"}, {boolean.false, "text", "text"}}; linkedlist<string> newdata = new linkedlist<string>(); string[] comb