Posts

c# - VDProj directory has no write access after installation -

i have vdproj project use create setup program application. i've had install visual studio 2010 (on machine) allow me run this, has been removed vs2012.. annoying.. that's different thread. when end user installs program, creates files in c:\program files\mycompany\ folder, inherits security parent directory, has no write access user. the problem is, when program runs, creates log files, , software update if required. application requires write access directory. i'm guessing install software 'mydocuments' folder, or folder has write access, wondering if there's better way of doing this? when program needs write protected locations program files, can launch using shellexecute functionality , runas verb/operation. trigger consent dialog uac require administrator give permission elevation. annoying if happens often, when necessary.

laravel 500 internal server error -

i'm trying deploy laravel 4 app on 1and1 shared hosting, keep getting 500 internal server error. i have checked following: using php 5.4 mcrypt php extension installed chmod 777 /app/storage/ domain pointing /laravel/public/ i'm out of ideas now? one thing i've noticed if go /index.php/, "fatal error: require(): failed opening required" error. mean of paths wrong somewhere? doubt it, because app working fine locally. any amazing. thanks try running composer install after cloning repo. vendor directory in laravel .gitignore file default. edit: re-read follow-up comment , realized shouldn't attempt answer questions after midnight.

java - Reading, parsing and sorting data from a CSV file -

i need read in csv file, parse , sort value according these parameter: the top 10 selling products the top performing branches the worst performing branches the employee took sales here code far, advice on how sort it? import java.io.*; public class csv { public static void main(string[] args) throws ioexception { try (bufferedreader csvfile = new bufferedreader(new filereader("/k:/connexicawork/data/data.csv"))) { string[] dataarray = null; string data = csvfile.readline(); // read first line. while (data != null) { data = data.replace(",00", ".00"); dataarray = data.split(",(?=([^\"]*\"[^\"]*\")*[^\"]*$)"); //split on comma if comma has zero, or number of quotes in ahead of it. (string item : dataarray) { system.out.print(dataarray[34] + " # "); } system.out.println(); // print data line. ...

sql - squeryl: how to use oneToMany relation for constructing queries -

i have liftweb application in use record/squeryl orm framework. here schema: object appschema extends schema { import org.squeryl.dsl.onetomanyrelation val groups = table[group]("groups") val domains = table[domain]("domains") val grouptodomains = onetomanyrelation(groups, domains). via((g, d) => g.id === d.groupid) } object group extends group metarecord[group] loggable { } class group extends record[group] keyedrecord[long] loggable { override def meta = group @column(name = "id") override val idfield = new longfield(this) val name = new stringfield(this, 700, "") @column(name = "date_added") val createdat = new datetimefield(this) lazy val domains: onetomany[domain] = appschema.grouptodomains.left(this) } object domain extends domain metarecord[domain] loggable { } class domain extends record[domain] keyedrecord[long] { override def meta = domain @column(name = "id") overri...

php - Find days difference between two dates with range of thousands of year -

how can find days difference in php dates may 1/1/1 1/1/1000000. strtotime(), mktime(), date->diff() these function not helpful more limit of unix timestamp. as far know, datetime allows dates in periods of time. before unix. quite possibly fial on 1/1/10000000 needs testing. to difference, use diff $datetime1 = new datetime('2009-10-11'); $datetime2 = new datetime('2009-10-13'); $interval = $datetime1->diff($datetime2); echo $interval->format('%r%a days'); if diff doesn't work on ranges, try https://stackoverflow.com/a/676828/486780 .

Android adapter for a custom layout listview based on a class -

i have class looks this: public class vizita { public int icon; public string titlu; public string loc; public string idviz; public vizita(){ super(); } public vizita(int icon, string titlu, string loc, string idviz) { super(); this.icon = icon; this.titlu = titlu; this.loc = loc; this.idviz = idviz; } } i use asynctask retrieve json array php. works perfect simple layout of listview. want use more complex layout, designed 1 uses 4 values vizita.class above. not know how set adapter it, because way try it, gives me errors. of course trying in onpostexecute, this: public class myactivity extends activity { {...} jsonarray lststat; {...} public jsonarray liststatus() { jsonarray jdata=post.getserverdatax(url_connectx); return jdata; } class asyncpost extends asynctask< string, string, string > { vizita weather_data[]; .... pro...

javascript - How can I know when there is a new line on a Wheel of Fortune Board? -

Image
i following code here in can play wheel of fortune-like game 1 person (more of test of javascript objects). my issue when screen small enough, lines not seem break correctly. for example: where circle is, have "blank" square. reason why have blank square when screen big enough, square serves space between words. is there way in code efficiently know if blank square @ end of line , not show it, , window gets resized, show accordingly? the thought had add window.onresize event measure how big words related how big playing space , decide based on fact, seems inefficient. this code creating game board (starts @ line 266 in my fiddle ): wheelgame.prototype.startround = function (round) { this.round = round; this.lettersinpuzzle = []; this.guessedarray = []; this.puzzlesolved = false; this.currentpuzzle = this.puzzles[this.round].touppercase(); this.currentpuzzlearray = this.currentpuzzle.split(""); var currentpuzzlearray ...