Posts

Bash IFS ('\n'): Problems with file name detection through find command and for loop -

#!/bin/bash ifs='\n' declare -i count=0 ax=$(find *.iso -maxdepth 1 -type f) # rather use ax="$(find *.iso -maxdepth 1 -type f"? # a="${ax%x}" < use when applying "" $() in ax? should include newlines way. edit: don't need trailing newlines fix. iso in "$ax" echo "use "$iso"? [y/n]?" # outputs files, ifs has no force somehow read choiceoffile shopt -s nocasematch case $choiceoffile in y ) echo "using selected file.";; * ) continue;; esac # sort of processing done is command substitution done right? variable not work ifs \n in loop, don't why occurs. for loop supposed process filenames blank space processing output of find line line (thats why use ifs \n). the variable not work ifs \n in loop, don't why occurs. ifs='\n' doesn't set ifs newline, sets ifs literal string \n . if want set ifs newline, use: ifs=$'\n'

php - MongoDB+Doctrine ODM How to remove a embedded document in a document collection? -

im using mongodb doctrine orm , want remove embedded document "avatar" (or set null) in document collection. my json-object looks this: { "_id" : objectid("55965d090203ff700f000032"), "name" : "test", "stores" : [ { "_id" : objectid("559d166f0203ff081300002f"), "storename" : "test", "openingtimes" : "", "address" : { ... }, "contactperson" : { "firstname" : "", "lastname" : "", ... "avatar" : { "source" : "/uploads/images/company/55965d0980585/contactperson/", "name" : "contactperson.jpg" } } }, ... ] }...

c# - Which data type the enumerations are stored by the compiler? -

in data type enumerations stored compiler? enum default uses int datatype storing value you can set type enum , override default datatype, datatype must of integral numeric type example : enum months : byte { jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec };

gwt validation - GWT replace-with code -

related previous un-answered question of myself: how can find code executed when use <replace-with class="xxxxxx.xxxxxx.beanvalidatorfactory"> <when-type-is class="javax.validation.validatorfactory" /> </replace-with> i suspect may causing unexpected behaviour when validatorfactory used somewhere else client , wonder if having eye on code can point me workaround/solution. thx!

php - Symfony2.7.1 fresh installation. Failed to load resource -

symfony2 developers: recently, planning familiar symfony2, using api project. current version v2.7.1. i have apache installed local environment. installation root directory is: //localhost/symfony so followed official guide install it. looks fine after installation. when view page in development environment (app_dev.php). //localhost/symfony/web/app_dev.php page content display expected, not styled. open console , find 404 response follows: failed load resource //localhost/symfony/web/bundles/framework/css/structure.css //localhost/symfony/web/bundles/framework/css/body.css //localhost/symfony/web/bundles/framework/css/exception.css //localhost/symfony/web/app_dev.php //localhost/symfony/web/bundles/framework/css/structure.css //localhost/symfony/web/bundles/framework/css/body.css //localhost/symfony/web/bundles/framework/css/exception.css i looked project/web/bundles directory, found nothing inside 2 empty file. frame...

php - Twig Template Import External WordPress Posts -

i'm trying load in few wordpress posts website built using twig. i've tried inserting code page gets commented out. i'm guessing there's special way i'm supposed rewrite work in twig. can me? <?php define('wp_use_themes', false); require('../wordpress/wp-blog-header.php'); query_posts('showposts=3'); ?> <?php while (have_posts()): the_post(); ?> <div class="wordpress-post"> <?php if ( has_post_thumbnail() ) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_post_thumbnail(); ?> <h2><?php the_title(); ?></h2> <?php the_excerpt(); ?> <p><a class="read-more" href="<?php the_permalink(); ?>" class="red">read more</a></p> </div> <?php endwhile; ?> thanks in advance! you cannot mix php , twig code in given twig template...

windows - Script to update domain computer LastLogonDate? -

so i've poked around looking while now, can't seem find anywhere. in our environment have script disables computers after last seen ad property on computer beyond 15 days. since laptop environment , people not connected network when login, computers once lock/unlock when connected domain gets trust relationship issue because computer disabled in ad. has seen script can run on local computer updates lastlogondate property in ad of computer while user logged in? thinking of pushing out scheduled task computers every 15 minutes if possible. thanks!