Posts

Showing posts from July, 2014

Testing warnings in R by comparing strings (best idea?) -

i'm working on r package , need writing r test functions meant check whether correct warning being thrown on c-side code , caught on r side. let me give background on i'm working on exactly: most of i'm writing done on c side. in addition, have if-statement type macro in c allows coder pass warning r in form of string. basic premise if(statement_true) pass_warning_to_r("warning string pass"). i'd test whether these warnings being thrown when expect/need them writing r file uses trycatch blocks. so far i've written similar this: counter <- 0 trycatch({ function_im_testing() }, warning = function(war) { # check if warning expected , if increment counter if(tostring(war)=="the warning i'm expecting/testing for"){ print(tostring(war)) counter <- counter + 1 } }, error = function(err) { print(tostring(err)) }, = { print("leaving trycatch") }) # stop if 3 warnings expected aren'

aptana3 - Aptana Studio 3.4 HTML preview display error -

Image
i updated aptana studio 3.3 build: 3.4.0.201304151603. on windows 7 x64 system. after updating, html preview window no longer behaves correctly. html content rendered in right half of preview window, , left half left blank, except url bar controls. url file being previewed not shown in url field. wondering if 1 of other plugins causing problem, tried fresh install no plugins beyond installed along aptana studio. behavior same. wondering if windows issue, tried installing studio 3.4 on ubuntu 12.10 virtual machine, behavior same. any suggestions?

javascript - jQuery mobile: links have improper format on first load? -

i'm learning jqm , backbone.js , have few problems. im making recipe app following todo list example trying blend them both. anyway can't refresh page besides first one, i'm getting undefined variables. believe has dom , many views have. secondly upon entering recipe search query api, displays results first plain links! if got forward page or page , return results page display links should jqm style. because couldn't figure how or append in js, did in html. i know long shot can give me guidance hell i'm doing wrong, general advice, anything? var todo = backbone.model.extend({ defaults: function() { return { id: 0, title: 'defaultname', imgurl: 'defaultimageurl', order: searchtemp.nextorder(), rating: 0, timetomake: '', salty: 0, sour: 0, sweet: 0, bitter: 0, isperm: false, taggedforlist: false }; }, initialize: func

actionscript 3 - In AS3, how do I run code when a when the movie starts? -

i'm making level editor game, , able access list of classes included in game. have static function in main class: public static function register(c:class, category:string):void { if (classregister[category] == null) { classregister[category] = new array(); } classregister[category].push(c); } then, in each class want registered, put static initializer: { main.register(prototype.constructor, "motion"); } however, static initializers called when class first gets used. there way class force used right when game starts? i'm aware explicitly list registered classes in main file, that's suboptimal in main file have edited whenever new class added wants registration. thanks, varga list class definition in applicationdomain, , filter them based on naming convention or type (an interface?). to achieve this, can use applicationdomain.getqualifieddefinitionnames() ( docs ), if target flash

html - Bootstrap Thumbnail Class Not Recognized -

whenever try invoke thumbnails per twitter documentation, black dots on screen: <ul class="thumbnails"> <li class="span4"> <a href="large.jpeg" class="thumbnail"> <img data-src="http://placehold.it/330x230" alt="large"> </a> </li> am doing wrong here? can show using media-grid...which strange since that's old functionality, right? edit: still black dots left of thumbnails using media-grid, too. how turn off, , why isn't html wrote working? full code: <html> <head> <meta charset="utf-8"> <title>walls</title> <link rel="stylesheet" href="http://flip.hr/css/bootstrap.min.css"> <link rel="stylesheet" href="custo.css"> <script src="js/jquery.js" type="text/javascript" charset="utf-8">

html - How to vertically and horizontally centre this input field in its container -

i trying horizontally , vertically centre input field inside container ( green box ) is there way without css3 flexbox techniques ? everything i've tried including normal centering techniques, margin , auto, , positioning doesn't work. well, problem positioning work, there has better way moving down. any ideas? here page: https://dl.dropboxusercontent.com/u/270523/help/new.html i trying centre input id #searchinput add position: relative section container, use absolute positioning vertically centre align input field using negative margin of half input height: #input { position: relative; } #searchinput { position: absolute; top: 50%; margin-top: -0.809rem; }

java - Sorting multiple arrays within a file. Putting states population in order -

**this first post don't know if did right. have read file , put list in order smallest largest population. alabama , shows 1 time. think problem "for" statement not sure. "return" statement. file set this alabama,4779736 alaska,7102313** import java.io.file; import java.io.ioexception; import java.io.printwriter; import java.util.scanner; public class inorder { /** * @param args * @throws ioexception */ public static void main(string[] args) throws ioexception { // todo auto-generated method stub printwriter prw = new printwriter("outfile.txt"); file f = new file("census2010.txt"); if(!f.exists()) { system.out.println( "f not exist "); } scanner infile = new scanner(f); infile.usedelimiter ("[\t|,|\n|\r]+");

javascript - Angularjs alway blank element in select tag -

i new angular.js (and forum) , want try out basics, got stucked @ working select , options. i have small app , want add select-box, blank option want rid of. i searching here on stackoverflow and, of course, google, , tried out may options , hints, nothing seems work me. i hope can me here... about app: have items attribures item.name or item.price etc. , want store value of selected tag item.store. this part of view: <td> <select ng-model="item.store" ng-options="item.storename item in items.stores"> </select></td> and have in controller: $scope.items.stores = [ {storeid : 1, storename : 'spar' }, {storeid : 2, storename : 'billa' }, {storeid : 3, storename : 'merkur' }, ]; amongst others tried one: $scope.item.store = $scope.items.stores[1]; but error message: "$scope.item undefined...." although ng-model named item.store, assume there problem . or that... tha

c# - Make Player Flash When Hit -

i'm trying make player flash when hit. have hit detection working. changes red. i'm wondering how make actual flashing occur. here's snippet handles being hit: if(otherobject.comparetag("minion")) //hit minion { if(hitfromtop(otherobject.gameobject)) //if player jumped on enemy { otherobject.getcomponent<minion>().setmoving(false); //stop moving playsound(killenemysound); //play killing enemy sound jump(); destroy(otherobject.gameobject); //kill minion } else //otherwise, enemy hit player { if(cantakedamage) { changecolor(color.red); losehealth(1); //lose health cantakedamage=false; yield return new waitforseconds(1.5f); //delay taking damage repeatedly changecolor(color.white); cantakedamage=true; } //indicate lost hea

caching - How to clear zend metadata cache using tags -

i'm using redis cache backend, clean metadata cache - there kind of default tag(s) zend metadatas remove cache without flushing data? components such zend_db_table_abstract don't use tags save objects cache, believe trying clean cache the empty tag should it: $cache->clean( zend_cache::cleaning_mode_matching_any_tag, array('') );

ibm mobilefirst - Worklight 5.0.6 wipes out native customizations in shell -

i upgraded environment v5.0.6. problem everytime start eclipse this: [2013-04-19 18:38:41] fwlst1017i: [appshell] upgraded latest platform version. when upgrade takes place, reverts templates , adds class files iphone\native folder , removes plugins configured in shell: removes custom plugins components/appshell/iphone/native/classes resets project.pbxproj.wltemplate.wluser stock removing includes classes resets config.xml.wluser removing mappings plugins it shows @ end of upgrade process: failed upgrade worklight project 'appmobile' latest platform version. [null] is why keeps running upgrade , reverting changes? according question, have .wluser files, means wrong project. can please let me know whether problem still exists , whether still have files in project?

.net - Regular expression for password with certain special characters excluding all others -

i have provide data annotation regex password that's specified as: min 8 chars min 1 upper min 1 lower min 1 numeric min 1 special char can 1 of following:$|~=[]'_-+@. (and password can contain no other special chars besides these) it's exclusion of special characters giving me headache. i've come not work: "^.*(?=.{8,})(?=.*[a-z])(?=.*[a-z])(?=.*[\d])**(?(?!.*[^$|~=[\]'_\-+@.])|([^\w\w])).*$** it resolves enter invalid. whereas (for special chars) on own work: "(?(?!.*[^$|~=[\]'_\-+@.])|([^\w\w])).*$" and know first part works, missing make them work together? alternatively, there simpler way of achieving this? (.net environment) if want in 1 regex pattern: ^(?=.*[a-z])(?=.*[a-z])(?=.*\d)(?=.*[$|~=[\]'_+@.-])[a-za-z0-9$|~=[\]'_+@.-]{8,}$ that should trick. require, lower case, upper case letter, digit , symbol lookaheads. note in character class, need move - end or escape it. otherwise creates charact

php - Why is session variable not being saved after redirect in Chrome only? -

Image
in firefox, session variable saved , retrievable after redirect in chrome, after redirect, says doesn't exist. redirect code: session_start(); $_session[ "test" ] = "exists"; session_write_close(); header( "http/1.1 301 moved permanently" ); //removing 301 line doesn't header( "location: http://" . $_server[ "http_host" ] . "/" ); exit(); retrieving session: session_start(); if ( isset( $_session[ "test" ] ) ) { echo $_session[ "test" ]; unset( $_session[ "test" ] ); } why doesn't work in chrome? edit: think found answer doesn't make sense. if remove line unset( $_session[ "test" ] ) saves session after redirect! why occur? session should server-side. , unset after "echo" statement! how not echo value because unset variable after that?! does know what's going on? it may problem way redirect being handled. you're pres

Correct encoding of this existential type in Scala? -

i'm interested in encoding stream type stream fusion paper coutts et al. i'm exploring stream fusion in scala, attempting use macros in place of ghc's rewrite rules. data stream = ∃s. stream (s → step s) s data step s = done | yield s | skip s i've tried few different approaches i'm not sure how encode type of stream in scala such both occurrences of s refer same type. i've written step type as. sealed abstract class step[+a, +s] case object done extends step[nothing, nothing] case class yield[a, s](a: a, s: s) extends step[a, s] case class skip[s](s: s) extends step[nothing, s] so far type seems correct. i've used covariance function of type => work if receive yield , return done or step. in haskell. my sticking point has been signature of stream. i've been attempting define case class. signature has worked far using exists type operator , tuple perserve equality of type s in both components below. type ex

java - Mean of two ints (or longs) without overflow, truncating towards 0 -

i'd way calculate (x + y)/2 2 integers x, y in java. naive way suffers issues if x+y > integer.max_value, or < integer.min_value. guava intmath uses technique: public static int mean(int x, int y) { // efficient method computing arithmetic mean. // alternative (x + y) / 2 fails large values. // alternative (x + y) >>> 1 fails negative values. return (x & y) + ((x ^ y) >> 1); } ... rounds towards negative infinity, meaning routine doesn't agree naive way values {-1, -2} (giving -2, rather -1). is there corresponding routine truncates towards 0? "just use long " not answer i'm looking for, since want method works long inputs too. biginteger not answer i'm looking for. don't want solution branches. you need add 1 result if lowest bits different (so result not exact , need round), , sign bit in result set (the result negative, want change round down round up). so following should (unt

cocoa touch - iOS: Issue modifying button's color -

Image
i have following code in .h file: #import <uikit/uikit.h> @interface scloginviewcontroller : uiviewcontroller @property (weak, nonatomic) iboutlet uibutton *btnlogin; @end and following code in .m file: - (void)viewdidappear:(bool)animated { [super viewdidappear:animated]; // additional setup after loading view nib. // add gradient buttons btnlogin.layer.cornerradius = 10; cagradientlayer *gradientlayer = [cagradientlayer layer]; gradientlayer.frame = btnlogin.layer.bounds; gradientlayer.colors = [nsarray arraywithobjects: (id)[uicolor colorwithwhite:1.0f alpha:0.1f].cgcolor, (id)[uicolor colorwithwhite:0.4f alpha:0.5f].cgcolor, nil]; gradientlayer.cornerradius = btnlogin.layer.cornerradius; [btnlogin.layer addsublayer:gradientlayer]; // add shadow btnlogin.layer.shadowcolor = [uicolor darkgraycolor].cgcolor; btnlogin.layer.shadowopa

Subquery returns more than 1 row - Mysql with Visual Studio 2010 -

i have next code in mysql: ("select id_viaje, (select nombre unidades, viaje id_unidad = id_unidades), (select nombre empleados, viaje id_empleado = id_conductor), (select nombre empleados, viaje id_empleado = id_guarda), (select nombre ciudad, viaje id_ciudad = id_salida), (select nombre ciudad, viaje id_ciudad = id_llegada), fecha_salida, fecha_llegada viaje; ") i have tried limit 1 @ end of each one, have replaced = in , have no idea why showing me error: 22:30:30 select id_viaje, (select nombre unidades, viaje id_unidad in (id_unidades)) , (select nombre empleados, viaje id_empleado in (id_conductor)) ,(select nombre empleados, viaje id_empleado in (id_guarda)) , (select nombre ciudad, viaje id_ciudad in (id_salida)) ,

sockets - Java throwing errors when client sends Object to server, with no errors/warnings in IDE -

somebody please help, have client , server , i'm sending object client in code says send packet of data: class data implements serializable { /** * */ // private static final long serialversionuid = 1l; string = "ok baby"; string b = "hi there"; } public void connect(string[] args) throws ioexception { socket kksocket = null; printwriter out = null; objectoutputstream oos = null; bufferedreader in = null; try { kksocket = new socket("192.168.0.5", 1337); out = new printwriter(kksocket.getoutputstream(), true); oos = new objectoutputstream(kksocket.getoutputstream()); in = new bufferedreader(new inputstreamreader( kksocket.getinputstream())); } catch (unknownhostexception e) { system.err.println("don't know hostname, network problem.");

perl - Reading in the First Line from a .txt File, Removnig it from the .txt., and Sliding all of the Other Lines Up by 1 Unit -

i have .txt file in each line 1 element. subject suggests, i'd input first row .txt. then, i'd remove .txt file i've inputted it. @ same time, i'd slide each element 1 row such former second row element becomes new first row. i'm not quite sure how proceed beyond: open( $l, '<', 'input.txt' ) or die "can not open input.txt: $!"; use strict; if ($#argv) { print "\nusage: test.pl filename\n\n"; exit(); } $f; if (open($f, $argv[0])) { print scalar(<$f>); $s = join('', <$f>); close($f); if (open($f, '>', $argv[0])) { print $f $s; close($f); } } else print "\ncan't open input file $argv[0]\n\n"; or sub sub slidefile($) { $filename = shift(); $f; if (open($f, $filename)) { <$f>; $s = join('', <$f>); close($f); if (open($f, '>', $filen

c# - Reading Sqlite files with a "light" dll -

i have small disk cleaner, 400 kb in size. in order clean firefox, need access places.sqlite. which fine, used system.data.sqlite.dll , works good. however, problem 1.1mb. dobule size of disk cleaner. like increase download size of program 400kb 1.5mb. is there way can slim dll or maybe use type of method access places.sqlite? thanks help. i afraid using including 1mb dll in program choice. don't think there method 'compress' dll. , 1.5mb still small file size.

ios - On non jailbreak iphone,Can I run a binary in my Application bundle directory? -

i have executable binary file in app folder. want use app run code , have signed code certificate. don't know how launch it. fork, execvl , posix_spawn forbidden sandbox profile. there other way launch it? no not possible. sandbox profile prohibits it.

sql server 2008 - mssql_bind in PHP truncates string -

i'm using freetds connect , work sql server 2008 database php 5.3.15 on linux. have column in database has datatype of varchar(max) . unfortunately, i'm having trouble setting value of column via mssql_bind() when value is on 8000 characters. value gets stored in database, truncated @ 8000 characters. stored procedure i'm calling has set input variable proper datatype ( varchar(max) ). here i've tried: in php.ini have set both mssql.textlimit , mssql.textsize maximum allowed values (2147483647). seems no matter set these have no affect on size of text can send through. is, setting these value of, say, 100, not truncate text @ 100 characters. setting mssql.textlimit , mssql.textsize using ini_set() . again, seems have no affect. setting maxlen attribute of mssql_bind() number higher 8000. above, setting lower number seems have no affect. changing datatype of column text and/or changing type attribute of mssql_bind() sqltext . additionally, mak

java - converting 2d string array into 2d double with different length -

i trying convert 2d string array 2d double array. length of array different each line, unable convert array double. getting null pointer exception error. file this 5 67 1.0, 0.0, 0.0, 0.456 0.0, 1.0, 0.0, 0.725 0.0, 0.0, 1.0, -0.150 public class first { public static void main(string[] args) throws filenotfoundexception { java.io.file test2 = new java.io.file("object.key"); scanner input = new scanner(test2); string arr[][]=new string[30][30]; int i=0,j=0; while(input.hasnext()) { string val=input.nextline(); j=0; if(val.contains(" ")) { string str[]=val.split(" "); int cn=str.length; while(cn>0) { arr[i][j]=str[j]; cn--; j++; //system.out.println(cn); } } else arr[i][j]=val; i++; } double[][] intarray=new double[arr.len

Python/PostgreSQL - check if server is running -

i've started using psycopg2 module access local postgresql server , i'll way progammatically check if server started program can handle error when try start server: psqldir = 'c:/program files/postgresql/9.2/bin' # windows username = os.environ.get('username') dbname = 'mydb' os.chdir(psqldir) os.system('pg_ctl start -d c:/mydatadir') # error here if server started conn = psycopg2.connect('dbname=' + dbname + ' user=' + username) cur = conn.cursor() i experimented little , seems returns "0" or "3", solve problem, didn't find information on postgresql/psycopg2 manual confirms if documented behavior: server_state = os.system('pg_ctl status -d c:/mydatadir') what's best way? thanks! from the pg_ctl documentation : -w wait startup or shutdown complete. waiting default option shutdowns, not startups. when waiting startup, pg_ctl repeatedly attempts connect serv

How to create Rest api,and how to consume the rest api with android apps -

how have create rest api our websites,i want connect server android apps using rest api.how connect rest api android apps,what ways behind those. here have nice rest api, basics doing http post , get: public class restclient { private arraylist<namevaluepair> params; private arraylist<namevaluepair> headers; private string url; private string response; private int responsecode; public string getresponse() { return response; } public int getresponsecode() { return responsecode; } public restclient(string url) { this.url = url; params = new arraylist<namevaluepair>(); headers = new arraylist<namevaluepair>(); } public void addparam(string name, string value) { params.add(new basicnamevaluepair(name, value)); } public void addheader(string name, string value) { headers.add(new basicnamevaluepair(name, value)); } public void execute(requesttype requesttype) throws exception { switch(requesttype) { cas

livecode - How do I limit the number of columns of a basic table field? -

i have basic table field. need 3 columns displays more. how limit three? , how set width of columns? set tabstops of fld "data" 100,0,150,0,0 will hide column 2 , 4, 5, 6, ..., n. if want hide column, set it's width 0. if last parameter 0 rest of columns not visible, , it'll missing vertical line of last visible column. if want vertical line after last field, add additional 0 [set ... 100,0,200,0,0]

javascript - How to I get (this) parents child using Jquery -

example: <div id="parent"> <div id="child"></div> </div> we know when want value of parent's child can use selector ("#parent #child") . however, how can child using method. (this+'#child') not job. well!! if using id selector don't need use context id supposed unique... $('#child') otherwise yes $('childselector', this)

php - how to Check string present in database column? -

i have document table fields id , sender_id , receiver_id , receiver_id contains string value u12,u13,u14 logged in user , want find records in receiver_id contains user_id means user_id u13 . how write query fetch records. my query is: $seldoc="select * documents sender_id='u".$_session['userid']."' or "u".$_session['userid']." in (receiver_id) order id desc"; but got error unknown column 'u13' in 'where clause' you string concatenation messed up, should be: ( further simplified ) $seldoc="select * documents 'u".$_session['userid']."' in (senderid,receiver_id) order id desc"; when statement above parsed, this: select * documents 'uxx' in (senderid,receiver_id) // xx userid order id desc as sidenote, query vulnerable sql injection if value( s ) of variables came outside. please take @ article below learn how prevent it. usin

css - center using margin:auto for an img in a paragraph is not working -

Image
i trying center image inside <p> used website, http://www.w3.org/style/examples/007/center.en.html , , found similar examples here nothing seems work. my html code is <div class="span4"> <h3 class="aglow" id="h3body">forms</h3> <p> <a class="btn btn-link "href="teacher_forms_list.html"> <img class="operationsbuttons" src="newforms.png" alt="forms"> </a> </p> </div> and css img.operationsbuttons { display: block; margin-left: auto; margin-right: auto; } but reason image still on left (attaching picture of image , h3 centered on it) thank help as @tamil selvan answred, can use text-align: center; - demo if using margin: auto; need define width img element display: block; img inline element default - demo

php - Use jQuery AJAX to upload a file via FormData -

i want upload single file using jquery , replace upload form output php script has processed file upload. currently after click submit, receive blank response php script. think it's because form data (file , upload inputs) being overwritten upload data? any solving appreciated! here code: html <div id="container"> <form id="form" enctype="multipart/form-data"> <input name="file" type="file"> <input type="hidden" name="upload"> </form> <a href="javascript:void(0)" onclick="uploaddata($('#form').serialize(), 'upload.php', '#container'); return false;">upload &gt;</a> </div> javascript function uploaddata(data, url, container) { var formdata = new formdata($(data)[0]); $.ajax({ type: 'post', url: url, data: formdata, cache: fal

php - How to secure hidden fields data? -

i have form in have 2 hidden fields. want secure data in hidden fields no 1 can see through page source , fire bug. alreday used session , it's working cant use that. need altrnative please help. <form name="android" method="post" action="http://apps.createcoolapps.com/c2dm_send.ashx" target="_blank" onsubmit="return valid();"> <table align="center"> <?php $qry_id=mysql_query("select * users u_name='$_session[u_name]'"); while($id_fetch=mysql_fetch_assoc($qry_id)){ ?> <input type="hidden" name="publisherid" value="createcoolapps" /> <input type="hidden" name="username" value="<?php echo $query_id[manager_uname];?>" /> <input type="hidden" name="pass" value="<?php echo $query_id[manager_pass];?>" /> <tr align="ce

Bash for in loop that executes wrongly when no file found -

i have bash "for in" loop looks pdf files in directory , prompt them (simplified example) #!/bin/bash pic in "$input"/*.pdf echo "found: ${pic}" done this script works when there pdf files in $input directory, however, when there no pdf files in directory, : found: /home/.../input-folder/*.pdf is expected behaviour ? how can deal with in loop ? need use ls or find ? i tried , without quotes around "$input". there no spaces in files names , directory names. many ideas. this expected behavior. according bash man page , in pathname expansion section: after word splitting, unless -f option has been set, bash scans each word characters *, ?, , [. if 1 of these characters appears, word regarded pattern, , replaced alphabetically sorted list of file names matching pattern. if no matching file names found, , shell option nullglob not enabled, word left unchanged. as result, if no matches "$input"/*.pdf

android - How to get substring with javascript code from HTML code in Java? -

i parse 1 web page , need min , max values slider elements. page parse jsoup, values can't it.. in javascript blocks. <script> $(function(){ $("#p_slider").slider({ range:true, step:1000, min:2000, max:49490.00, values:[2000,49490.00], slide:function(event, ui) { $("#p_from").val((ui.values[0] != 2000)?ui.values[0]:""); $("#p_to").val((ui.values[1] != 49490.00)?ui.values[1]:""); $("#p_from").change(); $("#p_to").change(); } }); }); </script> <script> $(function() { $("#filter_543_slider").slider({ range:true, step:1000, min:0, max:17600.000, values:[0,17600.000], slide:function(event, ui) { $("#f543_from").val((ui.values[0] != 0)?ui.values[0]:""); $("#f543_to").val((ui.values[1] != 17600.000)?ui.values[1]:""); $("#f543_from").change();

Crystal report for visual studio 2012 application -

using visual studio 2012 , crystal report 9 when run report in client machine, showing error " could not load file or assembly "crystaldecisions.windows.forms,version = 13.0.2000.0 culture = neutral publickeytoken = 692bea5521e1304 or noe of depcendenceis. system cannot find file specifified. " i cannot able find crredist2010_x86 file internet. i downloaded file sap site " crforvs_13_0_5.exe ", try install on client machines showing error need install atleast vs2010 or vs2012 proceeding installation. how fix issue. here is! on jan 14, 2013 sap released sap crystal reports, developer version microsoft visual studio - 2012 you can download here support integration visual studio 2012 , 4.5 .net framework runtime. added support following platforms: os: windows 7 sp1, windows 8, windows 2012 database: sql server 2012, hana sp5 web browser: firefox 16, ie10 (limited support; more information forthcoming soon) other technolo

javascript - Hide bottom of div containing iframe via CSS -

i have iframe in html page! had set iframe height 100% , scrolling=no. framed page having lots of white space @ bottom! need remove 100px of bottom via stylesheet cannot change iframe height! i can place iframe in div , hide bottom part of div via css. you need place iframe in div height 100% iframe , adjust height of div according giving fixed height (iframe height -100px). need remove scroll of div using below css styles: overflow-y:hidden; overflow-x:hidden;

Delphi 5, how to retrieve data from MySQL's tis620 fields? -

Image
i have web application written in php using mysql database back-end. to store language(thai) data, i'm using tis620 charset on database tables, setting great web application @ moment. i'm going write windows application access same database web application, have faced problem retrieving data tis620 fields. this table's default collation, using tis620 for testing purpose, setup eng field's collation use utf8 i inserted 1 sample record table i'm using oracle's mysql connector/odbc 5.1 odbc driver, , tried both setup utf8 , tis620 i'm using delphi 5, ttable connect the database table field(s) utf8 can retrieved field(s) tis620 (table's default) cannot retrieved although use field editor create fields utf8 field(s). please give me advices, tis620 best suit web application @ moment, if converted fields utf8 solve problem have problem web application instead. so how use bde data access component (ttable, tquery) retrieve

sorting - Want to sort large csv file having date in the format ddMONYYYY using unix sort command -

aman@gmail.com,"08oct2012" abc@gmail.com,"11jul2012" def@gmail.com,"16dec2010" abc@gmail.com,"16mar2011" aman@gmail.com,"21apr2011" abc@apple.com,"12dec2010" xyz@fb.com,"06mar2011" want sort above csv using unix sort command 1st email address , date i have tried like sort -k1 -k212 -k23m -k26 file.csv but didn't work out. has idea how sort csv? you may need sort -t, indicate delimiter comma , . then, should work: sort -t, -k1 -k2 file.csv anyway, sort date should firstly -> unix stamp conversion in date field.

coldfusion - RAILO with sftp -

railo support sftp mapping can use cffile tag various operation, more information @ https://github.com/getrailo/railo/wiki/railo-resources#mappings i can create mapping like this.mappings["/ftpdir"] = "ftp://username:password@server.com/dir"; and work fine me copy/moving etc. issue in case want use sftp instead of ftp should change in mapping. update have notice in sftp using port 22 same have tried supplied in ftp path below this.mappings["/ftpdir"] = "ftp://username:password@server.com:22/dir"; but doesn't work. railo tried search directory in local computer instead of ftp server. thanks, pritesh if want use sftp instead of ftp, change protocol in url sftp://. i not think need specify port 22 explicitly. it's defuault ssh/sftp.

salt - javascript behavior for '\352' decimal value -

while checking login page, found following js code hexmd5('\232' + document.login.password.value + '\305\334\122\134\352'); so, asking \352 occupy 1 byte , hence cause overflow , yield 96 or java script interpreter promote short preserve value? javascript doesn't have bytes, shorts, or integers*, has number type , double-precision ieee-754 number. that's not relevant code you've shown unless uses charcodeat on string corresponding code point 1 of characters in it, because you're defining code points (loosely, "characters") in string, not numbers. characters in javascript 16-bit entities , octal escape '\352' encodes character 234 decimal, readily fits within character's 16-bit range. side note: octal escapes not part of main standard , disallowed in strict mode. they're part of non-normative annex specification. i'd recommend using hex escapes or unicode escapes rather octal ones. * well, javascri