Posts

Showing posts from March, 2011

powershell - Write-Host - Lose new line formating -

$output=$(dir) write-host $output the output have is: jboss-eap-5.1 jboss-eap-6.1 jboss-eap-6.1(2) middleware oracle testsymlinksjboss tomcata tomcatb was7.0 is there way have normal output this: echo $output directory: c:\servers mode lastwritetime length name ---- ------------- ------ ---- d---- 9/18/2012 10:33 jboss-eap-5.1 d---- 5/9/2013 1:10 pm jboss-eap-6.1 d---- 8/22/2013 11:33 jboss-eap-6.1(2) d---- 1/22/2013 2:29 pm middleware d---- 1/22/2013 2:25 pm oracle d---- 8/1/2013 2:43 pm testsymlinksjboss d---- 4/4/2013 4:25 pm tomcata d---- 7/22/2013 4:49 pm tomcatb d---- 10/18/2012 3:00 pm was7.0 i use write-host inside function (so don't want use echo ) reply write-host host no formatting. displays strings (or objects coercing ...

jquery - Fade in/out the hover for gallery box -

hello , sorry asking simple things! jquery noob , tough researched lot did not manage make simple effect work. i want child faded in on parent hover , fade out on mouseout. my other problem divs have same class , if show/hide childrens on hover effect applies other divs , bad... need way make jquery understand wich element hovered tough of them have same class. i not sure how explained made quick jsfiddle: http://jsfiddle.net/6nbbz/ and here jquery: $(".container").mouseover(function() { $("a").fadein("slow"); }); $(".container").mouseout(function() { $("a").fadeout(); }); thanks! you need study jquery's dom traversal methods , these in kind of situations need find elements relative other elments, in case want use find() select descendants of hovered element. also, instead of mouseover should use mouseenter handle hover event code runs once when mouse enters element, prefer use hover() 2 function argu...

actionscript 3 - 1120: Access of undefined property - moving functionality to external package -

hello dear stackoverflowers! here problem... i'm trying move basic functionality object external package. i've got movieclip item in library name mcunit: rectangle f8-ed in move clip. i'm setting linkage package want use: clgameunit; here part of clgameunit code: package { import flash.display.movieclip; import flash.geom.point; import flash.events.mouseevent; public class clgameunit extends movieclip { // declaring local object related variable var clgu:movieclip = new movieclip(); var isover:boolean = false; // declaring global object related variable public var b_u_selected:boolean = false; public var p_u_coordinates:point = new point(); public var u_image:int = 0; //declaring object related methods clgu.addeventlistener (mouseevent.click, on_object_lclick); clgu.addeventlistener (mouseevent.mouse_over, onobjectmouseover); clgu.addeventlistener...

python - save values in database using django -

i have custom form , whenever fetch form values save in database display error ( applicationform() got unexpected keyword argument 'job_title' ) , values not save in table. views.py :- def applicationvalue(request): if request.method == 'post': getjobtitle = request.post['jobtitle'] getintable = applicationform(job_title=getjobtitle) getintable.save() print getjobtitle return httpresponse(getintable) else: return render_to_response('registration/applicationform.html') my form :- <form method="post" action="#" class="form-horizontal" id="applicationform" name="appform"> <input type="text" id="u_jobtitle" class="input-xlarge" name="jobtitle" value=" " /> <button class="btn btn-gebo" type="submit" name="usubmit">save cha...

Related posts PHP affecting facebook comment box -

my related posts keeps changing facebook comment box. comment box change based on related posts shown. should focusing on comments current page. here's code below. <?php $categories = get_the_category($post->id); if ($categories) { $category_ids = array(); foreach($categories $individual_category) $category_ids[] = $individual_category->term_id; $args=array( 'category__in' => $category_ids, 'post__not_in' => $showed_posts, 'showposts'=>3, // number of related posts shown. 'caller_get_posts' => 1, 'exclude' => '$postid', 'orderby' => 'rand' ); $my_query = new wp_query($args); if( $my_query->have_posts() ) { echo '<ul>'; while ($my_query->have_posts()) { $my_query->the_post(); ?> <div class="relatedpost"> <a rel="external" href="<? the_permalink()?>"><?php the_post_thumbnail(array(175,98)...

javascript - How to include js.erb file in view folder -

i have javascript file use view. there needs ruby code in it, , need render in ruby, understand can't put javascript file in asset pipeline. can put in same view folder .html.erb file. how include javascript file, or use javascript file view file? tried javascript_include_tag in view (that uses asset pipeline apparently), using script src="myfile.js" myfile.js.erb file (but can't find myfile.js ), , names js.erb file ( users.js.erb ) same .html.erb file ( users.html.erb ), no avail. javascript_include_tag won't work js.erb declared in view folder itself. there 3 different ways can have javascript. 1] write code in view, i.e., in html.erb itself. 2] create js file in public/javascripts folder , include using javascript_include_tag. 3] in case want make request ajax: create js.erb in view folder same name of action. in view form created calling action, make request using :remote => true . in called action, use code follows, ...

android - Date Picker Dialogue . App crashes when i set Max and Min date -

i have date picker dialogue in if set max date , min date ,the app crashes. whereas if set min date or max date works fine.. me find out i'm going wrong. private void setdate(view c_c) { // todo auto-generated method stub final dialog dialog = new dialog(getparent()); dialog.setcontentview(r.layout.date_picker); dialog.settitle("select date"); datepicker calendarview = (datepicker) dialog.findviewbyid(r.id.date_picker_datepicker); try { log.d("***enc_date****",utility.getcurrentdate()+"*******"+utility.convertstringtomilli(utility.getcurrentdate())); calendarview.setmindate(utility.convertstringtomilli(utility.convertstringformat(commonobjects.patientsdtoencounter.getepisodedate()))); calendarview.setmaxdate(utility.convertstringtomilli(utility.getcurrentdate())); } catch (exception e) { e.printstacktrace(); } button button = (button) dialog.findviewbyid(r.id.btn_cancel_date...

c# - How to make a specific Tree Node to appear as a folder in a Tree View -

Image
how make specific tree node appear folder in tree view? creating dynamic tree view using table in database , based on 1 column i.e., nodetype having value (1 or 2), want either appear folder or normal tree node. pseudo code more beneficial. thanks in advance! you can put folder image in imagelist control , set imagelist property of treeview control imagelist , when creating nodes set imageindex of node desired index. treenode tn = new treenode(); if (imageshouldbefolderimage) tn.imageindex = 0; // if want show image other cases, // if want no image ignore else part else tn.imageindex = 1; update: if selecting node changes it's image undesirable image it's caused treeview's selectedimageindex property, suggest adding empty image imagelist , set nodes selectedimageindex. treenode tn = new treenode(); if (imageshouldbefolderimage) { tn.imageindex = 0; tn.selectedimageindex = 0; } else { ...

javascript - browser crashes after a few pagination applied in pageable collection -

i working backbone pageable collection extends backbone collection. i have paginator can move our pages in came pageable collection. i working upon server side mode of backbone pageable collection. the problem when paginate 5-6 times paginator . chrome crashes increases memory storing current collection. , perhaps not destroying stored collection. i doing following solve problem : this.collection.getpage(pageno).success(function(result) { this.collection.remove(); }); i expecting this.collection.remove() clear memory used. doesn't. above not solve problem. has find problem earlier? how did solved problem? it's hard without seeing paginator's code. anyway, first of calling this.collection.remove() nothing without passing argument model or array of model (see official documentation ). so suggest instead (assuming result contain valid array of models) this.collection.getpage(pageno).success(function(result) { this....

lisp - Use repl for Hy in Emacs -

i have installed hy-mode https://github.com/hylang/hy-mode . can open .hy file in emacs , have syntax highlighting, , editing paredit joy. i however, don't know how start repl. @ bottom of github readme, says: when in hy-mode, can launch hy repl launching lisp inferior process m-x lisp-inferior-process that function, however, not defined me. else need install or check able use repl hy? i using: gnu emacs 24.3.1. have tried set inferior-lisp-program "hy" , doing m-x run-lisp? this standard way (or maybe "way know about") of having inferior lisp process.

graph - How to show data graphically in Java? -

i developing application in java. got requirement show data in graphical form. in asp.net can use chart controls show data graphically. likewise, how can show data graphically in java. using eclipse ganymede. how show data graphically database. there many such libraries, of them listed in various posts such java library charts- jfreechart? . i used gral draw simple plots, perfect purposes. there examples of , feel on web site .

html - How to disable Safari Reader in a web page -

i'm curious know more triggers reader option in safari , not. wouldn't plan implement disable it, curious technical exercise. here i've learned far basic playing around: you need @ least 1 h tag it not go character count alone number of p tags , length probably looks sentence breaks '.' , other criteria safari provide 'reader' if, h tag, , following: 1 p tag, 2417 chars 4 p tags, 1527 chars 5 p tags, 1150 chars 6 p tags, 862 chars if subtract 1 character of above, 'reader' option not available. i should note character count of h tag plays part sadly did not realize when determined results above. assume 20+ characters h tag , fixed throughout results above. some other interesting things: setting <p style="display:none;"> p tags removes them count setting display none , , showing them 230ms later javascript avoided reader option too i'd interested if can determine in full. “you n...

php - Bootstrap row-fluid items collapsing -

Image
i can not understand why images starting second row start toppling , not appear in first row? <div class="container-fluid"> <div class="row-fluid"> <div class="span9 offset3"> <?php $step = 1; do{ echo <<<eof <div class="span4 {$class}" id="p{$rst_catalog['p_id']}"> <a href="pillow.php?p_id={$rst_catalog['p_id']}"><img src="images/{$rst_catalog['p_img']}" alt="img" title="{$rst_catalog['p_name']}" /></a> <div class="row"> <div class="span12"> <a href="pillow.php?p_id={$rst_catalog['p_id']}">{$rst_catalog['p_name']}</a> {$rst_catalog['p_rubric']} {$rst_catalog['p_price1']}.00 руб. </div> </div...

sorting - Sort alphabetically in rails -

how sort array in rails(alphabetical order). tried sort_by(&:field_name) but gives me array capital letter order , lower case order.i tried array.sort! { |x,y| x.field_name.downcase <=> y.field_name.downcase } is there way solve this? you should first downcase every string , sort like: array = ["john", "alice", "joseph", "anna", "zilhan"] array.sort_by!{ |e| e.downcase } => ["alice", "anna", "john", "joseph", "zilhan"]

wpf - ListView with ScrollViewer but no MouseWheelEvents -

Image
i have following list: these listview expanders listviewitems. listview in scrollviewer make right scrolling behaviour. problem mousewheel not working on list. here xaml: <window x:class="resourcelistexpanderstyle.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:converter="clr-namespace:resourcelistexpanderstyle.converter" title="mainwindow" height="350" width="525"> <window.resources> <converter:devicetypegrouptodevicelistconverter x:key="devicetypegrouptodevicelistconverter" /> <converter:integertobrushconverter x:key="integertobrushconverter" /> </window.resources> <dockpanel> <scrollviewer x:name="scrollviewer"> <listview x:name="outerlistview" itemssource="{binding devicetypegrouplistbyst...

java - aggregate in Mongotemplate or get Max value -

i have make query have several users differents dates, , need extractr every user more recent date, achieve make works mongodb console, cannot found way extrapolate java spring using mongotemplate or mongorepository. more clear imagine have rows, {userid:1, date:10} {userid:1, date:20} {userid:2, date:50} {userid:2, date:10} {userid:3, date:10} {userid:3, date:30} i need receive list of: {{userid:1, date:20}, {userid:2, date:50}, {userid:3, date:10} {userid:3, date:30}} the aggregate Ï use one db.table1.aggregate({$group:{'_id':'$userid', 'max':{$max:'$date'}}}, {$sort:{'max':1}}).result regards. you sort first date desc , select first while grouping userid final aggregation aggregation = newaggregation( sort(desc, "date"), group("userid").first("date").as("date") ); final aggregationresults<user> results = mongotemplate.aggregate(aggregation, "user", us...

java - not able to move mouse and capture gesture using Leapmotion controller in scala -

i'm trying use leapmotion jar replicate mouse motion gesture , hand movement, i've created 2 methods def executegesture(gesture: gesture) = { val robot = new robot(); gesture.match { case gesture.type.type_circle => { println("circle is") val circle = new circlegesture(gesture); if (circle.pointable().direction().angleto(circle.normal()) <= math.pi / 4) { // clockwise if angle less 90 degrees // robot.mousepress(inputevent.button1_mask) // robot.mouserelease(inputevent.button1_mask) // robot.mousepress(inputevent.button1_mask) // robot.mouserelease(inputevent.button1_mask) } else { } } case gesture.type.type_swipe => { val swipe = new swipegesture(gesture) if (swipe.direction().getx() > 0) { println("swipe right") } else { println...

linux - Is SIGCHLD dispatched on SIGTERM? -

the wikipedia page sigchld says: the sigchld signal sent parent of child process when exits, is interrupted , or resumes after being interrupted. does mean when parent process sends signal (such sigterm ) child process, in turn receive sigchld child? or misinterpret interrupt (i assume mean any signal received ), in case, signals concerned? a sigchld delivered parent in these cases: the child process exits. the child process stopped sigstop, sigtstp, sigttin or sigttou signal the child process resumed sigcont signal i presume sigstop/sigcont wikipedia means "interrupted". the default handler sigterm terminate process. if parent sends sigterm child process terminates child, yes - parent receive sigchld. if child installs signal handler not terminate it, there no sigchld signal delivered parent.

How to install library to external maven repository -

in company using archiva our maven repository. how can install there library not mavenized remotely ? in local repository can this: mvn install:install-file -d groupid=cz.i -d artifactid=sql-processor \ -d version=1.0 -d packaging=jar \ -d file=~/programy/cro/lib/sql-processor.jar when want add maven project our archiva, can run command: mvn:deploy . have no idea how install library there you're closer think - replace install:install-file deploy:deploy-file , add bit of sugar, can read here : mvn deploy:deploy-file -dgroupid=cz.i \ -dartifactid=sql-processor \ -dversion=1.0 \ -dpackaging=jar \ -dfile=~/programy/cro/lib/sql-processor.jar \ -drepositoryid=<id-to-archiva-map-on-server-section-of-settings.xml> \ -durl=<your-archiva-url> as - correctly - state, should used "non-mavenized" external artifacts, otherwise mvn deploy way go. cheers,

.htaccess - Apache mod_rewrite | RewriteCond doesn't work -

i own wordpress site, , have ddos attack on /wp-login.php. trying do, restrict access file mod_rewrite, no luck. more specific, trying do, allow access file, users using keywork google in query string. if keyword not exists, redirect user google web site. example: allow : http://www.my-site.ext/wp-login.php?google redirect : http://www.my-site.ext/wp-login.php http://www.google.com the htaccess using following, seem not works: <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewritecond %{request_file} \/wp\-login\.php rewritecond %{query_string} !google rewriterule (.*) http://www.google.com/ [r=301,l] </ifmodule> how can rewrite rule, in order allow above functionality work ? note: have try above rules without first rewritecond check requested file name, , redirection google prerformed normaly, limit redirection wp-login.php kind regards replace code with: <ifmodule mod_rewrite.c> rewriteengine on ...

json - Zend framework 2 - Dojo_Data -

in zend framework 2, way populate dojogrid store dojo_data in zf1 ? this code zf1 project need adapt zf2 : mycontroller : public function loaduseraction() { // ... retrieve db array of users $userlist = $dbuser->fetchall(); $usrobj= new zend_dojo_data("id_user", $userlist); $this->view->assign("users", $usrobj->tojson()); } myview : <div data-dojo-type="dojox.data.queryreadstore" url="<?= $this->url(array('action'=>'loaduser')); ?>" id="userstore"></div> thank support. zf2 has no in-built dojo-integration , appears no available zendservice_package either, you'll have manually javascript interaction.

javascript - jQuery .css function not working when window.location is used -

i have javascript function as: ($('.expand').parent().next().children('li')).click(function() { $(this).css('background','#aaaaaa'); window.location=($(this).children('a')).attr('href'); }); i getting background color in ios devices not working in samsung android native browsers. did came across issue. please advice. edited if use ($('.expand').parent().next().children('li')).click(function() { $(this).css('background','#aaaaaa'); }); without window.location getting background color want both bgcolor , redirection use backgroung-color instead of background: $(this).css({backgroundcolor: '#aaaaaa'}); or $(this).css('background-color', '#aaaaaa');

android - Wav file recorded using AudioRecord sounds speeded up and skips frames when replaying -

i using audiorecord read microphone data , randomaccessfile write wav file. code: public class mainactivity extends activity { audiomanager = null; audiorecord record =null; // audiotrack track =null; final int sample_frequency = 44100; final int size_of_record_array = 1024; // 1024 original final int wav_sample_multiplication_factor = 1; int i= 0; boolean isplaying = false; private volatile boolean keepthreadrunning; // private randomaccessfile statefile, statefiletemp, savtodisk; private randomaccessfile savtodisk; private filedescriptor fd = new filedescriptor(); private file delfile, renfile; string statefileloc = environment.getexternalstoragedirectory().getpath(); // keep hederwriter() happy private short nchannels = 1; private int srate = sample_frequency; private short mbitspersample = 16; // represents 16 bits of 1 pcm sample private int payload; class mythread extends thread{ priva...

c++ - Point Cloud Library: How to use pcl::addCoordinateSystem(double scale, const Eigen::Affine3f & t, int viewport = 0)) -

i cannot understand how set transformation t in function: pcl::addcoordinatesystem(double scale, const eigen::affine3f & t, int viewport = 0)) so question is: how can define eigen::affine3f ? i have rotation matrix , translation vector. having known rotation , translation matrix, 1 can combine them affine3f. eigen::affine3f tt; tt = eigen::translation3f(100.,300.,0.) * eigen::angleaxis<float>(theta,axis); note eigen::translation3f , eigen::angleaxis3f not matrices here of abstract type transform.

dynamically add footer or header in jquery mobile -

i want add footer dynamically in jquery mobile page.. <div data-role="page" id="homepage" data-theme="b" data-add-back-btn="true"> <div data-role="header"><h3></h3></div> <div data-role="content"> <ul data-role="listview" id="aaa"> </ul> </div> the tried add footer dynamically.. $('#homepage').append('<div data-role="footer" data-position="fixed"><i>copyright &copy; 2013</i></div>').trigger( "create" ); but doesn't work me. see fiddle $('#homepage').append('<div data-role="footer" data-position="fixed"><i>copyright &copy; 2013</i></div>').trigger( "pagecreate" ); i have used same code template of jquery website. css needs managed this. edit pointed in belo...

php - Website home page Load Issue -

my website home page takes more time load. when run website on,it disformed,images here , there time , after loading become ok. there 3 tables fetches data database(my sql, php).so have 3 select queries union. what should either keep queries on home page or should use ajax jquery populate it.? how can improve speed of app? i not need query again , again in hour,so can do? one query here select * abc union select * xyz measure part of code executing longest period of time. can printing html comment timestamp, go through page code. after know bottleneck , part need optimize. few general tips: measure time of sql queries. if long make sure have proper conditions , indexes use server-side paging grids many records you can use ajax load few parts of page in parallel. caching result of long running queries way caching preprocessed result of query better in cases best way write scratch

SQL Server: arbitrary auto-increment of primary key -

Image
this question has answer here: identity increment jumping in sql server database 6 answers we're running sql server 2012 sp1 x64 (11.0.3000.0) i have following table invoiceid field auto-incrementing, primary key: create table orders( invoiceid bigint identity(1001,1) not replication, orderid varchar(8) not null, ... -- other fields removed brevity constraint [pk_orders] primary key clustered (invoiceid) on [primary], ) new rows inserted though simple stored procedure following: set xact_abort on set nocount on begin transaction insert orders( orderid, ... -- other fields removed brevity ) values ( @orderid, ... ) select @newrowid = scope_identity() commit transaction the above sproc returns newly created ro...

c# - Best way to send image data to a server using WebClient -

i'm using webclient try , send image i've got on winform application central server. i've never used webclient before , i'm pretty sure i'm doing wrong. first of all, i'm storing , displaying image on form so: _screencap = new screencapture(); _screencap.onupdatestatus += _screen_caponupdatestatus; capturedimage = imjobj; imagepreview.image = capturedimage; i've set event manager update imagepreview image when ever take screenshot. displaying when ever status changes this: private void _screen_caponupdatestatus(object sender, progresseventargs e) { imagepreview.image = e.capturedimage; } with image i'm trying pass server so: using (var wc = new webclient()) { wc.uploaddata("http://filelocation.com/uploadimage.html", "post", imagepreview.image); } i know should convert image byte[] i've no idea how that. please point me in right direction of go doing properly? you can convert byte[] this public...

Read embedded pdf file in excel using Java -

i new java programming. current project requires me read embedded(ole) files in excel sheet , text contents in them. examples reading embedded word file worked fine, unable find reading embedded pdf file. tried few things looking @ similar examples.... didn't work out. http://poi.apache.org/spreadsheet/quick-guide.html#embedded i have code below, can in right direction. have used apache poi read embedded files in excel , pdfbox parse pdf data. public class readexcel1 { public static void main(string[] args) { try { fileinputstream file = new fileinputstream(new file("c:\\test.xls")); poifsfilesystem fs = new poifsfilesystem(file); hssfworkbook workbook = new hssfworkbook(fs); (hssfobjectdata obj : workbook.getallembeddedobjects()) { string olename = obj.getole2classname(); if(olename.equals("acrobat document")){ system.out.println("acrobat reader document"); ...

java - Not able to distinguish between hidden cells and others. Using POI 3.8 and xls/xlsx format -

not able distinguish between hidden cells , others. using poi 3.8 , xls/xlsx format. baserow.getzeroheight(), basecell.getcellstyle().gethidden(), basesheetx.getcolumnstyle(14).gethidden() return false though entire column hidden. please guide. if entire column hidden, excel mark column hidden on sheet. won't go through particular column index in rows , change cell styling make cells hidden, , won't go through column cell style either. try method sheet#iscolumnhidden(int) . get hidden state given column

html - Styling a disabled input with css only -

i have sort of strange situation. i'm trying style disabled input button because have annoying hover turning text white. makes confusing user because acting normal button. i have tried few things, css , few jquery things. keep in css if @ posable. this html, sorry in larvel form helper. {{ form::submit('change', array_merge($design_project->is_locked ? ['disabled' => 'disabled'] : [], ['class' => 'btn btn-blue span3'])) }} and browser generates <input disabled="disabled" class="btn btn-blue span3" type="submit" value="change"> and working on .btn:hover input[disabled], .btn:active input[disabled], .btn:focus input[disabled]{ color:green } any wonderful! use css ( jsfiddle example ): input:disabled.btn:hover, input:disabled.btn:active, input:disabled.btn:focus { color: green } you have write outer element on left , inner element on right. .btn:hover ...

c# - How to replace text in XML document with special chars? -

look @ end of post addition problem textboxes! with method want open document, replace text , leave alone. works, thats proud of. :d public static void replaceinopenxmldocument(string pfad, string zuersetzen, string neuerstring) { using (wordprocessingdocument doc = wordprocessingdocument.open(pfad, true)) { var res = bm in doc.maindocumentpart.document.body.descendants() bm.innertext != string.empty && bm.innertext.contains(zuersetzen) && bm.haschildren == false select bm; foreach (var item in res) { item.insertafterself(new text(item.innertext.replace(zuersetzen, neuerstring))); item.remove(); } doc.close(); } } but works on replacing without special characters . example: os replaced windows on 9000 [os] left is. case 1: in doc...

Amazon S3 PHP Stream Wrapper Set Public View Permissions for Image -

i'm using amazon php sdk s3 save images bucket. need make sure every image gets added publicly viewable, don't want add list accessibility. couldn't find way set @ bucket level propagated uploaded images. so, question is, how set permissions on image after move s3 can viewed in browser? my code looks this: require_once("aws/aws-autoloader.php"); // amazon s3 use aws\s3\s3client; // create amazon s3 client object $s3client = s3client::factory(array( 'key' => $amazonkey, 'secret' => $amazonsecret )); // register stream wrapper client object $s3client->registerstreamwrapper(); // save thumbnail $s3path = "s3://".$amazonbucket."/".$folderyear."/".$foldermonth."/"; $s3stream = fopen($s3path . $thumbnail, 'w'); fwrite($s3stream,$thumb_content); @fclose($s3stream); i need after image has been saved, how can make sure image publicly viewable bucket , folders not list cont...

port - After plugin multimedia centrum to LAN, DVR recorder stop working -

i upgrade home lan multimedia player xtreamer sidewinder3 , after connect xtreamer local net, see home security system down every time start play movie or other multimedia. security system works on dvr recorder , recorder plugged lan http login see real video cameras on browser. signal cameras comes dvr directly cable not on lan. http works on port 80 usual, changed port 81. no dhcp functions in dvr. xtreamer working on port 80 usual, configuration on browser. i changed ports on dvr recorder, because thought problem, after change nothing happen. lan configuration: - router gives address 192.168.1.xxx - address reserved in router via mac address thank jan after 1 week analyzing possibilities why not working found ir remote control of multimedia works on same frequency dvr. every time used remote control multimedia turn off dvr pressing 1 sequence of command.

c# - How to check if process is remotely started -

i run process on remote machine wmi. can check in process code (on remote machine) if remotely created? i tried process.getcurrentprocess() , process.getcurrentprocess().startinfo properties didn't find information. environment class doesn't contain info. my code use create remote process (i found on forum): var connoptions = new connectionoptions() { username = "user", password = "password" }; connoptions.impersonation = impersonationlevel.impersonate; connoptions.enableprivileges = true; var manscope = new managementscope(string.format(@"\\{0}\root\cimv2", "machinename"), connoptions); manscope.connect(); var objectgetoptions = new objectgetoptions(); var managementpath = new managementpath("win32_process"); using (var processclass = new ma...

java - Spring Custom Authentication Manager -

i using spring security authenticating users. have implemented custom authentication manager credentials , name blank in authentication manager here security xml <security:http auto-config="false" entry-point-ref="authenticationentrypoint"> <security:custom-filter position="concurrent_session_filter" ref="concurrencyfilter" /> <security:custom-filter ref="authenticationfilter" position="form_login_filter" /> <!-- <security:custom-filter after="concurrent_session_filter" ref="securefilter" /> --> <security:session-management session-authentication-strategy-ref="sas" /> </security:http> <bean id="authenticationfilter" class="org.springframework.security.web.authentication.usernamepasswordauthenticationfilter" p:authenticationmanager-ref="ahcauthenticationmanager...

javascript - (tornado)how can I pass argument to server when a button is pressed? -

i'm new python tornado.i'm building web site when want send argument server pressing button,i don't know how catch on tornado. how know button pressed ? a simple ajax request jquery can job : class application(tornado.web.application): """tornado web class. create routes used tornado_start""" def __init__(self): handlers = [ (r"/", index), (r"/explicit_action_url/", actionhandler) ] ... class actionhandler(tornado.web.requesthandler): def get(self): print("button click") class index(tornado.web.requesthandler): def get(self): self.render("index.html") and in index.html <button id="btn" type="button">click me</button> <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <script> $("#btn").click(function () { $.ajax({...

caching - Algorithm for Minimizing Number of Large Loads -

i have algorithm need compute pair-wise distances between large objects (where distance true metric, dist(a,b) == dist(b,a) , among other metric requirements). have around thousand objects, need calculate 500,000 distances. there few issues: all of these 1000 objects serialized, sitting in individual files on disk. reading them disk huge operation compared relatively trivial distance calculation. i can't have of them in memory @ same time without swapping, , thrashing. can fit 500 in memory @ time. this means @ point need re-read object memory, after having read , released memory @ point previously. so given reading disk bottleneck, , can't read in more half @ time, can think of algorithm reading , releasing these objects minimizes total number of reads? i considered reading in first half, doing of pair-wise distances, releasing of memory , reading second half, , doing of pair-wise distances. @ point, still need distances between objects in first half , objects i...

java - json data storage with versioning -

problem definition: there java server stores json data can mapped java class. java class subject changes. goal able update java class , still able decode json data of older version java object of newer version. there should versioning system in place. example ability add new field java class default value. in case old json data doesn't have field, java object can use default value of field. questions: i've seen gson , the versioning support limited. did miss something? there other libraries have better versioning support? how should 1 store json data? i see 2 options. option 1: can store json files (which have common structure if have same version) separately in folder. example have 2 files: json/j1.json , json/j2.json. option 2: can use nosql database such mongodb . have advantage on previous option? pointless ask basicdbobject in dbcollection since need able cast java class. option recommended case? maybe option better suited? there no bu...

asp.net mvc 4 - .NET: User.IsInRole not working from within Visual Studio -

Image
i have .net mvc 4 application uses windows authentication. want check whether user member of particular active directory group , if so, display additional menu option: if(user.isinrole("wellnessadmins")) { <li> <b>@html.actionlink("admin","admin","home")</b> </li> } when deployed server, works fine; admin link displayed. however, when launch application visual studio, admin link not displayed. local computer , server on same domain. why weird behavior? if using iis express make sure have enabled windows authentication , disabled anonymous authentication in properties of project:

php - New line chr in twitter feed breaks JSONP -

so have working twitter feed php app, if tweets newline in jsonp breaks. ive tried parse out newlines, using php eol tag, , \n \r , think of or google. when str_replace ("\n","", $data) nothing changes. when viewing jsonp newline still in there , jsonp not validate. ideas? merci!

object - Updating elements in an ArrayList in Java? -

i have following class: public class profile{ string name, age, location; } say have following code: arraylist<profile> profiles = somepopulatedarraylist; profile profile = profiles.get(1); profile.name = "new name here"; my question when have above, .name of object in arraylist getting updated, or creating new object here , changing .name of object while profile object stored in arraylist still has old name? i'm trying edit properties of objects in arraylist , i'm wondering if above approach correct or not? no new object created, modifying existing value. in fact not practice,you should allow access class variables directly, make them private , provide setter/getter methods same. public class profile { private string name, age, location; public string getname() { return name; } public void setname(string name) { this.name = name; } public string getage() { return age; ...

php - Wordpress: search error message in several languages -

i building multilanguage wordpress website, possible display different error message each language when search returns no results , how? thank :) it depends lot on plugins , template using. can sugest following link: http://codex.wordpress.org/translating_wordpress many modern templates come .po files allow easy internationalization of text elements such search , results looking for. same happens plugins, if follow practices should able translate/internationalize need.

java - Google preconditions illegal Argument exception -

Image
i using mahout create basic recommender may application. data set not have preferences. here's how table looks like here's how set mahout mysqljdbcdatamodel jdbcmodel2 = new mysqljdbcdatamodel(datasource,"user_viewed_song_statistics", "audio_fk","user_profile_fk","audio_fk","uvss_date_created"); itemsimilarity similarity = new loglikelihoodsimilarity(jdbcmodel2); recommender recommender = new genericbooleanprefitembasedrecommender(jdbcmodel2, similarity); for(recommendeditem item: recommender.recommend(1, 1)) system.out.println(item); however after running this. returned error exception in thread "main" java.lang.illegalargumentexception @ com.google.common.base.preconditions.checkargument(preconditions.java:72) @ org.apache.mahout.math.stats.loglikelihood.loglikelihoodratio(loglikelihood.java:101) @ org.apache.mahout.cf.taste.i...

ios - Rotation issue on a horizontal angle -

i developing ios application in need rotate 6 uiviews "facing" user. rest of interface doesn't need rotated. the code below working amazingly in simulator. when tested on phone faced problem. whenever put phone in flat origination/horizontal, understand should go portrait. idea happening , work around? #pragma mark rotation - (bool)shouldautorotate { return no; } - (void)orientationchanged:(nsnotification *)notification { cgfloat rotationangle = [self convertorientationtoradians]; [uiview animatewithduration:0.5 animations:^{ (timerbutton *timerbutton in self.timerbuttons) { timerbutton.button.transform = cgaffinetransformmakerotation(rotationangle); } }]; } - (cgfloat)convertorientationtoradians { uideviceorientation orientation = [uidevice currentdevice].orientation; cgfloat rotationangle = 0.0; switch (orientation) { case uideviceorientationportrait: rotationangle = 0.0; ...

svn - TortoiseSVN 1.8 : Externals greyed out in commit dialog -

i have problem tortoisesvn 1.8.1. problem similar 1 described here . in fact, have project contains folder multiple externals. when want commit changes in more 1 external @ once or changes main project, externals greyed out (like in second picture here ). cannot select them , have commit each external separately. the problem occurs parent folder of externals. externals in same repository main project. problem first occured tortoisesvn 1.8; worked tortoisesvn 1.7. is bug in tortoisesvn 1.8? or there property enable such commit? have set externals property in special way? there's no bug. that's tortoisesvn correct behavior. externals don't accept changes default. suppose using external repository not contributor, or located outside of repository. tortoisesvn can track file changes, can't perform single commit in 2 repositories @ once. even if paths in repository structure, perform single commits in 2 repositories bad practice.

Android sdk version on gradle and manifest -

i started using android studio few weeks ago , there's question have, in build.gradle file can set minsdkversion can in manifest, 1 override other? if put different values on gradle , on manifest consequence? the manifest files in projects overridden gradle when build projects.

php - Get HashTags with facebook connect -

this question has answer here: how can track hashtags new facebook hashtag implementation 2 answers i've made simple new app on facebook. used facebook connect connect on website, , want hashtag . but don't figure how them using facebook connect? eg : want content of: https://www.facebook.com/hashtag/learntocode , can displayed if connected onto facebook. any ideas content of page while connected facebook connect? can't find documentation on issue. there no public api retrieve/search hash tags, far aware. can use standard search api doesn't search hashtags (i.e. search "#facebook" return posts word "facebook" in , not ones hash tag).