Posts

Showing posts from August, 2015

java - Is there a way to use Postgresql copy (loading CSV in table) from Hibernate? -

in current application using hibernate + postgresql. particular case need use copy functionality available in postgres load data csv file. there way use copy using hibernate. postgres version : 9.4 hibernate version : 5.0.6 based on @a-horse-with-no-name comment, put following code session.dowork deprecated. sessionfactory factory = hibernateutil.getsessionfactory(); session session = factory.opensession(); sessionimplementor sessimpl = (sessionimplementor) session; connection conn = null; conn = sessimpl.getjdbcconnectionaccess().obtainconnection(); copymanager copymanager = new copymanager((baseconnection) conn); file tf =file.createtempfile("temp-file", "tmp"); string temppath =tf.getparent(); file tempfile = new file(temppath + file.separator + filename); filereader filereader = new filereader(tempfile); copymanager.copyin("copy testdata (col1, col2, col3) stdin csv", filereader ); hope helps readers.

multithreading - SignalR, Outlook add-in and multithread exception -

in outlook have code... _connection = new hubconnection(me._url) _connection.credentials = credentialcache.defaultcredentials _hub = _connection.createhubproxy(me._hubname) _hub.on(of string)("newmessage", function(message) dim f new testform f.show() return "" end function) _connection.start() but showing form "testform" crashes since in main thread , signalr on thread. any idea how can make work? your best attempt use dedicated thread signalr jobs , on main sta thread accessing outlook object model or displaying forms/wpf components. this how can "continue" work on main thread: hooked events outlook vsto continuing job on main thread

c# - MVC: Delay jquery script execution until after Layout script has completed -

i'm developing asp.net project uses quite bit of client side jquery scripting. in layout.cshtml page have ajax call returns information logged in user. pages in application depend on information. therefore need mechanism don't execute script in individual views until call on layout page has completed. generally use jquery deferreds quite difficult calls in 2 unconnected files (e.g. layout.cshtml , individual view cshtml). other options can think of make initial call synchronous don't want or have sort of wait loop (e.g. settimeout(checkval, 200), neither solution appeals me. below simplistic sample of trying do. layout.cshtml $(document).ready() { function loaduserdata() { return $.ajax({ type: "get", contenttype: "application/json", datatype: "json", url: baseurl + "/account/getusermeta", success: function (res) {

select option selection in php -

i have form input order, there 2 fields, branch , customer model. before click button "search", must select branch , customer fields. after filled field, click button search, data appears. problem is, after data appears, condition branch , customer models filled, want create search, changed branch field (customer model field same previous search), change branch field 'a' 'b' , click button search, data not appears / empty (whereas data exists in database). branch field,the field when changed b, after click button search, branch filled changed 'select' (branch option select -> , b). i'm confused problem.. here code : <?php if ($_post) { $_session['data_id'] = $_post['data_id']; $_session['branch'] = $_post['branch']; $_session['customer_model'] = $_post['customer_model']; } ?> <form id="search" class="formular" method="po

ios - Navigationbar Translucent property -

Image
i having requirement first view controller has self.navigationcontroller.navigationbar.translucent = yes; and second view controller has self.navigationcontroller.navigationbar.translucent = no; so while navigating first view controller second view controller can see white space on top... can me smooth navigation. try insert following code viewdidload: if( [self respondstoselector:@selector(edgesforextendedlayout)] ) { self.edgesforextendedlayout = uirectedgenone; }

javascript - Use Onload on image tag in ember -

i have template in photos being displayed in frame ( each frame different different images) .i have written function uses images original height , width , gives me customized width , height particular frame inorder restore aspect ratio.now have called function through onload images loads on particular moment. my feed.hbs( template) <img src = "{{photo.0.photo_url}}" onload = "onimageload(event);" {{action "imgoverlay0" photo}}/> function function onimageload(evt) { var img = evt.currenttarget; // what's size of image , it's parent var w = $(img).width(); var h = $(img).height(); var tw = $(img).parent().width(); var th = $(img).parent().height(); // compute new size , offsets var result = scaling(w, h, tw, th,false); // adjust image coordinates , size img.width = result.width; img.height = result.height; $(img).css("margin-left", result.targetleft); $(img).css("

excel vba - Vba Powerpoint name a table -

i pasted table excel powerpoint code: pptapp.commandbars.executemso ("pasteastablesourceformatting") there other shapes on slide. how can make powerpoint find pasted table on slide , name it? whenever paste in powerpoint appears on topmost layer can reference , optionally set name function: option explicit ' *********************************************************** ' purpose: topmost shape current slide. ' inputs: sname - optionally rename shape ' outputs: returns shape object if slide not empty. ' author: jamie garroch ' company: youpresent ltd. http://youpresent.co.uk/ ' *********************************************************** function getpastedshape(optional sname string) shape dim lcurslide long ' current slide index lcurslide = activewindow.view.slide.slideindex activepresentation.slides(lcurslide) if .shapes.count = 0 exit function ' set reference shape on top layer set getpastedshape

Cordova : Error When adding platform (cannot call method 'replace' of undefined) -

i working on cordova while , project work without error yesterday try latest version tfs , faced error d:\projects\mycordovaproject>cordova platforms add android adding android project... error: cannot call method 'replace' of undefined i try remove plugins , platforms problem didn't solve , try create new project it's created , working , try take project run in laptop, sitll not working same error. the problem in config.xml replace <widget android-packagename="" with <widget id=""

Return object from class member function in C++ -

the task in above code write member function calculate new point, amount of 2 other points. , dont know how return object or should do. here code, , function marked 3 !!!. function must return something, cant make void because reference void unallowed. class point { private: float x; float y; public: point(); point(float xcoord, float ycoord); void print(); float dist(point p1, point p2); !!! float &add(point p1, point p2); float &x(); float &y(); ~point(); }; float & point::x() { return x; } float & point::y() { return y; } point::point() { cout << "creating point (0,0)" << endl; x = y = 0.0; } point::point(float xcoord, float ycoord) { cout << "creating point (" << xcoord << "," << ycoord << ")" << endl; x = xcoord; y = y

android - How to get the reference of the built graph using Dagger2 DI? -

i have peractivity component. build graph in oncreate of activity this: mactivitycomponent = daggeractivitycomponent.builder() .appcomponent(browserapp.getappcomponent()) .activitymodule(new activitymodule()) .build(); it pretty straight forward reference of mactivitycomponent in fragments. can use it: ((mainactivity)getactivity()).getactivitycomponent(); the problem arises in other classes. let's have webview doesn't have method getactivity() . how should reference mactivitycomponent ? if pass reference in constructor, doesn't defeat purpose of using dependency injection? , cannot make static, because won't "peractivity" anymore, 1 , same activities.

c# - EF and TPT : the column name is specified more than once in the SET clause -

i'm using ef 6 , use tpt strategy model problem. rule abstract class. overtimerule concrete class, inheriting rule . rule looks : public abstract class rule { public int id { get; set; } public periodtype periodtype { get; set; } public int sortorder { get; set; } public int statuteid { get; set; } public bool isactive { get; set; } } overtimerule looks : public partial class overtimerule : rule { public decimal? thresholdcoefficient { get; set; } public decimal? limitcoefficient { get; set; } } when create new overtimerule , try save it, ef first generates query : insert [dbo].[rules]([periodtype], [sortorder], [statuteid], [isactive], [statuteid]) values (@0, @1, @2, @3, @4, @5, @6, null) as can see, ef adds statuteid column insert, not exists anywhere in solution , makes invalid sql query. sql rightfully throws : the column name 'statuteid' specified more once in set clause. column cannot assigned more 1 value in

reverse proxy - Preserve response headers in nginx -

i have reverse-proxy setup(i think), gunicorn running falcon app. able setup ssl on nginx server. /etc/nginx/nginx.conf: worker_processes 1; user nobody nogroup; pid /tmp/nginx.pid; error_log /tmp/nginx.error.log; events { worker_connections 1024; # increase if have lots of clients accept_mutex off; # set 'on' if nginx worker_processes > 1 } http { include mime.types; # fallback in case can't determine type default_type application/json; access_log /tmp/nginx.access.log combined; sendfile on; gzip on; gzip_http_version 1.0; gzip_proxied any; gzip_min_length 500; gzip_disable "msie [1-6]\."; gzip_types application/json; upstream app_server { # fail_timeout=0 means retry upstream if failed # return http response server 127.0.0.1:6789 fail_timeout=0; } server { # if no host match, close connection prevent host spoofing listen 80 default_server; return 444; } ser

java - Repeated column in mapping for entry error -

i doing simple hibernate program in use attribute override , embedded object keys , got error: exception in thread "main" org.hibernate.mappingexception: repeated column in mapping entity: com.hibernate.model.employee column: pincode (should mapped insert="false" update="false") employee.java package com.hibernate.model; import javax.persistence.attributeoverride; import javax.persistence.attributeoverrides; import javax.persistence.column; import javax.persistence.embedded; import javax.persistence.entity; import javax.persistence.generatedvalue; import javax.persistence.generationtype; import javax.persistence.id; import javax.persistence.table; @entity @table (name="employee") public class employee { @id @generatedvalue(strategy=generationtype.auto) private int id; private string firstname; private string lastname; private string email; private string phoneno; @embedded @attributeov

WSO2 - Uploading "Registry Resources Project" onto ESB Server -

i have requirement version control "registry" artifacts (i.e. wsdls, xsds, xsls), upload wso2 esb 4.8.1 server. i'm not using wso2 greg @ moment. came across "registry resources project" facility think me achieve this. i'm unsure whether facility can used greg or esb well. there way me generate capp project, include the above "registry resources project" in it, , deploy esb server? i've come across blogs deploy standard esb artifacts in way, not registry. - please help.... you can create required registry resources specified in creating registry resources documentation . once have created registry resource project, need create composite application archive specified in creating composite application archive (car) file documentation . when creating car file, need specify server role enterpriseservicebus deploy registry resources in esb. thanks.

PHP Youtube Video displaying on page with database -

i'm making "social network" , want able display youtube video when user put in youtube link , description, on facebook. managed make when user put link display video database, can't figure out how not show video when user don't put link , want show youtube video when user put link , description , send database. can help? update if(preg_match("/youtube.com(.+)v=([^&]+)/", $url)) { preg_match("/v=([^&]+)/", $url, $matches); if(isset($matches[1])) { $test = 'http://www.youtube.com/embed/'.$matches[1]; } } i've found , grabs need , when type like: "link" , text, how can stop taking after link???

sql server - How to move Azure SQL Database files to different location? -

i want move azure sql database files (mdf, ldf, , tempdb) different disk location. tsql command(s) can help? in azure sql database, not have ability move these files. if want control on filesystem, best option use sql server in vm.

Create and print a tree in C -

i trying create program creates tree words in file , same words sorted. here code have: #include <stdio.h> #include <stdlib.h> #include <string.h> #define size 30 typedef struct node *tree; typedef struct node { tree left; tree right; struct dictionary { char *word; char *sortedword; } value; } node; void swap(char *a,char *b){ char tmp; tmp = *a; *a = *b; *b = tmp; } char * bubble_sort(char *word){ char *ptr = word; int n = strlen(word); int i,j; for(i=0;i<n-1;i++) for(j=0;j<n-i-1;j++) if(*(ptr+j)>*(ptr+j+1)) swap((ptr+j),(ptr+j+1)); return word; } char *removenewlines(char *word){ char *newstring = malloc(size * sizeof(char)); char ch; int currentletter = 0; int len = strlen(word); while (currentletter < len){ ch = word[currentletter]; if (ch != '\n'

c# - Binding a tree view structure , in asp .net? -

i have tried create asp,net treeview structure using below <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>untitled page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:treeview id="treeview1" runat="server" /> </div> </form> and in code behind protected void page_load(object sender, eventargs e) { if (!page.ispostback) populatetreeview(); } private void populatetreeview() { datatable treeviewdata = gettreeviewdata(); addtoptreeviewnodes(treeviewdata); } private datatable gettreeviewdata() { string selectcommand = "select top 10 idx_client,idx_branch,client_name tbl_client"; string constring =system.configuration.configurationmanager

ansible - Is it possible to execute each task inside a playbbok in a different host? -

i have playbook 2 tasks. want execute first on my_machine1 , second in my_machine2 . possible? want synchronous: since first task has not finished don't want second starts. thanks in advance. you looking delegation you can use delegate_to keyword on task make run on other host this: - name: take out of load balancer pool command: /usr/bin/take_out_of_pool {{ inventory_hostname }} delegate_to: 127.0.0.1 as pointed out in documentation using ‘serial’ keyword control number of hosts executing @ 1 time idea

html - angular ngHide on a button leaves space where it was -

Image
in footer of html file, have 3 buttons. the first image shows how 3 buttons arranged. second image shows when footer middle button commented out. third image when ng-hide="true" on middle button. how can have no space between no , yes buttons when middle nghide(n)? thanks * { margin: 0; padding: 0; } html { height: 100%; } body { height: 1%; } header > button { height: 1.5em; width: 1.5em; font-size: 1.5em; top: 0; } label.pagetitle { display: inline-block; width: calc(100% - 5em); text-align: center; } header { border-bottom: 1px solid black; width: 100%; position: fixed; top: 0; } main, .mainmenu { position: absolute; top: 2.5em; } main { z-index: -2; width: 100%; } footer { position: fixed; bottom: 0; width: 100%; } footer > button { font-size: 1em; padding: 0.5em 1em; } section { text

c# - DiskCache plugin strategy for e-mail images with tracking -

currently we're sending thousands of e-mails every day our customers. e-mail contains image url specific message id. when user downloads image, mark message opened in database. example: http://cdn.mydomain.com/companylogos/{guid}.png?h=100&w=100&messageid=123 at moment, every image request requires me byte[ ] of image cache. resize it. , return it. takes place in httphandler. i take advantage of imageresizer.net , disk cache plugin. however, still need messageid-querystring parameter. i'm thinking solution. extending httpmodule public class custominterceptmodule : interceptmodule { protected override void handlerequest(httpcontext context, httpmodulerequestassistant ra, ivirtualfile vf) { var messageidparam = context.request.querystring["messageid"]; int messageid; if (!string.isnullorwhitespace(messageidparam) && int.tryparse(messageidparam, out messageid)) { // id here }

objective c - How to decompile framework file in iOS to get source code? -

i want know there way/tools decompile framework file in objective c source code. in java there jad , other tools decompile byte code source code. you can disassemble binary , assembly source, there no way original objective-c structured source code. may want give hopper try. didn't try yet mike ash say s it's good. helper source:- here

objective c - How do I call a method from my uiviewcontroller in a utility nsobject class -

how import method uiviewcontroller utility class of nsobject (which use in viewcontroller call common methods?) have large number of view controllers need call same method. do need use nsinvocation? should use different protocols , delegates? without access method utility class "nsinvalidargumentexception" this basic structure need use. utilityclass - .h #import <foundation/foundation.h> @interface utilityclass : nsobject - (void) swipeload: (uiview*)myview; @end .m #import "utilityclass.h" @implementation utilityclass - (void) swipeload: (uiview*) myview { uiswipegesturerecognizer *onefingerswiperight = [[uiswipegesturerecognizer alloc] initwithtarget:self action:@selector(onefingerswiperight:)]; [onefingerswiperight setdirection:uiswipegesturerecognizerdirectionright]; [myview addgesturerecognizer:onefingerswiperight]; uiswipegesturerecognizer *onefingerswipeleft = [[uiswipegesturerecognizer a

Replace specific character in a string in C++ -

i have code following - value = "current &ht"; //this value void stringset(const char * value) { const char *chk = null; chk = strpbrk(value,"&"); if(chk != null) { strncpy(const_cast<char *> (chk),"&amp",4) } } in above code replace "&" value "&amp.it works fine if have "&" single character in current case strpbrk() return "&ht"and in below strncpy whole "&ht"is replaced. now know methods can replace single character string. i think need temp array hold string past & , replace & in original string , append temp array original. here above code modified, believe can use strstr instead of strchr accepts char* second argument. void stringset(char * value) { char *chk = null,*ptr = null; chk = strchr(value,'&'); if(chk != null) { ptr = chk + 1; char* p = (char*)malloc(sizeof(char) * strlen(ptr));

html - Vertical alignment multiple spans inside div with variable height (ui-select-multiple) -

i use multiselect angularjs ui-select . my multiselect looks http://plnkr.co/edit/zjruw8stsglrj38ivwhi?p=preview spans can arranged in multiple lines if there many. want nice vertical aligment this. i managed 1 line: http://cs630525.vk.me/v630525759/14770/wc2j1zbmx9e.jpg but fails on multiple lines: http://cs630525.vk.me/v630525759/14777/wudetojrvx0.jpg http://cs630525.vk.me/v630525759/1477e/27qtejdqlam.jpg "nice vertical aligment" - paddings same colors must equal http://cs630525.vk.me/v630525759/147d8/yzbfrsigxl8.jpg html <ui-select multiple class="ui-select-container ui-select-multiple ui-select-bootstrap form-control dropdown" ng-model="multipledemo.colors" ng-disabled="disabled"> <ui-select-match class="ui-select-match" placeholder="select colors...">{{$item}}</ui-select-match> <ui-select-choices repeat="color in availablecolors | filter:$selec

c# - Get object in LINQ expression -

there want file's name in linq expression (i'm not sure if ok ask this) please @ code, find " here how file's name in db??? " public static ienumerable<string> getfiles(list<string> srcfiles) { var filepaths = new list<string>(); using (var db = new contentmgmtcontext()) { foreach (var fileinfo in srcfiles.select(file => new fileinfo(file))) { if (db.files.any(o => o.filename.tolower() == fileinfo.name.tolower() || o.filesize == fileinfo.length.tostring())) { console.writeline("{0} exist in db", fileinfo.name); console.writeline("conflict file in db is: {0}",here how file's name in db???); } else { filepaths.add(fileinfo.fullname); } } } return filepaths; } you try collecting every db entry matches criteria first public static ienumerab

vba - To compare two cells in excel and then return the row -

Image
well scenario excel sheet contain 97k rows similar email address want compare alternate cells in excel sheet , unique email address . suppose 4 columns a contains name b contains email address c contains type d contains latest updated date time but conditions :- if b contain 2 or 3 cells having same email address go next column i.e c in column c check type if people contain type lead/contact go column c , check latest update , row. if people matching emails contain type 1 lead , contact row have type contact if type blank row contain type either lead or contact. so can me out , how can done? right manually doing 1 one. short or snippet approach appreciable. thank you.it great sort data in following order: email - ascending updated @ - descending type - ascending then in column e write following formula: =if(b1<>b2,"keep","") then filter data blanks in column d, delete filtered rows. picture sample data based on d

c++ - Decorate a char* and char const* by pointer acquisition : good practice? -

hello wanted poll public idea of doing string class (like std::string ) have feature of being able work on buffers provided client. what dangers forsee ? classic smell ? etcaetera i mean so: char ext[64] = {0}; my::string s(ext, my::string::acquire_rw); size_t len = s.size(); size_t pos = s.find("zboub"); my::string s2(s); // uses true (alloc+)copy semantic here. so forsee 2 strategies: acquire_rw , acquire_ro permit modification of characters in ext or not. , in ro case non-const method, , rw cases in methods buffer has expanded; alloc & copy @ moment only. in way, my::string type becomes decorator of char* type. of course being careful of not freeing external buffer before decorator left requirement client. thanks sharing concerns the answer 'good practice' difficult. say, in general not practice, specific use cases practice. depends how can trust client on lifetime of provided memory. in general: no trust. in special cases: o

ios - NSObject unable to convert string -

i have following code getting error @ wrong conversion, still learning below code trying do, not sure code means yet. let padding = 353 let minheighttext: nsstring = "\n\n" let font = uifont(name: "avenir light", size: 15.0)! let attributes = [nsfontattributename: font] nsdictionary let item = items[indexpath.row] let minsize = minheighttext.boundingrectwithsize(cgsize(width: (view.frame.size.width - 40), height: 1000), options: .useslinefragmentorigin, attributes: attributes [nsobject : anyobject] [nsobject : anyobject], context: nil).height let maxsize = item.itemdesctiption.boundingrectwithsize(cgsize(width: (view.frame.size.width - 40), height: 1000), options: .useslinefragmentorigin, attributes: attributes [nsobject : anyobject] [nsobject : anyobject], context: nil).height + 50 the error getting this.. /users/david/desktop/ios_app/bid-hub-app/ios-app/bidhub-ios-master/auctionapp/itemlist/itemlistviewcontroller.swift:140:215: cannot convert val

php- convert two dimentional array to in single dimentional array -

i reading css folder , received below array. array ( [formvalidation] => array ( [0] => formvalidation.css ) [0] => bootstrap-theme.css [1] => bootstrap-theme.min.css [2] => bootstrap.css [3] => bootstrap.min.css [4] => component.css [5] => custom.css [6] => custom_11_1_backup.css [7] => datepicker.css [8] => dropkick.css [9] => easy-responsive-tabs.css [10] => jquery.bootstrap-touchspin.css [11] => jquery.fileupload.css [12] => jquery.mcustomscrollbar.css [13] => jquery.noty.css [14] => noty_theme_default.css [15] => owl.carousel.css [16] => owl.theme.css [17] => owl.theme.default.min.css [18] => print_invoice.css [slider] => array ( [0] => ajaxloader.gif [1] => owl.theme.css ) [19] => validationengine.jquery.css ) now want these in below format.

visual studio - Unable to build/publish Azure Data Factory application -

every data factory application try create in visual studio 2015, sample ones, unable build or publish due to: "object reference not set instance of object." error on every .json file. is there important configuration i'm missing or dependencies need add project? thanks we have open bug on , fix in our next release. error thrown during build, still should able go ahead , publish. we'll further see why blocked publishing. feedback!

java - org.eclipse.jetty.io.EofException: Early EOF thrown while uploading large file -

while uploading large file(about 50 mb), getting org.eclipse.jetty.io.eofexception: eof excception. jetty server version " 9.2.9.v20150224 ".below stack trace org.eclipse.jetty.io.eofexception: eof @ org.eclipse.jetty.server.httpinput$3.nocontent(httpinput.java:505) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224] @ org.eclipse.jetty.server.httpinput.read(httpinput.java:124) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224] @ org.apache.http.entity.inputstreamentity.writeto(inputstreamentity.java:142) ~[httpcore-4.4.1.jar:4.4.1] @ org.apache.http.entity.httpentitywrapper.writeto(httpentitywrapper.java:96) ~[httpcore-4.4.1.jar:4.4.1] @ org.apache.http.impl.client.entityenclosingrequestwrapper$entitywrapper.writeto(entityenclosingrequestwrapper.java:112) ~[httpclient-4.5.jar:4.5] @ org.apache.http.impl.entity.entityserializer.serialize(entityserializer.java:117) ~[httpcore-4.4.1.jar:4.4.1] @ org.apache.http.impl.abstracthttpclientconnection.sendrequestentity(abstra

java - fj.data.Set comparison -

in java.util , can use containsall method compare 2 java.util.set . what's best way compare 2 fj.data.set ? is there "valuable" benefit of using fj on java.util ? i have never used library nor ever, looking through api found method public final boolean subsetof(set<a> s) returns true if set subset of given set. parameters: s - set superset of set if method returns true. returns: true if set subset of given set. i believe should used "reversed" containsall : a.containsall(b) true i.f.f. b.subsetof(a) true (not sure how equal sets handled, guess it's fine). afterthought: noticed how fishy wording in javadoc is. parameter description dependent on output: a superset of set if method returns true . you're not supposed assume on parameter or use conditional it. better wording along lines of: a set checked being superset .

Build error after adding Crosswalk plugin to a Cordova Android project -

i'm using latest cordova android (5.1.0). project building , running fine without crosswalk, after add crosswalk plugin using cordova plugin add https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview.git i following build error: error:15:53:54.127 [error] [system.err] /users/or/projects/test/cordova/platforms/android/src/org/crosswalk/engine/ xwalkwebviewengine. java:48: error: cannot find symbol 15:53:54.127 [error] [system.err] import org.xwalk.core.xwalkgetbitmapcallback; 15:53:54.128 [error] [system.err] ^ 15:53:54.128 [error] [system.err] symbol: class xwalkgetbitmapcallback 15:53:54.128 [error] [system.err] location: package org.xwalk.core 15:53:54.178 [error] [system.err] /users/or/projects/test/cordova/platforms/android/src/org/crosswalk/engine/xwalkwebviewengine. java:103: error: cannot find symbol 15:53:54.179 [error] [system.err] new xwalkgetbitmapcallback() { 1

apache - My mod_rewrite rules do not resolve PHP variables -

i have interesting situation. i've configured basic lamp server , external company providing code. works except php rewrites specifically. i've configured rewrites , can basic rewrites hello.html -> redir.html. i've confirmed turning loglevel trace6 , see rewrite being active. the trouble comes php variables. seems not resolve them. i have following simplified .htaccess file other rules removed testing <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^news/(.*)/(.*)/(.*)/$ news.php?department=$1&newsid=$2&newstitle=$3 [l] rewriterule ^$ index.php?page=home [l] </ifmodule> now if enter url http://webserver/news/it/153/newsstory i expect redirected http://webserver/news.php?department=it&newsid=153&newstitle=newsstory however, happens second rule catches it. this tricky me, i'm providing server infrastructure , not writing code (externally supplied). our code supplier says works side , we've see

active directory - Powershell Search for AD Users -

i learning powershell , use adding users ad groups. know if possible search ad usernames using persons common name (i.e. john doe = jdoe). time consuming , defeats purpose of using powershell if have use ad users , computers uid every time. update: tried get-aduser -filter { cn -eq 'john doe' } , get-aduser -filter { name -eq 'john doe' } command , did not receive output console, went next line. i have rsat installed, clarify. have looked @ technet article on ms' page get-aduser try , figure out before posted op. just clarify looking search common name find user's login name. i.e. searching 'john doe' find 'jdoe' user logon name. yes. need install rsat. see here instructions various windows versions. then use get-aduser : get-aduser -filter { cn -eq "common name" }