Posts

java - Why can't I use Valid parameter along with RequestParam in Spring MVC? -

java - Why can't I use Valid parameter along with RequestParam in Spring MVC? - example: public string getstudentresult(@requestparam(value = "regno", required = true) string regno, modelmap model){ how can utilize @valid regno parameter here? @valid can used validate beans. have'nt seen used on single string parameters. requires validator configured. the @valid annotation part of standard jsr-303 bean validation api, , not spring-specific construct. spring mvc validate @valid object after binding so-long appropriate validator has been configured. reference : http://docs.spring.io/spring/docs/current/spring-framework-reference/html/validation.html java spring spring-mvc java-ee annotations

if statement - Bash Script - Not returning column/variable -

if statement - Bash Script - Not returning column/variable - i having issue cant seem figure out after couple hours of tinkering this. cant seem script homecoming final column. #!/bin/bash file="/users/user12/desktop/url-list.txt" log="/users/user12/desktop/url-results.txt" fmt="%-25s%-12s%-16s%-20s\n" printf "$fmt" domain_name http_code response_time content_check > "$log" while read line read code time < <(curl -o /dev/null --silent --head --write-out '%{http_code} %{time_total}' "$line") curl "$line" 2>/dev/null > /users/user12/desktop/domainquerystring_output.txt ifstatementconditional=`grep "the content i'm looking verify" /users/user12/desktop/domainquerystring_output.txt | wc -l` if [ $ifstatementconditional -eq 1 ] ; second_check="online" else second_check="domain offline" fi printf "$f...

solr4 - How add less than and greater than in data-config file of solr -

solr4 - How add less than and greater than in data-config file of solr - this how goes have 2 tables businessmasters business_id business_point 1 3.4 2 2.8 3 8.0 business_colors business_colors_id business_rating_from business_rating_to rating 1 2 5 ok 2 5 10 3 10 15 first-class i want link 2 tables based business_rating_from , business_rating_to like select business_colors_id,business_rating_from,business_rating_to,rating business_rating_from >= 2 , business_rating_to < 5; now want index them solr.this how data-config file looks <entity name="business_colors" query="select business_colors_id, business_rating_from,business_rating_to,bus...

java - Big O notation (Complexity) -

java - Big O notation (Complexity) - what big o of loop? -> understand loop going execute n times. task within of loop executes n times right? create o(n^2) or not combine them , simple o(n)? think o(n) because how many times loop executing clarification why or why not be? explanations helpful prepare midterm. for(int = 0; < a.length;i++){ a[i] = b[i] } think how many times code within loop executes. each a[i] = b[i] happens a.length times, phone call n . o(n) . java big-o complexity-theory

Calculating Prime Numbers in MIPS Assembly -

Calculating Prime Numbers in MIPS Assembly - i working on programme calculates prime numbers 200 using recursion in mips assembly using pcspim. far, have populated array of numbers 1-200 , binary vector list consists of 1's successfully. concept struggling how utilize stack frame help process. here have stack frame: subu $sp,$sp,32 # set stack frame sw $ra, 28($sp) # save $ra register stack sw $fp, 24($sp) # save $fp register stack addu $fp, $sp, 28 # set $fp register end of stack i don't understand how going help me find prime numbers. insight appreciated! if you're familiar sieve of eratosthenes, don't need recursion find prime numbers. method much simpler , more memory-efficient using recursion, , don't need utilize stack. i can't help "how going help me find prime numbers", because never specified algorithm you're using. assembly mips pcspim

ios - Extract and Convert NSData from BLE to Float in Swift -

ios - Extract and Convert NSData from BLE to Float in Swift - i'm developing ios app handles bluetooth sensortag. sensortag based on ti ble sensortag, had of sensors removed. in sourcecode of original ios app ti xyz-values calculated follows kxtj9_range defined 1.0 in implementation , kxtj9 accelerometer built on sensortag +(float) calcxvalue:(nsdata *)data { char scratchval[data.length]; [data getbytes:&scratchval length:3]; homecoming ((scratchval[0] * 1.0) / (64 / kxtj9_range)); } the info comes hexadecimal "fe850d" , method cutting in 3 parts. i'm trying convert method swift, wrong numbers back e.g. fe should homecoming around 0.02 objective c code does my swift code far class sensor: nsobject { allow range: float = 1.0 var data: nsdata var bytes: [byte] = [0x00, 0x00, 0x00] init(data: nsdata) { self.data = info data.getbytes(&bytes, length: data.length) } func calcxvalue()->float { homecomi...

php - While loop is repeating other elements in the page -

php - While loop is repeating other elements in the page - hello have query while loop used retrieving info in here query along while loop in top of page repeating other elements header. here code: <?php require_once('../admin panel/db.php'); if(!empty($_post['province']) && !empty($_post['district']) && !empty($_post['radio'])) { $provincename=$_post['province']; $districtname=$_post['district']; $propertystatus=$_post['radio']; $query = "select properties.propertyid, properties.propertytype, properties.propertydealtype, properties.propertyregion, properties.propostedprice, properties.dealstatus, properties.currencytype, propertyimages.imageid, propertyimages.imagepath, propertyimages.imagename, provinces.provincename, districts.districtname, pds.pdname properties, provinces, districts, pds, propertyi...