Posts

java - How do I change the encoding of my jar file to manage characters such as "█▓▒ CRIT! ░░╚╡▌▌╞╗░░"? -

edited hey guys. my code using pircbot send irc messages twitch.tv. the messages include characters such '█▓▒ crit! ░░╚╡▌▌╞╗░░' example output code: sendmessage("#twitchraidstwitch", "/me █▓▒ crit! ░░╚╡▌▌╞╗░░"); so these characters displayed '?' in eclipse. didn't work until changed window -> preferences -> text file encoding us-ascii. (though i've learned these characters aren't ascii.) when export project jar , try run in cmd, characters '?'. how got getting work in cmd? thanks! ok got work. i used setencoding("utf-8"); score_under suggested. didn't change didn't hurt either. i launched java -dfile.encoding="utf-8" -jar jarfile.jar , did trick. i figured out utf-8 works on eclipse fails work exported jar

javascript - Code break when I'm trying to use an object methods in jquery mobile -

this class var player = function (name) { this.init(name); } $.extend(player.prototype, { name: '', goals: 0, fouls: 0, holding: 0, games: 0, wins: 0, taken: 0, init: function(name){ this.name = name; this.goals= 0; this.fouls= 0; this.holding= 0; this.games= 0; this.wins= 0; this.taken= 0; }, setgoal: function (num) { this.goals+= num; }, setfouls: function (num) { this.fouls+=num; }, setholding: function (holding) { this.holding = (this.holding * (this.games-1) + holding) / (this.games); }, setgames: function () { this.games+=1; }, setwins: function () { this.wins+=1; }, settaken: function (num) { this.taken+=num; } }); i tryed man...

java - Eclipse Maven Workspace Resolution not seeing Generated Classes -

Image
i have 2 maven projects in eclipse, jar , war. war has dependency on jar, resolved through workspace resolution. the problem jar has generated classes, added jar through build-helper-maven-plugin. these classes aren't being resolved in war project. example: auto-completes class keeps saying can't found. more importantly, when running glassfish through eclipse, class not found these classes. if disable workspace resolution works fine, hope use workspace resolution. ideas? edit: folder structure. maven workspace resolved persistence project in lower image in maven dependencies folder, seeing top , bottom of folder. idk if correct, talking eclipse problems - not "see" generated classes right? to fix it, have add generated sources directory eclipse's build path , should fix problem. right click on project has generated classes->buildpath->conf buildpath in source tab - click add folder select directory build helper generates java fi...

File uploads to another directory other than spcified directory in PHP code -

i have folder struct this: admin-panel -- thesis-scripts -- add_thesis.php uploads and trying upload .docx file uploads directory. here code: $targ_dir = "uploads/"; $targ_file = "../" . $targ_dir . basename($_files["thesisfile"]["name"]); $flagok = 1; $tempfolder = $_files['thesisfile']['tmp_name']; if(move_uploaded_file($tempfolder, urlencode($targ_file))){ echo $targ_file; } however, code above results file upload inside thesis-scripts folder. how can move file uploads folder? help. purposely added ../ in $targ_file because save file path in database. upload_tmp_dir need, change default temporary directory, according documentation here upload_tmp_dir string temporary directory used storing files when doing file upload. must writable whatever user php running as. if not specified php use system's default. if directory specified here not writable, php falls sy...

do windows azure mobile service scripts have transient fault handling -

when access sql table via server scripts sql azure retry logic implemented somewhere following request.execute(); ? yes, underlying code try several times complete operation sql azure on 30 second window.

html - Javascript slider not displaying array? -

here's link page i'm working on: https://www.servicerr.com/partners.php whenever click on different numbers, should update prices below slider. javascript file contains prices: https://www.servicerr.com/js/set_my_price.js what can't figure out why prices won't change , why every number staying highlighted when click 1 of next. about year ago, had working , had re-create it. can't figure out i'm doing wrong time around. appreciated. here links 2 other files javascript files make work: here's html code being used: <div class="product2" style="margin-right:2%"> <div class="title">starter</div> <div class="monthly">partner discount</div> <ul> <div class="servicerr-pricing-packet starter"><span class="original"><span style="font-weight: bold; border-bottom: 0px none; color: rgb(0, 125, 199); font-size: 70px; ...

Using Float is not working in SQL Server 2008 -

i have sql query select exchangerate, totalamt, exchangerate * totalamt totalamtconvert, round(exchangerate * totalaramt, 0) totalamtround dbo.table my results: exchangerate 22450 totalamt 16593.67 totalamtnoround 372527891.5 totalamtround 372527891 i want totalamtround = 372527892 can me? this reason use should not use float. approximate datatype. use decimal or numeric datatypr declare @exchangerate numeric(22, 6) = 22450, @totalamt numeric(22, 6) = 16593.67, @exchangerate1 float = 22450, @totalamt1 float = 16593.67 select numeric_result = round(@exchangerate * @totalamt, 0), --correct float_result = round(@exchangerate1 * @totalamt1, 0), --incorrect converted_numeric_result= round(cast(@exchangerate1 numeric(22, 6)) * cast(@totalamt1 numeric(22, 6)), 0) --correct when select @exchangerate1 * @totalamt1 gives 37252...