Posts

java - Why does ObjectOutputStream.writeObject not take a Serializable? -

why objectoutputstream.writeobject(object o) not take serializable ? why taking object ? this because writeobject in objectoutputstream overrides the method in the objectoutput interface not require object serializable . the objectoutput interface specifies methods allow objects written stream or underlying storage, may achieved process other serialization. objectoutputstream implements functionality, requires serializable objects. however, cannot modify signature of interface implements.

php - Nginx, Wordpress and URL rewriting problems -

trying nginx , wordpress play nicely seems don't understand each other quite yet, in terms of pretty urls , rewriting. i have following snippet in config file nginx @ bottom (got nginx's wiki page on wp), , keep getting error message in error log, makes me think it's not trying rewrite location. 2011/04/11 09:02:29 [error] 1208#1256: *284 "c:/local/path/2011/04/10/hello-world/index.html" not found (3: system cannot find path specified), client: 127.0.0.1, server: localhost, request: "get /2011/04/10/hello-world/ http/1.1", host: "dev.local:83" if can give me direction or pointers or links or suggestions, amazing because i'm stuck. thanks! nginx worker_processes 1; pid logs/nginx.pid; events { worker_connections 64; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; #gzip gzip on; gzip_http_version 1.0; gzip_comp...

java - Access EJB from Application Client (project configuration) -

i know has been asked before, can't find answer so want have client application calls remote ejbs. for have 2 ear applications. 1 ear ejb module, , ear application client module. in client module trying inject in main() class ejb @ejb annotation. application.xml ejb: <?xml version="1.0" encoding="utf-8"?> <application xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com /xml/ns/javaee/application_5.xsd" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns /javaee/application_5.xsd" id="application_id" version="5"> <display-name> mppl4_server</display-name> <module> <ejb>mppl4_serverejb.jar</ejb> </module> </application> application.xml app-client: <application <display-name> ...

c# - Color framed text in WPF -

what approach can taken, if not built in anyway, frame text of textblock color? instance white text black borders. convert text geometry a geometry can drawn using stroke (outline) , fill (inner brush) see page examples

objective c - Monitoring End of an Item in AV Foundation Framework (Notification in wrong thread) -

when playing video avplayer ( avqueueplayer ) trying monitor when video( avplayeritem ) done playing. tried add observer avplayeritemdidplaytoendtimenotification nsnotificationcenter . don't notification. documentation tells : important: notification may posted on different thread 1 on observer registered. i know notifications posted in same thread observer registered can fetched. how suposed solve this. im registering observer om main thread since not posted notification guess because avplayeritem post notification in different thread. the documentation warns me, can't find information of how handle this. if posted notification in own code use performselectoronmainthread . it's not can modify avplayeritem class. nether see smart way of extending avplayeritem categories nor subclassing post notification in right thread.

c# - Grab innertext from an anchor serverside -

how can grab <a> inner text? there html helpers work serverside asp.net webforms? (this not mvc app) method() { string trackingnumber = database.gettrackingnumber(); extracttext(trackingnumber); } string gettrackingnumber() { return "<a href=\"#\">textineedtoextract</a>" } extracttext(string somehtml) { //need way innerhtml <a>. html not formed. } update trying avoid adding more package dependencies. can jquery used serverside handle situation? htmlagilitypack it's available nuget repository

java - Hibernate :Cannot add or update a child row: a foreign key constraint fails -

i have issue : cannot add or update child row: foreign key constraint fails ( bytecodete . company_links , constraint fk_company_links_1 foreign key ( id ) references company ( iduser ) on delete cascade on update cascade) but don't understand happens, post tables here: //user table drop table if exists `bytecodete`.`user`; create table `bytecodete`.`user` ( `id` int(11) not null auto_increment, `email` varchar(255) not null, `password` varchar(255) not null, `type` tinyint(1) unsigned not null, primary key (`id`), unique key `email` (`email`) ) //company table drop table if exists `bytecodete`.`company`; create table `bytecodete`.`company` ( `iduser` int(11) not null, `fantasyname` varchar(55) not null, `corporatename` varchar(55) not null, `cnpj` varchar(14) not null, primary key (`iduser`), unique key `cnpj` (`cnpj`), constraint `company_ibfk_1` foreign key (`iduser`) references `user` (`id`) on delete cascade on updat...