Posts

mysql - YEAR() and MONTH() in Doctrine2 with Symfony 2.4 -

i've installed stofdoctrineextensionsbundle use sql functions month() , year() keep getting error: attempted load class "month" namespace "doctrineextensions\query\mysql" in /var/www/symfony/vendor/doctrine/orm/lib/doctrine/orm/query/parser.php line 3389. need "use" namespace? in controller have this: $dql = "select x pfcfisiogestbundle:facturaemitida x month(x.fecha) between '".$mes_inicio."' , '".$mes_fin."' , year(x.fecha) = '".$ano."' order x.numero desc"; $querydefault = $em->createquery($dql); and in config.yml doctrine: dbal: driver: "%database_driver%" host: "%database_host%" port: "%database_port%" dbname: "%database_name%" user: "%database_user%" password: "%database_password%" charset: utf8 orm: a...

TFS 2013 Reconcile workspace popup not showing -

we have gated checkin. when checkin files changes left in workspace can continue work. when build finished popup reconcile workspace. can reconcile right clicking build want popup don't forget it. my colleagues getting popup don't. can't find option show popup again. have idea? we have tfs2013 update 2 en visual studio 2013 update 3 installed. as just tfs correctly hinted, pop-up "reconcile workspace" part of build notification application . visual studio makes run automatically @ logon - if closed it, won't run unless re-run it.

jquery - Get JSON array from string AJAX response -

i response ajax request. ajax call function php get_contents() , html output of reqeusted page. <script type="text/javascript"> var jsloaded = ''; var searchcategories = [{"title":"something","id":"3","count":28117},{"title":"something","id":"35","count":14647},{"title":"something","id":"1","count":1124},{"title":"something","id":"6","count":836},{"title":"something","id":"5","count":18645},{"title":"something","id":"7","count":4791},{"title":"something","id":"8","count":21117},{"title":"something","id":"76","count":179},{"title":"somethin...

c++ - Emplacing a std::pair -

is there way of emplacing std::pair ? std::unordered_map<int, std::pair<std::string, std::string>> my_map; my_map.emplace(1, "foo", "bar"); // error of course inserting possible: my_map[2] = std::make_pair("bar", "foo"); but doesn't require unnecessary copying/moving? is there way of emplacing std::pair? the arguments need suitable constructor of pair<int, pair<string,string>> , map's value_type : my_map.emplace(1, std::make_pair("foo", "bar")); but doesn't require unnecessary copying/moving? no; make_pair makes pair of pointers string literals, used initialise (in case of emplace ) or assigned (in case of [] ) strings contained in map.

python - UPDATE statement on Access database fails silently under pyodbc -

i have problem simple update statement. wrote python tool creates lot of update statements , after creating them want execute them on access database doesn't work 1 statement example: update fcl_b_coversheet_a set branch = 0 obj_id = '1220140910132011062005'; the statement syntax not problem. tested , works. this next code snippet shows initialization connect object. strinputpathmdb = "c:\\test.mdb" drv = '{microsoft access driver (*.mdb)}'; con = pyodbc.connect('driver={0};dbq={1};uid={2};pwd={3};'.format(drv,strinputpathmdb,"administrator","")) after wrote method execute 1 sql statement def executesqlstatement(conconnection, strsql): arcpy.addmessage(strsql) cursor = conconnection.cursor() cursor.execute(strsql) conconnection.commit() and if execute code seems work - no error message or - data not updated , don't know i'm doing wrong ... for strsql in sqlstatearray: ...

c# - Fiddler and .Net 3.5 SSL error. Works fine in .Net 4.0 -

first thing, site , post. https://saplic.receita.pb.gov.br/sintegra/sinf_consultasintegra.jsp fullfil field cnpj value instance 34151100004209. works fine in chrome , .net 4.0 httpwebrequest. cant debug in fiddler , cant make work on .net 3.5 i'm using system.net.servicepointmanager.servercertificatevalidationcallback += new system.net.security.remotecertificatevalidationcallback(customxertificatevalidation); system.net.servicepointmanager.securityprotocol = system.net.securityprotocoltype.ssl3; system.net.servicepointmanager.expect100continue = false; this driving me insane. appreciated make things more clear, i'm having 1 problem happening on 2 differente places (fiddler , .net 3.5) the code i'm trying run is. cookiecontainer cookcon = new cookiecontainer(); httpwebrequest request = (httpwebrequest)webrequest.create("http://sintegra.receita.pb.gov.br/sintegra/sintegra.asp?estado=pb"); request.timeout = configuration.timeout; r...

php - Laravel Eloquent - Table join -

i have 1 problem need help. i'm doing 1 project in learning purposes. i have 2 tables, first 1 users contain id (pk, ai), username, email, password , on... another table called friends contain user_a (fk users.id), user_b (fk users.id), status (0 - pending, 1 - confirmed)... lets current logged user have id 1. i need join 2 tables , complete friend list logged user, query trough table friends user_a or user_b = logged user id, , data (from table users) friend... lets this: user_a = 1, user_b = 2 userb_a = 3, user_b = 1 i need info users 2, 3. i hope understand need. btw know how without using eloquent, need use eloquent. thanks lot! this many many relationship, need belongstomany . // basic setup public function friends() { return $this->belongstomany('user', 'friends', 'user_a', 'user_b') ->withpivot('confirmed'); } however that's not all, since want bidirectional. means need setu...