back soft

مطالب مرتبط با «format» در back soft | نویسنده: استخدام کار

Java User input YY-MM-DD format

Vote count: 0 This is for an assignment in data structures and I can't seem to find the exact answer I need. I am attempting to take user input for a date, preferably YY-MM-DD format, then check for validity.. if not valid, cycling until valid. This really seems very tedious and I am receiving two illegal start of expression errors. I did search, google and stackoverflow, but only find things addressing Date public String hireDate(){ Scaer input = new Scaer(System.in); boolean answer = false; while(answer == false){ String temp = input.nextLine(); if((temp.charAt(0) >= 0 && temp.charAt(0) = 0 && temp.charAt(1) = 0 && temp.charAt(3) = 0 && temp.charAt(4) = 0 && temp.charAt(6)...

ادامه مطلب

How to get blob data in json or xml format?

Vote count: 0 I have stored xml file in mysql BLOB datatype,so now i want to get that data in xml or json format and need to display. i tried like this,but getting binary values $mqs = db_select('multiple','mq') ->fields('mq',array('data')) ->condition('tokenid', '1') ->execute(); foreach ($mqs as $row) { $test = base64_encode($row->surveyid); //here junk binary data displaying drupal_set_message("data ::".$test); $xml = simplexml_load_string($test); $json = json_encode($xml); $array = json_decode($json,TRUE); drupal_set_message("data::".$json); } actual data not displayed in XML or JSON formats? any other alteatives? asked 4 mins agouser3819693 This entry passed through the Full-Text RSS se...

ادامه مطلب

docker push to nexus 3 - invalid checksum digest format

Vote count: 0 Though I am able to successfully push a newly pulled docker image to Nexus 3 docker hosted repo, an error like "invalid checksum digest format" is thrown at the end. I pulled "jenkins:latest" from dockerhub, then tagged it and then pushed it to a nexus docker hosted repo. ``` f3e4e0468545: Pushed 656120ad8c56: Pushed 30f9a83f20f3: Pushed 78dbfa5b7cbc: Pushed invalid checksum digest format ``` I know Nexus 3 is not LTS yet, but want to be sure that its not my environment settings. I have an insecure docker registry on 18443 docker info Containers: 1 Ruing: 0 Paused: 0 Stopped: 1 Images: 53 Server Version: 1.10.1 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesys...

ادامه مطلب

Issue with Simple Date format Java

Vote count: 0 I am working on a project where I need to validate multiple dates based on length and pattes. I am using simple date format and found many issues with that. My requirement is to strictly allow if date string matches "yyyy/MM/dd" and strictly 10 characters. The below code is not giving expected results for various testing input strings. public static boolean checkformat(String dateString){ boolean flag = false; Date d1 = null; SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd"); format.setLenient(false); try { d1 = format.parse(dateString); flag=true; } catch (ParseException ex) { ex.printStackTrace(); retu false; } retu flag; } the above code is retuing "true" for vari...

ادامه مطلب