Posts

Showing posts from June, 2010

2D Delaunay triangulation in CGAL using an arbitrary plane -

i new using cgal, , wondering if cgal supports 2d delaunay triangulation of 3d points using arbitrary plane. example on cgal's documentation lists projection_traits_xy_3<r> , projection_traits_yz_3<r> , , projection_traits_xz_3<r> , in other words, projection on xy plane, yz plane , xz plane. there way can define arbitrary projection plane instead of using xy, yz , xz planes? thanks, there template < class kernel > class triangulation_2_filtered_projection_traits_3 not documented , defined in header: cgal/triangulation_2_filtered_projection_traits_3.h . you construct traits class plane normal , pass traits triangulation. something following should work: typedef cgal::exact_predicates_inexact_constructions_kernel k; typedef cgal::triangulation_2_filtered_projection_traits_3<k> p_traits; typedef cgal::delaunay_triangulation_2< p_traits > dt2; std::vector< k::point_3 > points p_traits traits( k::vector_3(1,1,1) ); d

Force nuget to always update a dependency -

i wish ensure nuget package updates latest version of dependent package. there anyway can this? my current nuspec looks like <?xml version="1.0"?> <package> <metadata> <id>engine</id> <version>$version$</version> <title>engine</title> <authors>agresearch</authors> <owners>overseer </owners> <requirelicenseacceptance>false</requirelicenseacceptance> <description>my budget model</description> <releasenotes>release model</releasenotes> <copyright>copyright 2014</copyright> <tags>overseer engine</tags> <dependencies> <dependency id="overseerengine.schema" version="" /> <dependency id="rezare.lib" version="1.0.23.2" /> </dependencies> </metadata> <files> <file src="overseerengine.dll&q

mongodb - Mongo "error converting js type to Utf8Value" on db.currentOp()? -

database running slow... 11gb database of around ~4 million documents. db.currentop() produces: thu jun 26 21:32:10.979 assertion: 16686:error converting js type utf8value 0x10e703360 0x10e6dcc2a 0x10e6da0dd 0x10e6c1aa8 0x10e6bd207 0x10e8fd0d9 0x10e900381 0x10e971b18 0x1469a3906362 0x1469a391701e 0 mongo 0x000000010e703360 _zn5mongo15printstacktraceerso + 64 1 mongo 0x000000010e6dcc2a _zn5mongo11msgassertedeipkc + 186 2 mongo 0x000000010e6da0dd _zn5mongo11tostlstringerkn2v86handleins0_5valueeee + 109 3 mongo 0x000000010e6c1aa8 _zn5mongo7v8scope16mongotov8elementerkns_11bsonelementeb + 4792 4 mongo 0x000000010e6bd207 _zn5mongol8namedgeten2v85localins0_6stringeeerkns0_12accessorinfoe + 839 5 mongo 0x000000010e8fd0d9 _zn2v88internal8jsobject35getpropertyattributewithinterceptoreps1_pns0

reporting services - I want to use SSRS map local report on asp.net mvc razor view -

i have created local report containing map. database in mysql have used odbc connector mysql. have rendered local report on razor view. can't render map report. how render map report locally programmatically? first time struggling bug of visual studio when assign local report report viewer , assign datasource report gets close automatically. report can't datasource. have put datasource first , configure datasource clicking "configure datasource" button. code added in code behind file. can show report on view page. recommend wants use world map or country's map project google's "geo chart". in google geo chart different google map. geo chart simple integrate.

java - a different object with the same identifier value was already associated with the session in case of saveOrUpdateAll in Hibernate3 -

in case of modify it's giving org.hibernate.nonuniqueobjectexception . in bidderbo class @override @transactional(propagation=propagation.required, rollbackfor=exception.class) public boolean updatebidder(biddersdetailform bidderdetailform, missessionbean missessionbean) throws misexception { boolean status = false; boolean childstatus =false; try { bidderheaderbean bidderheaderbean = populabidderheaderbean(bidderdetailform); misauditbean misauditbean = new misauditbean(); misauditbean.setstatus(misconstants.master_status_verified); misauditbean.setentby(missessionbean.getenteredby()); misauditbean.setentdate(missessionbean.getentereddate()); bidderheaderbean.setmisauditbean(misauditbean); status = bidderheaderdao.updatebidderheader(bidderheaderbean); if(status){ long bidderinfoid = bidderdetailform.getbidinfoid(); list<bidderdetailbean> bidderdetailbeans = populatebid

node.js - How to delete a git local repo folder in windows 7 -

i have created git clone in local directory. have run npm , installed node packages(gulp etc). don’t want working directory. did right click mouse , delete, not able delete. getting below error. "the source file name(s) larger supported file system. try moving location has shorter path name, or try renaming shorted name(s) before attempting operation" what issue. on windows, this thread shows can be: a path length issue (the path long) a process issue (which keeps handle on 1 of files being deleted) i found out make drive mapping halfway folder structure should able delete latter half of file heirarcy. for example if getting error trying delete: \\nas.device.company.com\a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z then map network drive z: to \\nas.device.company.com\a\b\c\d\e\f\g\h\i\j\k\ this reduce file herarchy down smaller path. open explorer , view z: drive. should contain folder called l (in exampl

mysql - Update database with php is not working -

i have form update informations product. form gets values database , sends page should update database. checked form sends values second page correctly. update function of database not updating. the code of update (second) page that: include("database.php"); if (isset($_request["kullanici"])) { include "database.php"; $sql = ("select * uye"); } else { header ("location: uyari.html"); } $id = $_post['id']; $urunadi = $_post['urunadi']; $malzemekodu = $_post['malzemekodu']; $urunkategorisi = $_post['urunkategorisi']; $birim = $_post['birim']; $miktar = $_post['miktar']; $personel = $_post['personel']; $birimfiyat = $_post['birimfiyat']; $fiyatbirimi = $_post['fiyatbirimi']; $resim = $_post['resim']; $sql = ("update depo set id = $id, urunadi = $urunadi, malzemekodu = $malzemekodu, urunkategorisi = $urunkategorisi, birim = $birim, mikt

java - Disable Jersey's ObjectMapper caching? -

i use jersey 2.9 , jackson 2.5.1 generate json responses on restful api. in order provide custom objectmapper , implement contextresolver so: @provider public class objectmapperprovider implements contextresolver<objectmapper> { @context uriinfo uriinfo; private final objectmapper objectmapper; public objectmapperprovider() { objectmapper = new objectmapper(); objectmapper.disable(deserializationfeature.fail_on_unknown_properties); objectmapper.enable(serializationfeature.indent_output); objectmapper.enable(serializationfeature.order_map_entries_by_keys); } @override public objectmapper getcontext(class<?> type) { // todo: configure custom object mapper depending on query string params return objectmapper; } } it works great first time access endpoint: getcontext method invoked , perform custom configurations on objectmapper (possibly returning new one) depending on query string provided user.

c++ - How does c++11 implements "... = default;" for the rule of three methods -

when learned c++ people told me always implement @ least rule of 3 methods. now i'm seeing new "... = default;" c++0x on stack overflow, , question is: is there c++11 standard implementation defined methods or compiler specific? plus have precisions: what implementation looks in term of code? (if it's generic) does have advantage compared example implementation below? if don't use assignment/copy constructor, *... = delete* precisly, what's difference declaring them private? answer (from @40two) is new default= different old default implementation? disclaimer: when i'll need more advanced features in methods, sure i'll implements them myself. used implement assignment operator , copy constructor when never used them, in order compiler don't. what used do: (edited, @ddrmmr swap/move ) //file t.h class t { public: t(void); t(const t &other); t(const t &&other); t &operato

MySql Connection Error using Node.js -

Image
connection lost: server closed connection with node_modules mysql using node.js. have installed npm's nodemon modules continiously monitor node.js application , restart server when crashese still when sever crashes application not restart on own. nodemon restart application if changes made in module or file !

hadoop - Not able to do password less ssh in GCE centos box -

i trying set hadoop in gce centos box. when trying copy public key server client [ssh-copy-id -i ~/.ssh/id_rsa.pub [user]@[client]] , throwing permission denied error. tried found in internet , bit no success. can suggest me if need add in firewall in gce console or have make work the regular process generate ssh keys locally , add public key server in order able ssh instance. it seems you're doing opposite: adding key server client. have better understanding of issue think we'll need little more info. can provide detailed configuration steps current setup?

exception - COMException + background thread + WPF -

i trying use com component & activex component in wpf application. using these components via background thread, ui remains responsive. problem com exception while using these components. (not always) is expected behavior or doing wrong? should move code ui thread, ends being time consuming. thanks

javascript - jquery selectbox remove all options except two (selector variable name) -

i have following select box <select name="loc_id_1" id="loc_id_1"> <option value="pls" selected="selected">-- please select --</option> <option value="new">-- add new --</option> <option value="1">smith company</option> <option value="6">jones company</option> <option value="23">wright company</option> </select> there multiple of these on page loc_id_2, loc_id_3, etc different info. using following detect change in of them. $("[id^=loc_id_]").change(function(){ /// magic code var lc_id = $(this).attr('id'); my_function(lc_id,data1,data2); }); this part works great. problem running part of code, call function can refresh data in changed select box. use jquery remove function refresh selectbox function my_function(id,d,f) { var sel = $("#" + id); sel.find('option[value!="new"] o

objective c - Multiple rows inside table view cell for tableview -

i have array of objects display information of inside table view. trying find examples on web on how display multiple columns per row or @ least give impression of multiple columns. for example. object person -firstname -lastname my array has collection of multiple person objects. i want display data such: john smith jane doh don johnson marco polo so far have this -(uitableviewcell *)tableview:(uitableview*)tableview cellforrowatindexpath:(nsindexpath *)indexpath { uitableviewcell * cell = [tableview dequeuereusablecellwithidentifier:@"maincell"]; if(cell==nil) { cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:@"maincell"]; } person *item = [self.data objectatindex:indexpath.row]; cell.textlabel.text = item.firstname; //add rest of properties separate columns return cell; } what best approach this? for column behavior can add label on cell ,

c++ - Creating class of SQLite -

i'm sorry, i'm showing many lines of code have small problem. take @ code file, you'll see 2 areas marked via comment [1] , [2] (maybe you'll need [3]). when run program, because console program screen have like: befor callback: 0 after callback: 0 it should after callback: 99 need. my question is why doesn't iresult variable change after modify it? update 1 1st agrument of callback function points (this) pointer (in [3])points to. thank guys. when call run_query execute query, assigned result of sqlite3_exec call iresult . overwrites 99 result of query, 0.

hadoop - query hive partitioned table over date/time range -

my hive table partitioned on year, month, day, hour now want fetch data 2014-05-27 2014-06-05 how can that?? i know 1 option create partition on epoch(or yyyy-mm-dd-hh) , in query pass epoch time. can without loosing date hierarchy?? table structure create table if not exists table1 (col1 int, col2 int) partitioned (year int, month int, day int, hour int) stored textfile; this similar scenario face everyday while querying tables in hive. have partitioned our tables similar way explained , has helped lot if querying. how partition: create table if not exists table1 (col1 int, col2 int) partitioned (year bigint, month bigint, day bigint, hour int) stored textfile; for partitions assign values this: year = 2014, month = 201409, day = 20140924, hour = 01 this way querying becomes simple , can directly query: select * table1 day >= 20140527 , day < 20140605 hope helps

spring - 404 error on clicking job link on springbatch admin ui -

i new springbatch. trying create batch application , integrate batch admin ui. versions used spring-batch-2.2.7 , spring-batch-admin-1.3.0.m1. able run job using junit , able see jobs on admin ui. when click on job, getting 404 error. home page - http://myserver/applicationname list of jobs link - http://myserver/applicationname/batch/jobs when click on job link url missing 'batch' in url. http://myserver/applicationname/jobs/jobname can please me resolve issue? thanks! please use 1.3.0 release version of spring batch admin ( http://spring.io/blog/2014/07/28/spring-batch-admin-1-3-0-release-is-available ). should work current spring batch versions (2.2.x , 3.0.x). tested spring batch version 3.0.1. there starting point configuring spring batch admin spring boot: https://blog.codecentric.de/en/2014/08/spring-batch-admin-spring-boot-2/

linux - using FFmpeg converter from .mov format from portrait to landscape mode -

i have critical problem. sharing details you. problem: - have video file in .mov format, taken iphone. video in portrait mode, want play video on webpage in landscape mode , vice versa. please suggest me, should convert video portrait landscape mode using ffmpeg. ffmpeg provide conversion feature? if yes, please send exe , command line converting portrait video landscape mode , vice versa. using these commands ffmpeg -i "inputname.mov" -acodec libvorbis -ac 2 -ab 96k -ar 44100 -b 345k output.webm ffmpeg -i "inputname.mov" -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 output.mp4 ffmpeg -i "inputname.mov" -b 1500k -vcodec libtheora -acodec libvorbis -ab 160000 -g 30 output.ogv any 1 can solve issue if trying scale can use: -vf scale='width':-1 simple replace width desired width. :-1 keep original aspect ratio rather stretching video. however, if want rotate video, should see answer: https://stackoverflow.com/

android - recycling view including RadioButtons in a multiple layout ListView -

i tried lot of different posts here nothing gave me solution. doesn't matter style tried: without viewholder, viewholder, 2 viewholders... every time clicked radiobutton , scroll, views repeated. checklist.xml <listview android:id="@+id/lv_cl" android:choicemode="singlechoice" android:layout_below="@id/iv_cl_bar" android:layout_height="match_parent" android:layout_width="match_parent" android:layout_marginbottom="25dp" /> listitem_header.xml <linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <textview android:id="@+id/tv_item_nr" style="@style/tv_cl" android:layout_marginleft="@dimen/customlist_marginleft" android:layout_width="@dimen/checklist_nr_width

android - IBM Worklight V6.1 JSONStore.init() interrputs application -

i have simple app http adapter. when call jsonstore.init() many times application gets data , works fine, maybe every 10th re-installation on same device, application interrupts in jsonstore.init() . if touch screen , hit button, workflow goes on part. can multiple times workflow finishes, too. problem appears if manually delete jsonstore data , reopen app. appears in ios , android. anybody idea causes problem? this log: 06-27 09:22:48.619: i/cordovalog(29490): changing log level debug(3) 06-27 09:22:48.619: d/cordovaactivity(29490): cordovaactivity.oncreate() 06-27 09:22:48.669: v/webviewchromium(29490): binding chromium background looper looper (main, tid 1) {42270e48} 06-27 09:22:48.669: i/chromium(29490): [info:library_loader_hooks.cc(112)] chromium logging enabled: level = 0, default verbosity = 0 06-27 09:22:48.679: i/browserprocessmain(29490): initializing chromium process, renderers=0 06-27 09:22:48.689: w/chromium(29490): [warning:proxy_service.cc(888)] pac support

solr - Index the data in DFS -

i have loaded data hdfs using command hadoop fs -put.the data set of rich documents pdfs, doc , text files. how can index data able query in solr ? use apache tika . created extracting text , metadata rich file formats pdf or doc. solr comes jar tika included need have quick @ instructions using jar command line utility , you're go : http://tika.apache.org/1.5/gettingstarted.html

php - Session [url] not available and is not among the last 1000 terminated sessions. How to solve this? -

when try launch php behat.phar the webdriver firefox window pops , feature test fails @ first step , skips rest. get: ... given on "first.php" #featurecontext::visit() session [url] not available , not among last 1000 terminated sessions. active sessions are[ext. key 51191ae0-8f6f-49d0-27b322967296] ... if use behat test passes. happens when try use selenium. i'm using minkextension giveniamon() premade function my behat.yml: default: paths: features: features bootstrap: features/bootstrap extensions: mink_extension.phar: mink_loader: 'mink.phar' base_url: 'http://10.0.0.10/' goutte: ~ selenium2: wd_host: 'http://localhost:4444/wd/hub' capabilities: version: '' my featurecontext extends minkcontext. i've been searching solution days , couldn't solve th

android - Build APK in release mode -

i having trouble building apk in release mode. no matter buildconfig.debug flag set true. i tried following set android:debuggable="false" in manifest file. used export option(by right clicking on project in eclipse) create signed apk. use android tools->export unsigned apk create apk. but when decompiled code using dex2jar , jd saw buildconfig.debug set true. also, when used following code in app check debug flag, result 'true'(in both debug , release mode) toast t=toast.maketext(this, string.valueof(buildconfig.debug), toast.length_long); t.show(); please tell me correct method build apk in release mode , protect code decompiling. please me. it has been bug adt, still able reproduce https://code.google.com/p/android/issues/detail?id=27940 as workaround may use own boolean toggle (true/false) logging this: public final class appconfig { public static final boolean debug = false; } // , later use if (appconfig.debug) { log.

python - Problems with installing Cython on a computer running Windows 7 -

i trying install cython on computer running windows 7. using mingw c-compiler. i've taken following steps: installed mingw. added c:\mingw\bin path. made sure path included no empty spaces. created file distutils.cfg in distutils directory. reads: [build] compiler=mingw [build_ext] compiler=mingw i start command prompt, got proper directory , type "python setup.py install". following output: running install running build running build_py running build_ext building 'cython.plex.scanners' extension error: unable find vcvarsall.bat as far i've understood, error regarding setting mingw c-compiler, i've aldready included path. more can do? go here? open cmd , type: set vs90comntools=%vs100comntools% change numbers edition value of visual studio running :) possibly stolen here: error: unable find vcvarsall.bat edit: you can download necessary packages here: http://go.microsoft.com/?linkid=7729279 it sets vs90commntools :)

c# - Get uniques elements -

i have int[] array1 = { 1, 2, 3 }; int[] array2 = { 2, 3, 4 }; using var intersect = array1.intersect(array2); i got 2 3 but need 1 4 can give me advice how can using linq? array1.union(array2).except(array1.intersect(array2)) explanation: first calculate set union of 2 sequences: 1, 2, 3, 4 you calculating intersection of sets: 2, 3 you finding set difference between items , intersection: 1, 4

android - speech recognizer delphi XE5 -

i find trip "android text speech jni translation" in forum. want convert speech text, same "voice recognize" . , have few code below: { tform1.trecognitionlistener } constructor tform1.trecognitionlistener.create(aparent: tform1); begin inherited create; fparent := aparent; end; procedure tform1.buttoninitspeechclick(sender: tobject); var b : boolean; begin b := tjspeechrecognizer.javaclass.isrecognitionavailable(sharedactivitycontext); if b begin speechrecognizer := tjspeechrecognizer.javaclass.createspeechrecognizer(sharedactivitycontext); reclistener := trecognitionlistener.create(self); recognizerintent := tjrecognizerintent.javaclass.getvoicedetailsintent(sharedactivitycontext); recognizerintent.putextra(tjrecognizerintent.javaclass.extra_language_model, stringtojstring('en-us')); speechrecognizer.setrecognitionlistener(reclistener); end; end; it have bug :"speechrecognize s

git - Can't remove files on github -

update i have deleted files individually selecting them on github. know better solution problem. i made ruby on rails app , uploaded code on github. repo may seen at: brainstorm-quiz-website-engine . when working on file added database named levels mistake, deleted it(by right-clicking on , clicking on delete, in hindsight stupid way) , pushed commit. but when clone repo error rake aborted!multiple migrations have name createlevels how can remove these multiple migrations github repo, nobody gets error on running rake db:migrate right now, have three migrations called 'create_levels', of try create 'levels' table. fix this, need remove files, , remove them git. first of all, make sure you're working up-to-date, clean git branch: rohit@foo brainstorm $ git fetch rohit@foo brainstorm $ git status on branch master nothing commit, working directory clean that's want see. if tells you're ahead/behind origin/master , git push

ios - Removing the last Cell in UICollectionView makes a Crash -

hi i'm working custom uicollectionview ( https://github.com/surecase/waterfallcollectionview ) works fine. i'm setting delete items uicollectionview, , can delete them fine. problem comes when i'm trying delete last item of section. it gives following error. *** assertion failure in -[uicollectionviewdata layoutattributesforsupplementaryelementofkind:atindexpath:], /sourcecache/uikit/uikit-2935.137/uicollectionviewdata.m:787 *** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'no uicollectionviewlayoutattributes instance -layoutattributesforsupplementaryelementofkind: uicollectionelementkindsectionheader @ path <nsindexpath: 0xc000000000000016> {length = 2, path = 0 - 0}' the code i'm using delete items following: - (void) alertview:(uialertview *)alertview clickedbuttonatindex:(nsinteger)buttonindex { if (buttonindex == 0){ nslog(@"erasing objects!"); //first remove ite

php - MySQL nested resources (pivot tables) permission to view/update/manage -

users transactions tasks +----+--------+ +----+---------------+ +----+--------+ | id | name | | id | name | | id | name | +----+--------+ +----+---------------+ +----+--------+ | 1 | user 1 | | 1 | transaction 1 | | 1 | task 1 | | 2 | user 2 | | 2 | transaction 2 | | 2 | task 2 | +----+--------+ +----+---------------+ +----+--------+ templates transaction_user task_transaction +----+---------------+ +---------+----------------+ +---------+----------------+ | id | name | | user_id | transaction_id | | task_id | transaction_id | +----+---------------+ +---------+----------------+ +---------+----------------+ | 1 | template 1 | | 1 | 1 | | 1 | 1 | | 2 | template 2 |

Cassandra Input Step, Pentaho Spoon: Read a negative frame size -

any query configuration cassandra input step in pentaho spoon throws exception (cassandra version 2.0.8 default configuration): 2014/06/27 10:08:47 - cassandra input.0 - error (version 5.1.0.0, build 1 2014-06-19_19-02-57 buildguy) : error desconocido 2014/06/27 10:08:47 - cassandra input.0 - error (version 5.1.0.0, build 1 2014-06-19_19-02-57 buildguy) : org.pentaho.di.core.exception.kettleexception: 2014/06/27 10:08:47 - cassandra input.0 - read negative frame size (-2113929216)! 2014/06/27 10:08:47 - cassandra input.0 - read negative frame size (-2113929216)! 2014/06/27 10:08:47 - cassandra input.0 - 2014/06/27 10:08:47 - cassandra input.0 - @ org.pentaho.di.trans.steps.cassandrainput.cassandrainput.processrow(cassandrainput.java:178) 2014/06/27 10:08:47 - cassandra input.0 - @ org.pentaho.di.trans.step.runthread.run(runthread.java:62) 2014/06/27 10:08:47 - cassandra input.0 - @ java.lang.thread.run(thread.java:745) 2014/06/27 10:08:47 - cassandra input.0 - caused by:

SQL Server stored overwritten,ow can I recover/roll-back this store procedure to its original state..? -

database: sql server 2012 name of store procedure: dbo.sp_ins_output_str date overwritten: 2014-06-26 (yesterday) i have sql server stored procedure thats overwritten accident , executed, how can recover/roll-back store procedure original state..? there's no "undo button" per se, can using following method. restore database different location, recovering time prior alter being executed extract ddl of sp restored location alter current erroneous sp using ddl taken in step 2 drop restored database feel heart rate decrease though if have no backup, you're out of luck unless have cvs contains ddl.

monitoring - Nagios config nesting - including config to config -

i'm using icinga/nagios monitor huge bunch of servers , clients. wrote scripts dynamically generate host configs. no i'm not glad big construct because want have on or 2 service checks on server. in case can create "manual" config want 20 normal checks.... now wonder if there possibility add "include" directive config? like: include "../manual/configs/hostname.cfg" so add file every dynamically created config , fill there checks if not leaf blank. thanks regards andreas not possible nagios/icinga 1.x icinga 2.x

ios - iPad simulator and external screen -

i have application wish show on external screen. the problem when go hardware -> external displays , select 1 of them - events aren't triggered. why? this doesn't entered: if ([[uiscreen screens] count] > 1) so have added next code: - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { //some code ... [self checkforexistingscreenandinitializeifpresent]; [self setupscreenconnectionnotificationhandlers]; return yes: } - (void)checkforexistingscreenandinitializeifpresent { if ([[uiscreen screens] count] > 1) { // screen object represents external display. uiscreen *secondscreen = [[uiscreen screens] objectatindex:1]; // screen's bounds can create window of correct size. cgrect screenbounds = secondscreen.bounds; self.secondwindow = [[uiwindow alloc] initwithframe:screenbounds]; self.secondwindow.screen = secondscreen; self.externalwindow=[[external

reporting services - How to handle UTC dates in a report -

i have report 2 parameters - startdate , enddate - run stored procedure returns data between these 2 dates. the dates in database stored in utc. in uk on bst (utc+1). to show times in correct time zone, in report using system.timezone.currenttimezone.tolocaltime. the end result times displayed on report correct, user still has enter startdate , enddate parameters in utc. confuses user expect able enter date in current time zone, times in database utc. how can allow date parameters entered in correct time zone? unfortunately, can't modify schema of database need find way fix on reporting side in ssrs, if date stored in database utc, has utc when select query in parameter setting. not supported change field query in parameter. requirement, can either format date local time in query. or can select utc date in parameter, , render local time

sql - ORA-00907: Distinct, join and group by in LINQ C# -

i'm getting error code ora-00907, when executing linq query below. seems oracle specific. problem seems "group by" subquery. lets have these 2 tables: user , address, columns: user{userid, addressid}, address{addressid, streetname} table address contains several rows same addressid, guess group address-table (distinct) on addressid 1 match addressid in user-table, should left join, if there no match still user-record. i have tried several different approaches, code (example): list<myobject> result = ( u in context.user.where(i => i.userid > 100) join in (from address in context.address group address address.addressid) on u.addressid equals a.firstordefault().addressid joinedaddress lfjoinedaddress in joinedaddress.defaultifempty() join email in context.email on u.userid equals email.userid jemail lfjemail in jemail.defaultifempty() select new myobject() { userid = u.userid, streetname = lfjoinedaddr

memcached - Possibility of installing php memcache extension from the official repositories? -

my question yes/no . although have read installation of php-memcache extension on lot of web sites, want confirm whether there possibility install memcache extension official repositories ? i.e. not pecl. question may seem little weird appreciate straight forward answer. the php extension memcache can installed through php-pecl-memcache package yum repositories. yum install php-pecl-memcache seems trick :)

php - Eliminate double posts in "other posts from this category" on single post page -

i using following code display posts same category on current post page: <?php global $post; $categories = get_the_category(); $ceker=false; foreach ($categories $category[0]) { if ($ceker == false){ $ceker=true; ?> <h3 class="naslovostalih">other posts category:</h3> <ul class="clanciostalih"> <?php $args = array( 'numberposts' => 10, 'category' => $category[0] -> term_id, 'exclude' => $post->id ); } $posts = get_posts($args); foreach($posts $pz) { ?> <li> <?php $title = $pz->post_title; $link = get_permalink($pz->id); printf('<a class="linkpost" title="%s" href="%s">%s</a>', $title, $link, $title); echo get_the_post_thumbnail($pz->id, 'thumb-232');

How to bind a button that open jPlayer in fullscren mode -

how bind button open jplayer in fullscren mode ? i have custom user button in html: <a onclick="javascript:$('#top_video_player').jplayer('fullscreen');event.preventdefault();" class="button" href="#">open in big screen</a> but don't work. i try: $('#top_video_player').jplayer('option','fullscreen',true) or $('#top_video_player').jplayer('option',{fullscreen:true}) also try add class .jp-full-screen button ( tag ) - no effect ): but failed again - nothing happened in jplayer initialization bind "enter" button , works - need bind html button: keybindings: { play: { key: 32, // space fn: function(f) { if(f.status.paused) { f.play(); } else { f.pause(); }

PHP mySQL preg_replace string & store result -

so after bringing code strip button id paypal form code, i'm faced difficulty of getting information stored in database. the paypal code of course this: <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="a58f6b5hvxebu"> <input type="image" src="https://www.paypalobjects.com/en_us/i/btn/btn_cart_lg.gif" border="0" name="submit" alt="paypal - safer, easier way pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_us/i/scr/pixel.gif" width="1" height="1"> </form> with following code, value a58f6b5hvxebu removed of above: <?php $string = ''; $res = preg_replace('~(.+)(name="host