Posts

Showing posts from July, 2015

gmail - My emails goes into spam folder despite DKIM, PTR, SPF records -

i have problems sending email server. problem when send letter gmail.сom, yahoo.com spam folder . have tried many things. following brief report on characteristics of letters. yandex.ru, mail.ru, rambler.ru receive emails server without problems my email server: ip 94.242.7.157 host mail.da.am listening on localhost:25 (refuse other connections) spamhaus ok http://www.spamhaus.org/query/ip/94.242.7.157 (i have deleted ip spamhaus pbl 2 weeks ago, old issue) 46 more blacklists ok http://mxtoolbox.com/supertool.aspx?action=blacklist%3a94.242.7.157&run=toolpage ptr record seems ok dkim signature marked 'pass' google , yahoo spf signature marked 'pass' google , yahoo dmarc signature marked 'pass' google , yahoo yahoo unknow reasons marked emails x-yahoofilteredbulk: 94.242.7.157 here raw content of example letter gmail. activation letter wich has been send user after registration in on site: delivered-to: a@da.am received: 10.112.20.73...

how to add new scope to angularjs reusable templates -

i want create reusable template, contact information <input> name <input> telephone <input> email now, want use partial html in many instances. populate input edit in 1 example or add new contact in another. what's best way this? user angularjs directive. that's designed do. http://docs.angularjs.org/guide/directive here useful resource started directives: https://github.com/angular/angular.js/wiki/jsfiddle-examples#version-110

mysql - PHP Breaks with second mysql_query -

Image
running program includes 2 queries. when run either query alone works when both queries exist within code breaks. $qry = "select * temp_user email='$email' , pin='$pin'"; $result = mysql_query($qry); $num_rows = mysql_num_rows($result); $qry2 = "select * email email='$email'"; $result2 = mysql_query($qry2); $num_rows2 = mysql_num_rows($result2); how can fix this? edit: for asking mean breaks, here image. error log. php parse error: syntax error, unexpected '}' in /users/philipkirkbride/documents/apps/today_test/confirm.php on line 30 full code of page is <?php include 'connect.php'; $pin = $_get['pin']; $email = $_get['email']; $qry = "select * temp_user email='$email' , pin='$pin'"; $result = mysql_query($qry); $num_rows = mysql_num_rows($result); if ($num_rows!=0){ print "create user , delete temp"; $sql = "insert pin values (defaul...

Severe jQuery lag on Firefox & Chrome, not IE though -

as stated in title, one-page site minimal jquery suffering crazy lag on chrome , firefox, not on ie10. realize ms stepped game 10, sweet lord's sake, deal? i've read chrome laggy div hide()s , show()s, i'm using fadein() , fadeout(), , seems there's i'm missing. i've created jsfiddle in case i've somehow done horrifically wrong. http://jsfiddle.net/g2avityhitz/zdqed/1/ (function($){ $(document).ready( function () { $("#picbox .tiny img").click( function () { $("#picbox .tiny img").removeclass('selected'); $(this).addclass('selected'); imgsrc = $(this).attr('src'); $("#picbox .main").css({ 'background-image' : 'url(' + imgsrc + ')' }); $("#picbox .main a").attr('href',imgsrc); }); $("#picbox .main a").click( function (e) { ...

javascript - Extjs proper way to show/hide -

i'm little new extjs , i'm trying figure out proper way show/hide elements. i have following elements: layout: 'card', items: [ { xtype: 'panel1' }, { xtype: 'panel2' } ] in controller have these references setup: refs: [ { ref: 'p1', selector: 'panel1' }, { ref: 'p2', selector: 'panel2' } ], each panel has form , 2 buttons @ bottom. panel 2 hidden in beginning. want show panel 2 , hide panel 1. first tried: this.getp1().hide(); this.getp2().show(); ...and did nothing. then, found this question , tried out following: this.getp1().getel().hide(); this.getp2().getel().show(); which partially worked except failed show buttons in panel2. supposed every single element , show() each of them? must missing something. try with: this.getp1().hide(); //the first letter should uppercase this.getp2().show();

javascript - Load php in local html -

i have problem local file, don't know if it's possible know if its... my code in local html is: $(document).ready(function(){ $("#load").load("http://localhost/prueba.php",{estado:"ok"});}); and php online is: <?php echo '<script>alert("' . $_post["estado"] . '");</script>';?> if run local html "http:// localhost /prueba.htm" runs fine! if try run local file "c:\documents\prueba.htm" not run php code , need. this example, want run query in php , me info html file. can me? sorry english bad i've no more options... idea how it? the main problem request not allowed because of browser's same origin policy. please have @ jquery ajax request local filesystem (windows file:///)

php - securing outward-facing website db configs -

i'm adding database usage public facing site, , wanted input on secure way store mysql connection information might be. i've come few options: first store config in directory, , set php include path dir. second, know there files apache won't serve browsers, use 1 of these types of files. third, store encrypted files on server, , decrypt them php. any appreciated. you can configure apache disallow files htaccess. in config folder add .htaccess following order allow,deny deny if don't want use .htaccess @johua k, mentions, instead add <directory /home/www/public/config> order allow,deny deny </directory> to apache config. this deny files in folder being served anyone, fine since php doesn't care htaccess can just include('config/db.php') if config php scripts, should never appear in plain text. so file like define('mysql_password', 'pass') would never display text. if worried shared...

mysql - Querying a database within a PHP function -

this question has answer here: mysqli/mysql query inside function not working 2 answers i'm trying load data database using php, reason doesn't work when put inside function. if try code without function, works fine: //$dbc connection $call1 = 0; $output = ''; $query = "select * artists order lname limit $call1, 15"; $result = mysqli_query($dbc, $query); while($row = mysqli_fetch_array($result)){ $output .= "<ul>"; $output .= "<li>" . $row['name'] . "</li>"; $output .= "</ul>"; } however, when change code inside function, don't database (or @ least won't return anything): //$dbc connection $call1 = 0; $output = ''; function loadartists($call){ $query = "select * artists order lname limit $call, 15"; $result = mysqli_que...

java - one of the classes isn't compiling, would like some guidance as to how i can get it to work -

got of spec of assignment below, of has not been fulfilled, idea how bit "on completion message should written terminal window stating program completed successfully, giving number of accounts read , total balance" thank in advance import java.util.*; import java.io.*; public class totaloccountbalances { // instance variables - replace example below own private int count; private infile file; private scanner input; /** * method */ public void closelink() { input.close(); } /** * method */ public void processfiles() { while(input.hasnext()) { string line=input.nextline(); } count++; } } i think class intending do: private infile file; should private file infile; private outfile file; should be private file outfile; and use infile , outfile variables through rest of code. have remember variables, first thing after access modifier (private, public etc.) should data type - class or primitive ...

Python - variable scope and modification -

i'm writing python script gui framework live forensic data collection on windows host. until now, haven't had many problems couldn't work through. 1 has me stumped. problem involving improper variable scope, life of me, can't find problem. script on 2 thousand lines long, i'll copy relevant portions unless otherwise instructed. i made change code somewhere along line broke functionality. used work intended, , can't figure out why doesn't. lead me use versioning software projects in future, that's sure. what's odd there no exceptions thrown @ all. what i'm trying have user select tkinter checkbutton widgets corresponding optional function want perform. have set tkinter intvars each checkbutton widget, , placed these intvars array easy enumeration. gui has "start" button, when pressed, initiates start() function. function should enumerate checkbutton intvars in array , perform relevant functions if intvar set 1 (indicating selec...

python - Can't get Newrelic with gunicorn supervisor django 1.6 to work -

im trying newrelic python agent work setup supervisor , gunicorn, can't work. here current supervisor setup works: [program:gunicorn] directory = /home/<user>/.virtualenvs/<domain>/myproject/ command=/home/<user>/.virtualenvs/<domain>/bin/gunicorn my_project.wsgi:application i tried this: [program:gunicorn] directory = /home/<user>/.virtualenvs/<domain>/myproject/ #working command #command=/home/<user>/.virtualenvs/<domain>/bin/gunicorn myproject.wsgi:application command=/home/<user>/.virtualenvs/<domain>/bin/newrelic-admin run-program /home/<user>/.virtualenvs/<domain>/bin/gunicorn myproject.wsgi:application environment=new_relic_config_file=/home/<user>/.virtualenvs/<domain>/myproject/newrelic.ini user = <user> autostart = true autorestart = true stderr_events_enabled = true redirect_stderr = true stdout_logfile = /home/<user>/logs/gunicorn.log stderr_logfile = /home/...

java - ArrayIndexOutOfBoundsException After Scanning NFC Tag -

i'm attempting rebuild nfc tag reader https://stackoverflow.com/questions/16071121/converting-existing-nfc-script-to-read-multiple-ndef-records and i'm getting following error: java.lang.arrayindexoutofboundsexception: length=1; index=1 on line: ndefmessage msg2 = (ndefmessage) rawmsgs[1]; i understand issue related trying access array item doesn't exist i'm not sure how resolve issue in following implementation. p.s. the issue occurs when scanning new nfc tag. noticed interesting though... if comment out following 2 lines app not crash , scans tag successfully! // ndefmessage msg2 = (ndefmessage) rawmsgs[1]; // beammsg2.settext(new string(msg.getrecords()[1].getpayload())); source: public class nfc extends activity implements createndefmessagecallback, onndefpushcompletecallback { nfcadapter mnfcadapter; textview beammsg; textview beammsg2; private static final int message_sent = 1; @override public vo...

c++ - Cannot cast list iterator to an object -

i error: error c2682: cannot use 'dynamic_cast' convert 'std::_list_iterator<_mylist>' 'userbean *' when executing: list<userbean> * userbeans = getuserbeans(); for(list<userbean>::iterator = userbeans->begin(); != userbeans->end(); i++) userbean * newuser = dynamic_cast<userbean*>(i); am doing wrong, or can not convert iterator items objects? sometimes iterators implemented raw pointers container items, more times not, not pointers @ all, don't treat them way. correct way access item iterator refers dereference iterator, eg: userbean &newuser = *i; or: userbean *newuser = &(*i); iterators override -> operator can access members of referenced item, in cases iterator refers actual object instance (which yours does) , not pointer object instance, eg: i->somememberhere

sql - Mysql stored function giving different results than original query (some conditions are not working) -

i have weird problem in mysql stored function. function returning different result if run query alone. here function: delimiter $$ create definer=`admin`@`%` function `getaretention` (appid int(10), currentdate date) returns int(11) reads sql data deterministic begin return (select count(distinct userid) session (date(started) = currentdate , appid=appid)); end here how call it: select getaretention(5,date('2013-04-03')); here alone query: select count(distinct userid) session (date(started) = date('2013-04-03') , appid=5) the function returning 2502 wrong. alone query returning 5, correct. also, if delete "and appid=5" alone query return 2502, means in stored function condition not working. anyone have idea why? haven't used mysql while, missing something. mysql cannot distinguish between variable name , column name here. name variable otherw...

windows - Erlang Output to text file -

i new erlang , trying find easy way output erlang command results test file in windows command line. tried far: c:\windows\temp>erl example.erl "main" -e > output.txt if small script perhaps can use escript described in here escript provides support running short erlang programs without having compile them first , easy way retrieve command line arguments then can want work way want escript myfunctions_tests > output.txt

c# - Use html.encode for query string parameters -

is practice use html.encode before passing query string parameters business layer? scenario respect asp.net framework, , wondering if must encode contents of query string or not before reading values keys? i know can convert contents expected data type, question designs perspective. thanks! i yes. @ very least want because browser may encodings wrong. 1 symbol might show another, or , unknown character. may mix-up preceding character if browser wrong. more complex reasons include helps prevent against html injection. the short explanation of why need use html encoding set of characters mean special in html , encoding symbols such carets , ampersands gracefully across browsers.

javascript - innerHTML adds text but not html tags -

first off sorry beginner question learned javascript , learning develop windows 8 apps. here code in question: var numbers = [1, 2, 3, 4, 5]; id('numberlist').innerhtml = '<ul>'; (var x in numbers) { id('numberlist').innerhtml += '<li>' + x + '</li>'; } id('numberlist').innerhtml = '</ul>'; i have in "ready" function (for windows 8 developers) in js file , 'numberslist' refers section tag in body (of html file). list not show @ when running app. when try add text instead of list so id('numberlist').innerhtml = 'hello'; the text show up. there problem way trying insert html elements? you can't add pieces of illegal html that. <ul> tag no </ul> illegal. build entire html string in string variable , add 1 piece of legal html or build individual dom elements, put content in them ...

vb.net - Playing movie files without the URL in Visual Basic 2010 -

right in project have windows media player object, , can play movies on inputting movie url url property. how play movie in resources? because when transfer executable file other laptop test it doesn't work. thanks. if remember correctly, when embed video file application embed data of it, , extension gets stripped. in order view it, need copy temporary directory , add extension yourself, play location. i haven't found need such thing since 2005, visual studio may have made changes. easiest way have video file want played stored in same location programs executable , refer using name.

creating default parameters in python -

i have function 3 parameters, parameters 2 , 3 have default values. default value parameter 3 dependent on properties of parameter one. however, cannot perform operations on parameter 1 in 'def' line i'm having trouble finding efficient way of defining default value of parameter three. standard way in python? the following code i'm working with. line 1 throws error because haven't defined 'data' yet. best workaround? def stooge_sort(data, = 0, b = len(data) - 1): if data[a] > data[b]: data[a], data[b] = data[b], data[a] if b + 1 - >= 3: thirds = (b + 1 - a) / 3 stooge_sort(data, a, b - thirds) stooge_sort(data, + thirds, b) stooge_sort(data, a, b - thirds) return data remember default arguments evaluated once when function object created , there's no way put expression in there. same reason people surprised behaviour of default arguments assigned mutable values. the usual way p...

asp.net - Why am I not getting .css intellisense -

question: why not getting .css intellisense while coding html in durandal ~/app/views/###.html pages. steps recreate: in visual studio professional 2012 i've began "empty" asp.net web application , added microsoft asp.net web optimization framework 1.0.0 nuget package solution. i've included durandal 1.2.0 , bootstrap 2.3.1 . after adding above mentioned references application i've added shell.html page ~/app/ folder generated when nuget installed durandal package. as sidenote, .css files working fine once debug application. have multiple .css files including bootstrap.css file (installed bootstrap 2.3.1 (mentioned above)) in ~/content/ folder , ~/app_start/bundleconfig.cs referencing , using .css files should during runtime. lastly, when go through pluralsight single page apps jumpstart tutorial , coding shell durandal.js section see i'm/we're supposed intellisense, not. thank you. update: made aware " the issue...

xml - SQL Server XQuery check data values before insert -

this on sql server 2012. i have tsql create xquery statement shred , insert xml the code looks this: declare @xmlasxml xml set @xmlasxml = ' <data store="r262"> <s item1="10" item2="-1" /> <s item1="33.2" item2="55" /> </data> ' insert tablex(oldprice, price) select c.value('@item1[1]','decimal(15,2)') oldprice, c.value('@ut[1]','int') price @xmlasxml.nodes('/data/s') t(c) i want add data validation insert statement above (i don't want land data , have churn through again validate every data point)... when data validation here's i'm saying: if value item1 between 1 , 15 use insert otherwise insert null if value item2 between -10 , 1000 use insert otherwise insert null. i have see information on xquery think xquery has conditional logic can handle none of example have found ali...

php - How to make multiple tags system for blogs? -

i have database setup this: posts post_id; primary_key title; content; date; tags tag_id; primary_key post_id; tag_name; in blog, i'm letting users post own tags, youtube. lets say, i'm letting users type tags in input box. example, user types: cat dog food. i want php convert input array , store in data base this. tags tag_id | post_id | tag_name 1 1 cat 2 1 dog 3 1 food i think can convert string array using explode(). however, how structure query store database way want? i want php break each tag down, , store each tag in separate row. i'm using while loop pull each tags post btw. use foreach loop. ie $string= "cat,lion"; $array= explode(",",$string); foreach($array $tag) { mysql_query("insert tags(tag_id,post_id,tag_name) values('','$post_id','$tag')"); // run query insert tags table. $post_id ...

if exists statement between a case when condition sql -

in middle of stored procedure, have following snippet of code: case when l.codeleasestatuscode = '5' , priorleaseid null , l.leaid in(select col1 waitlisthousehold) '2' else l.codeleasestatuscode end however, final condition, wherein have select table waitlisthousehold, has issue. not databases has table. want last condition included when table exists. i'm getting errors when try this: case when l.codeleasestatuscode = '5' , priorleaseid null if exists(select * information_schema.tables table_name='waitlisthousehold') begin , l.leaid in(select col1 waitlisthousehold) end '2' else l.codeleasestatuscode end so how do correctly? this snippet inside statement(from table1 join table2 b on a.id=b.id , case when..) you can have case when clause inside 1 check if table exist or not case when l.codeleasestatuscode = '5' , priorleaseid null case when exists(select * information_schema.tables table_name=...

viewstate - Remove elements of List<int> use View State in asp.net -

i meeting problem view state. here code: public list<int> listid { { return (list<int>)viewstate["listid"]; } set { viewstate["listid"] = value; } } protected void btadd_click(object sender, eventargs e) { viewstate.remove("listid"); foreach (treenode tn in tvfaq.checkednodes) { if (tn.checked) { id = tn.valuepath; listid = passid.listid(id); } } if(listid!=null) { listbyid(); } } in function listbyid() use "listid.count" elements of listid can not remove, when in page, element of listid wil auto increase until close page. please me remove elements of listid after click on button "add". thank much. it should removed. you can try this viewstate["listid"] = null;

Wrong Query MySQL selecting the record with oldest or newest Date -

i need know how obtain code of access (idaccess) older (or more recent) date of access user (identified iduser) made table accesstbl using different queries. each user. create table accesstbl ( idacess varchar(16) unique not null, iduser varchar(16) not null, thedate date not null ); insert accesstbl (idacess, iduser, thedate) values ('a00', '0', '1983-12-30'), ('a01', '0', '2004-09-09'), ('a02', '1', '2013-02-01'), ('a03', '1', '2012-05-09'), ('a04', '2', '1983-12-30'), ('a13', '2', '2013-03-01'), ('a05', '2', '2004-09-09'), ('a06', '3', '2013-02-01'), ('a07', '3', '2012-05-09'), ('a08', '4', '1983-12-30'), ('a09', '4', '2004-09-09'), ('a10', '5', '2013-04-01'), ('a12', ...

Accessibility scope of Java access modifiers -

this question has answer here: in java, difference between default, public, protected, , private 25 answers java has private, protected, , public access modifiers. can explain accessibility scope of these modifiers. how can access protected member within different package? for better understanding need see this access modifiers same class same package subclass other packages public y y y y protected y y y n no access modifier y y n n private y n n n here important difference between deafult , protected . default: never accessible outside package protected: a...

centos5 - How to run the other version of python I have installed on my Centos 5.3 -

i have 2 different versions of python installed on centos 5.3 final. default version 2.4.3 , new 1 2.6.8. [root@localhost bin]# ls py* pydoc pydoc26 pygtk-demo python python2 python2.4 python26 python2.6 [root@localhost bin]# python -v python 2.4.3 [root@localhost bin]# python26 -v python 2.6.8 i work new 1 python still point old one. [root@localhost desktop]# python -v python 2.4.3 try which python , , make python linked new 2.6.8.

Can Python or Pygame create separate files in order to save game progress? -

i making game in want possible save. there way program python or pygame creates notepad (or similar) file documenting players progress? new python, please explain easily. thanks. you use pickle serialize variables file.

R: Not able to save the plot -

this question has answer here: call plot doesn't produce plot 1 answer i generating plot able see in rmarkdown output whenever trying save it, getting blank(white) image. adding following 2 lines before , after plot png("output.png") #plot code dev.off() it working. , stopped working. can me on this?? edit when pdf pdf("output.pdf") #plot code dev.off() i getting error as: there error opening document. document cannot opened because has no pages. thanks. from comments gather right, need print resulting ggplot2 object in order show plot, see r faq 7.22.

compilation - Compile and execute java source file in memory -

say have string containing content of .java file. apis out there allow me compile source file virtual .class file (i.e. generate , store content in memory, not creating actual physical .class file on disk)? , "virtual" .class loaded , executed in jvm? edit 1: reason want because sometimes, application might not have write permission. use javacompiler this. think trick define custom javafilemanager .

javascript - Image upload in phonegap using Rest webservice in java -

i working phonegap + rest webservice. service given below working gud web application test. image file uploaded in local webserver. same service not working in phonegap. included both codes here. restwebservice @post @consumes(mediatype.multipart_form_data) public response uploadfile( @formdataparam("image") inputstream uploadedinputstream, @formdataparam("image") formdatacontentdisposition filedetail) { system.out.println("entered"); //some logic .. method working using webapplication ... tested using html page } phonegap code function mydetails() { var options = new fileuploadoptions(); options.filekey="file"; options.filename=imgbyte.substr(imgbyte.lastindexof('/')+1); options.mimetype="image/jpeg"; var ft = new filetransfer(); ft.upload(imgbyte, imgurl, win, fail, options); alert("finished calling uploa...

PHP and MySQL - Constants, Function, Best Practices? -

i've been using php , mysql years now, never in formal setting. use streamline things @ work, , have programmed lot of own commercial websites, i'm not employed programmer, , never have been. i'm looking start doing freelance work though, , i'm wondering of best practices are. i use getter class retrieve data mysql, , setter class enter data mysql, pass connection class. every mysql table , field name has own constant defined in constants include file. though, enter constant directly setter or getter classes, rather passing them variable. makes life easier , quicker way, defy understanding of function within class being should independent. just clear, example of do: constants.inc.php define('table_name','table_name'); dbase_getters.class.php public function get_data($connection){ $query = "select * " . table_name; $result = $connection etc... } or should doing this? dbase_getters.class.php public function get_data(...

uac - SetVolumeLabel function getting failed due to access denied error on Windows 7 -

setvolumelabel function getting failed due access denied error on windows 7. same function works fine on windows xp. any idea why problem coming on windows 7 , not on xp. any appreciated , helpful us. windows vista , windows 7 have user account control , or uac. means users not have administrator privileges unless requested specific operation or application. under windows xp if user administrator, programs run administrator privileges. the error getting indicates setvolumelabel requires elevated privileges. can use "runas" run application administrator or can change program request elevation .

How to convert decimal array to string array in C#? -

i need convert decimal array string array . how convert decimal[] string[] ? can use array.convertall() method task? of course can use array.convertall method. need conversation can done easyly lambda expression. string[] string_array = array.convertall(decimal_array, x => x.tostring()); array.convertall converts entire array. converts elements in 1 array type. let's code it; decimal[] decimal_array = new decimal[] {1.1m, 1.2m, 1.3m, 1.4m }; string[] string_array = array.convertall(decimal_array, x => x.tostring()); foreach (var item in string_array) { console.writeline("{0} - {1}", item.gettype(), item); } output be; system.string - 1.1 system.string - 1.2 system.string - 1.3 system.string - 1.4 here demo .

javascript - ComboxBox in an editable Grid -

Image
i new in extjs , making editable grid combox column. having problem in displaying chosen data combobox. may me. screenshot provided below. link provided.. :)) my combobox code... data: var farms = new ext.data.arraystore({ fields: ['id', 'farms'], data : [ ['1', 'dvz'], ['2', 'ssk'], ['3', 'lna'], ['4', 'nsk'] ] }); combobox.. header : 'location', width : 130, fixed : true, hideable : false, dataindex: 'farms', editor : {xtype:'combo', store: farms, displayfield:'farms', valuefield: 'id', querymode: 'local', typeahead: true, ...

ruby on rails 3 - Escaping text so it would remain readable -

i have method looks this def full "#{self.first} #{self.second}" end problem want escape it, in model do def full erb::util.h("#{self.first} #{self.second}") end but if first or second have & in it, give me &amp; instead of & if have apostrphies ' escape them , make unreadable.. is there way avoid xss , make string readable well? i think can use html_escape click here...

php - How do I add a page to this zend project -

so i've been assigned project uses zend framework 1.12. i'm trying add page project seem missing somewhere. directory structure bit different example zend project have seen (no bootstrap dir). -application ---controllers ------modules ---------------nopage ------------------------ indexcontroller.php ---model ---- bunch of db files ---views ----templates (smarty tpl files) ---------------nopage ------------------------ nopage.tpl ---backend ----router.php here code router.php $controller -> addcontrollerdirectory(root . 'application/controller/nopage', 'nopage'); $router = $controller -> getrouter(); $nopage = new zend_controller_router_route_regex( 'nopage.html', array('module' => 'nopage', 'controller' => 'index', 'action' => 'index') ); $router -> addroute('nopage', $nopage); here indexcontroller code nopage indexcontr...

TimeZone discrepancy in mysql and java -

i have query in mysql compares 2 dates this convert_tz(updateddate,'+05:30','-05:00') < ? the convert function returns value of column createddate in time. when run query in mysql query browser like convert_tz(updateddate,'+05:30','-05:00') < '2013-04-14 09:30:00' it gives me correct values example product count ------- ------ 123 b 7 now, setting in java using preparedstatement this pst.settimestamp(1, new java.sql.timestamp(end.gettimeinmillis())); rs=pst.executequery(); system.out.println("=====new open tickets query executed====="); system.out.println(pst); the last line prints whole query , value set is convert_tz(updateddate,'+05:30','-05:00') < '2013-04-14 09:30:00' but gives me different values this product count ------- ------ 155 b 19 so, suspected timezone proble...

c# - ZedGraph how to detect zoom in or out? -

i have been using zedgraph while frustrated after hours of search couldn't find how distinguish detect if zoom event "zoom in" or "zoom out" or "zoom out? actually i'mm making own version of zoom in , out sampling specific data in each case , need find way detect type of zoom event. if 1 has idea, please me out. thanks. earlier detecting zoom in or out checking if zedgraphcontrol1.graphpane.xaxis.scale.max value less number of points in chart. if less zoom in intended , vice versa. not fool proof zoom out detected zoom in. after search found this: http://sourceforge.net/p/zedgraph/discussion/392232/thread/d33cfd8c/ so using similar technique improved detection calculating area of selected zoom area when user zooms in using left-click , drag (using new values of zedgraphcontrol1.graphpane.xaxis.scale.max , zedgraphcontrol1.graphpane.xaxis.scale.min ) , comparing area area of whole chart (using previous values of zedgraphcontrol1.g...

actionbarsherlock - Android HoloEverywhere: No top ActionBar/TitleBar on default Holo.Theme issue -

i'm using holoeverywhere port app , have weird issue: on gingerbread default holo.theme doesn't show top actionbar/titlebar on of activity (yes did go on layouts , xmls manifest 'silly' mistakes). however when tested on phone running jellybean worked expected. (you may argue jb have holo theme built-in... anyway i'm stating fact of what's happening.) this has frustrated heck out of me 2 days already. ideas? gingerbread doesn't have actionbar feature. added in honeycomb. if want have action bar honeycomb/ics/jelly bean below 2.3, need custom titlebar yourself. can reference implements custom title: custom titlebar example

osx - Textmate 2 - Ruby not showing up as a option -

Image
here can see ruby bundle defiantly installed and when editing text unable select ruby list (because doesn't exist), error setup or bug in text mate? have re-downloaded text mate , removed settings running $ rm -rf ~/library/application support/textmate my bundles located in 2 places. ruby , other bundles come preinstalled textmate: ~/library/application support/textmate/managed/bundles saved 3rd party bundles in: ~/library/application support/avian/bundles check folders , see if have ruby.tmbundle file. make sure ruby source code file saved .rb file extension well, textmate knows use ruby bundle when syntax highlighting, soft-tabbing, etc.

java - Fail to upload file using ftp4j -

i'm using ftp4j ftp client. ftpclient client = new ftpclient(); client.connect("86.22.11.178"); client.login("usr", "pwd"); client.changedirectory("/dir"); client.upload(file); it works fine @ localhost, not work when enclosed in jsf web application deployed on web server. succeeded connect , login, when code reaches upload command, skips on , nothing. no exception been thrown. there full conectivity ftp server, can't problem. have set chmod 777 permission on files , belong same owner. this code worked on windows machine, machines running on linux have different "rules"? your code seems correct. try find out ftp error throws. timeout may happens, faced!!! import org.apache.commons.net.ftp. ; import java.io. ; /** * class used demonstrate usage of jakarta commons net package */ public class testftp { /** creates new instance of testftp */ public testftp() { } /** * main - unit test pro...