Posts

Showing posts from July, 2013

c++11 - C++ - Is there a way to create alias for field -

is there way create alias class/stuct filed in c++11 ? mean i've got class class vector4 { public: float x,y,z,w; } i got alias typedef vector4 color; is there way create aliases vector4 x,y,z,w fields work color r,g,b,a ? just define vector4 this, using anonymous unions (without anonymous structs, though common extension). typedef struct vector4 { union{float x; float r;}; union{float y; float g;}; union{float z; float b;}; union{float w; float a;}; } vector4; typedef vector4 color; if cannot redefine vector4, might instead define layout-compatible standard-layout class , use dreaded reinterpret_cast . works because standard layout classes having layout-compatible members compatible. struct color { float r, g, b, a; } standard quote: a standard-layout class class that: — has no non-static data members of type non-standard-layout class (or array of such types) or reference, — has no virtual functions (10.3)

xml - How do I display an image that I just took from my camera in my android app? -

i trying take picture , view on screen following code: public class mainactivity extends actionbaractivity { private static final int picture_request_code = 100; public button camera, gallery; private uri fileuri; private static file mediafile; imageview image; public string filename; @override protected void oncreate(bundle savedinstancestate) { system.out.println("started main activity"); super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); camera = (button) findviewbyid(r.id.button1); gallery = (button) findviewbyid(r.id.button2); createlisteners(); } private static uri getoutputmediafile(){ file mediastoragedir = new file(environment.getexternalstoragepublicdirectory(environment.directory_pictures), "mustache"); if (! mediastoragedir.exists()){ if (! mediastoragedir.mkdirs()){ log.d("mycameraapp&qu

mysql - expensive query takes down database server -- looking for ways to mitigate -

i have expensive query creates temporary table reporting purposes. having problem denial of service attack takes place 50+ of these queries pile (all same user). causes database server pretty taken down. query can take 1-10 seconds run , can have lot of rows in resulting temporary table. i not sure if there easy way improve query performance without re-architecting entire reporting piece of application. what solutions can use apply solve problem these queries piling , taking down server. my questions are: can think of solution improving query performance (query below) does make sense place session limit of 1 query can run once , prevent pile up any other ideas on how prevent attack. here query: create temporary table phppos_sales_items_temp (select phppos_sales.deleted deleted,phppos_sales.deleted_by deleted_by, sale_time, date(sale_time) sale_date, phppos_sales_items.sale_id, comment,payment_type, customer_id, employee_id, phppos_items.item_id, null item_kit_id,

eclipse - loop issue for java -

whenever run loop: system.out.println("how many gerbils in lab?"); int population = keyboard.nextint(); gerbil[] gerbil = new gerbil[population]; (int i=0; i<population; i++){ gerbil = new gerbil[population]; idnumber: (int b = 0; b<population; b++){ system.out.println("what id number of gerbil " + (b+1)); string idnumberx = keyboard.next(); if (b>0){ (int c = 0; c<gerbil.length; c++){ if (idnumberx.equals(gerbil[c].getid())){ system.out.println("repeat, try again"); c--; } else { return; } } } } i end output: how many gerbils in lab? 2 id number of gerbil 1 123 id number of gerbil 2 456 excepti

arrays - C++ Enum values from string input -

been @ 1 while now, appreciate help. i'm create , object card enum values rank , suit based on string input. string in format of '2c, ad' etc. 2 clubs , ace diamonds respectively. i tried using linear search function found elsewhere on stackoverflow, it's in there returns -1 because doesn't seem getting right type of input. i've been able convert other way using char * array, can't life of me opposite way around. see below implementation: card.h #ifndef _card_h #define _card_h #include <string> #include <iostream> using namespace std; enum rank{ two, three, four, five, six, seven, eight, nine, ten, jack, queen, king, ace}; enum suit{ clubs, diamonds, hearts, spades}; //character sets used convert enums strings static const char * rankstrings[] = { "2", "3", "4", "5", "6", "7", "8", "9", "t", "j", "q",

jquery - How do I render a list in Jade with a distinct javascript function for each item? -

i'm using express , jade on top of node.js build web app. have express route pulls list of words database , sends list jade array object rendering. want render jade page on client side each word, when clicked on, send distinct message server. my code far looks this... ./routes/show_words_to_user.js: exports.render_page = function(req, res){ dbclient.query('select word words;', function(err, result){ res.render('pagetitle',{wordlist:result,userdata:userobj}); }); }; ./views/words.jade: ul each word in wordlist li= word ./routes/update_preference.js (expects receive message client): exports.update_word = function(req, res){ dbclient.query('update words set userliked = 1 word=($1) , userid=($2)', [clickedword,userid],function(err, result){ res.send('your word updated.'); }; }; i need each word rendered in jade list act hyperlink send message server containing 1) name of word clicked

c# - Team foundation Service Configuration in a workgroup -

Image
i'm trying configure tfs 2010,while i'm using vs2012.in visual studio when follow steps below after entering server name form prompts me username , password or shows error message cannot connect remote server,but since don't have experiences configuring tfs don't know how find these information. i go eam explorer in vs i connect team projects i write server name colleague's system then i'm prompted credentials or shows error message cannot connect remote server,so can not continue... thanks in advance i found problem.the account not set correctly in team foundation administration console , after setting correctly,i able create new team projects , other clients able connect team project on server. thanks

Emacs: can't open load file for windows.el, possible char encoding error -

i trying install windows mode here: http://www.emacswiki.org/emacs/windowsmode , having issues loading windows.el file upon initialization, minibuffer tells me cannot open load file: windows . after saving file, added init file: (add-to-list 'load-path "~/workspace/emacs/.emacs.d/elisp/windows.el") (require 'windows) (win:startup-with-window) (define-key ctl-x-map "c" 'see-you-again) and here saved file: [lucas@lucas-thinkpad-w520]~/workspace/emacs/.emacs.d/elisp$ ls -la total 296 drwxr-xr-x 4 lucas lucas 4096 apr 20 01:06 . drwxr-xr-x 14 lucas lucas 4096 apr 20 01:14 .. -rw-r--r-- 1 lucas lucas 31502 mar 29 21:40 multi-term.el -rw-r--r-- 1 lucas lucas 35201 apr 20 01:01 revive.el drwxr-xr-x 3 lucas lucas 4096 mar 9 14:57 theme-changer drwxr-xr-x 3 lucas lucas 4096 mar 29 01:05 themes -rw-r--r-- 1 lucas lucas 115222 apr 20 01:06 windows2.el -rw-r--r-- 1 lucas lucas 96830 apr 20 01:01 windows.el i suspect character encodi

excel - VBA script to count string, insert rows, copy row, split cell -

the department provides me spreadsheet used in database includes multiple text in cell. in order link data have turn multiple rows. example: lc123/lc463/lc9846 needs have entire row copied 1 "lc" string in each row- cell1 cell2 lc123 cell1 cell2 lc463 cell1 cell2 lc9846 i tried these 2 subroutines failed sub insert_row() dim j long j = inputbox(=sum(len(activecell)-len(substitute(activecell,"lc",""))-1) activecell.entirerow.copy activecell.offset(j).entirerow.insert shift:=xldown end sub sub splitandtranspose() dim n() string n = split(activecell, chr(10)) activecell.resize(ubound(n) + 1) = worksheetfunction.transpose(n) end sub the 2nd subroutine split , copy doesn't insert rows, writes on rows below it. 'in memory' method inserting rows necessary perhaps simple understand, performance of making thousands of seperate row inserts not good. fine 1 off (perhaps need one-off) , should take minute or 2 run thought heck ,

dns - Tracing a bug in a "reverse domain" program in Java -

my code supposed reverse domain. example, if input www.google.com.uk, should print uk.com.google.www my problem code prints uk.com..google.www i can't figure . comes or how remove it. did tracing , found www.stack.com.edu.uk return uk.edu..com..stack.www import java.util.*; public class domainreverse { public static void main(string[] args) { scanner sc = new scanner(system.in); string domain = sc.nextline(); int x; int start = 0; string reversed_domain = ""; boolean flag = false; do{ x = domain.indexof(".",start+1); if(x==-1){ flag = true; break; } reversed_domain = domain.substring(start,x+1) +reversed_domain; start = x; } while(flag==false); int length = domain.length(); int z = domain.lastindexof("."); string enddomain = domain.substring(z+1,length

javascript - Attempt to modify HTMLTableRowElement.prototype -

i have 2 methods, working nicely in couple of pages, when comes greasemonkey script fail reason, throwing 'is not function' error. same code, while attached page, works perfectly. htmltablerowelement.prototype.hiderow = function(){this.style.display = 'none'}; htmltablerowelement.prototype.showrow = function(){this.style.display = ''}; error appearing upon calling 1 of these functions. clues? that code doesn't work greasemonkey script due gm script being in different scope , (nominally) in sandbox. see "why window (and unsafewindow) not same userscript script tag" more information , workarounds ( @grant none (maybe), or script injection, or unsafewindow ). however, unless trying alter existing code added by/to page, don't things way. use jquery's .hide() , .show() , or .toggle() . or create class using gm_addstyle() , eg: gm_addstyle (".gm_hide {display: none !important;}"); and use dom functions add

python - siir.py unable to run -

i tried chris felton's myhdl sample code . i not simulation module imported functions compile following errors: traceback (most recent call last) file "siir.py", line 497, in <module> tb = flt.testfreqresponse(nloops=3, nfft=1024) file "siir.py", line 408, in testfreqresponse dut = tracesignals(self.rtl, clk, x, y, ts) file "c:\winpython-32bit-2.7.6.3\python-2.7.6\lib\site- packages\myhdl\_tracesignals.py", line 82, in __call__ h = _hierextr(name, dut, *args, **kwargs) file "c:\winpython-32bit-2.7.6.3\python-2.7.6\lib\site- packages\myhdl\_extracthierarchy.py", line 233, in __init__ _top = dut(*args, **kwargs) file "siir.py", line 370, in rtl hdl = siir_hdl(clk, x, y, ts, a=self.fxa, b=self.fxb, w=self.w) file "siir.py", line 87, in siir_hdl assert len(a) == 3, "tuple of denominator coefficients length 3" assertionerror: tuple of denominator coefficients length 3 exception typeerror: 'isinstan

c# - Anyway to duplicate a control? -

say have listview control in tabpage1 has preset property. possible copy values , put tabpage2? i using stupid method, is newlistview1.size=listview1.size newlistview1.color=listview1.color etc you can using system.reflection it possible copy properties of control? (c# window forms) hope helps

Using JSON in PHP to send data to Android -

i'm not sure json codes have used in php right send data android app. android app works fine without errors. i'm using async task retrieve information server using json. this code have used in android app information server : jsonarray arr = new jsonarray(result); jsonobject jobj = arr.getjsonobject(0); myoutput = jobj.getstring("stringpval"); i havn't displayed entire code, i'm sure other codes work fine. and below php script used create json array in php: $a = array( array('stringpval' => "my value")); print $json = json_encode($a); so have finished encoding json. want textview in android display "my value"! when run android app , try information server, textview goes blank. null! what's problem? solution? above codes correctly used? the reason json_encode($a); returning jsonobject , not jsonarray you're thinking. what you're printing this: { { 'stringpval' = "my

maven - How to change directory in batch file? -

i have batch file follows e: cd e:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\core mvn clean install cd e:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\handset mvn clean install it'll run mvn install command core but won't execute mvn install command handset project. this method of changing drive , folder. the call commands solve issue if mvn batch file. cd /d "e:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\core" call mvn clean install cd /d "cd e:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\handset" call mvn clean install mvn must exist in both folders run.

c# - LinkText not working when you have a link with text-transform set to uppercase -

i'm working on project using selenium, , found when used selenium ide create test case, convert webdriver, when attempt run test using nunit not work expected. what have found on page i'm testing, have link shows in capital letters (i.e. home) due css on page text-transform : uppercase , when @ elements see written follows (home). when run test i'm getting openqa.selenium.nosuchelementexception : unable locate element: {"method":"link text","selector":"home"} the workaround ensure have our link text capital letters. wondering if had seen before , did combat this? this bug/issue within selenium: https://code.google.com/p/selenium/issues/detail?id=6950 i vote issue, , think other ways locate element if large blocker you. xpath able text-based searching or give element classes or id can use hook onto. by.linktext not way find link.

java - Alphabetically sorting array in sync with another array -

i'm working on simple program that, now, writes inputted names , marks 2 separate arrays, array counters synchronised. example, name in entry #3 on first array corresponds marks in entry #3 on second array. code this: import java.io.*; public class project { int ctr; int ctr1; int pos; int temp; int max; public static void main(string args[]) throws ioexception { new project().input(); } void input() throws ioexception { bufferedreader obj = new bufferedreader(new inputstreamreader(system.in)); system.out.println ("how many children?"); int n = integer.parseint(obj.readline()); string a[] = new string[n]; int b[] = new int[n]; for(ctr=0;ctr<n;ctr++) { system.out.println("enter name"); a[ctr]=obj.readline(); system.out.println("enter marks"); b[ctr]=integer.parseint(obj.readline()); }

Websocket, Ratchet, Autobahn, can't connect -

im facing following issue: i open ws server on live-server -> running i open project on localhost -> can connect ws server i open project on live-server ( www.myproject.com ) -> can't connect ws server any idea? need open ports? try wss:// . if there proxy in middle may interfering. also, have mapped tcp port using websockets server app runs? if ate using non standar port (like 80 or 443) may not mapped.

mysql - Sum of column in using mysqli and php -

i tring sum of column , show on page using code keeps returning "1" when should return "23" example. check sql statement , works fine. code using. (note: server iis php) <?php require('connection.php'); $sql="select sum(amount) total td"; $result = mysqli_query($sql); while ($row = mysqli_fetch_assoc($result)){ echo $row['total'];} mysqli_close($con); ?> ok added while thing , breaks code white page. i removed ! in mysqli_query , still white page, not sure if me or server not playing nice. this may unrelated when removed ! mysqli_query other code broke it. <?php require 'connection.php'; $date = $_post['date']; $comment = $_post['comment']; $amount = $_post['amount']; $sql= "insert td (date, comment, amount) values ('$date', '$comment', '$amount')"; if (mysqli_query($con,$sql)) { die('error: ' . mysqli_error($con)); } echo "1 record a

Sound format for Android and iOS via Phonegap -

i'm getting ready build phonegap application run on ios , android. client has given me 500 mp3 files sound effects needed. can both platforms use straight mp3 files via tag? or need convert these sound files work? if has experience this, amazing. thanks!

c# - Denying file extensions in IIS -

in iis noticed can deny access file extension on server. example, deny access .jpg images. browser won't b e able display .jpg images on site. i wondering, iis allow deny access file extensions - or filenames- being accessed directly (by typing full url address bar), while still serving them browser if being requested document? you can't really prevent doing this; determined person can download webpage can download. however, can make more difficult less technically literate checking http referrer in request. if it's url of 1 of webpages, can allow request. otherwise, can deny it. technique used prevent deep linking quite often. here's sample (untested) of how can .net http module: public class imagedenyingmodule : ihttpmodule { public void init(httpapplication app) { app.beginrequest += (s, e) => { var request = app.context.request; if (requirespagereferrer(request.url) && !isvalidreferer(request.url

corona - I have a loadFile error. Lua -

i trying implement highscore system game when try declare highscore loadfile error. attempt call global 'loadfile' (a nil value) here code. highscore = loadfile ("highscore.txt") local function checkforfile () if highscore == "empty" highscore = 0 savefile("highscore.txt", highscore) end end checkforfile() print ("highscore is", highscore) local function onsystemevent () if playerscore > tonumber(highscore) --we use tonumber highscore string when loaded savefile("highscore.txt", score) end end runtime:addeventlistener( "system", onsystemevent ) i using corona sdk. the developers of corona ask published nice guide saving , writing files, should fulfill needs. basically path via system.pathforfile , open using io.open . you this: local path = system.pathforfile( "highscore.txt", system.documentsdirectory ) local file = io.open(pa

applescript - How do I make a script that selects all-but-one items in duplicate groups? -

it possible use applescript in media pro, , using catalog images, trying develop script select media items except first media item name not in my_list_of_unique_short_names . i have been looking @ of example scripts ships , @ documentation, @ moment seem stuck , run different issues regarding access-rights, vectors , media item selection depending on parts of code change. on run tell window 1 of application "media pro" activate set my_listunique {} set my_listall selection of catalog 1 of application "media pro" repeat my_item in my_listall if my_item not in my_listunique set end of my_listunique my_item end if end repeat try select (every media item in my_listall name not in my_listunique) on error select {} end try end tell end run in applescript, can't this: select (every media item in my_listall name not

java - Loading an Array from another Array -

it doesn't seem work properly ' public class junk { public static void main(string[] args){ int[] arr = {1,0,1,1,0,1,0}; int[] newarr = null; for(int = 0; < arr.length; i++){ if(ispoweroftwo(i)) { newarr[i] = 9; } else{ newarr[i] = arr[i]; } } (int = 0; < newarr.length; i++) { system.out.print(newarr[i] + ", "); } } private static boolean ispoweroftwo(int i) { if (i <= 0) { throw new illegalargumentexception("number: " + i); } if ((i & -i) == i) { return true; } return false; } } ' an array 10011010 of this, , want 9 9 1 9 0 0 1 9 1 0 1 0 so power of 2 indices should filled 9's getting right? how load data of bits in array or arraylist loop , indices 9... want 1st,2nd, 4th , 8th indices... _ _ 1 _ 0 0 1 _ 1 0 1 0 issue in ispoweroftwo() method i <= 0 throwing exception , want place 9 @ 0th index. secondly haven't initia

python - why the symbol '-' is omitted in 'y' axis when using science notation -

i use matplotlib plotting. today find out wired in plotting doesn't show '-' on y axis ticks. give me solutions it? thanks the code is: from pylab import * import numpy import scipy.io matplotlib.font_manager import fontproperties matplotlib import rc rc('font',**{'family':'serif','serif':['times new roman'],'size':7}) figure(num=1, figsize=(2.9,2.4), dpi=300, facecolor='w', edgecolor='k') x = np.linspace(0, 10, 1001, endpoint=true) y = numpy.power(x/100, 3) plot(x, y,'k-',label=r"simulatied $\sigma_x$") ylim(0,y.max()) ticklabel_format(style='sci',axis='y', scilimits=(0,0)) tight_layout() savefig("xy.pdf") ( https://www.dropbox.com/s/rfpavget4rlyww7/yx.png ) it seems problem caused font 'times new roman'. if changed font 'arial', '-' appears rc('font',**{'family':'sans-serif','sans-serif':['

Secure login and security page check best practices with PHP -

would peoples views on following: is good/best practice query database every secure page on website salted , encrypted code check between session / cookie , database value? or is good/best practice rely on salted , encrypted sessions , cookies (where both key , value both salted , encrypted)? so user id , access level either picked out of database on every secure page or encrypted session / cookie value pair. conclusion this have chosen do: login validate username & md5(password) in db , correct start session session store encrypted key & value pairs for: user_id, admin, access_level create access key joining remote ip & remote user agent & config encription key, encrypt each, join strings , encrypt again store value in both db , session key encrypted user logged in for page validation: i choose 2 levels of page user access validation: low priority secure tasks eg details listings, upload image, select queries mostly high priorit

css - Why string assignment in javaScript is case insensitive? -

i have create simple html page 1 button change color when clicked: <!doctype html> <html> <head> <title></title> </head> <body> <button onclick="if (this.style.backgroundcolor == 'red') { this.style.backgroundcolor = 'green' } else { this.style.backgroundcolor = 'red' } alert(this.style.backgroundcolor)"> ok </button> </body> </html> it surprising me alert(this.style.backgroundcolor) return red instead of red . why? there assignment this.style.backgroundcolor = 'red' , in red start capital letter. css styles aren't saved literal strings, they're converted internal, canonical representation of style. color styles case-insensitive, , canonical representation lowercase.

python - Django template with External CSS ; using {%static%} for images in a division -

i using django web app , encountered no image shown problem following code: <div class="hexagon-in2" style="background:url(static/images/gallery/2.jpg)"> please situation. if have defined media_url in settings.py <div class="hexagon-in2" style="background:url("{{ media_url }}/images/gallery/2.jpg)"> // or static_url if use static files storing images , media

javascript - Sencha app build native overwriting our custom code -

we have been working in application quite time developed using sencha touch 2. we test , debug code using chrome , ripple. the problem facing added custom search , grouping logic 1 of our lists views. when tested , debugged using chrome worked expected, used command package in order integrate cordova , generate android , ios applications. used following command: sencha app build native for reason, code generated command overwriting our custom search , grouping javascript code. why happening. thing not sencha tool not working correctly rather doing wrong causing happen. we clueless on reason be. can throw light this? why our custom grouper , filtering functions being overwritten when packaging application? bellow extract on how define grouping method in our store. again, when try in our debug environment works correctly. problem when package using above command, grouper function gets replaced default sencha touch 2 grouping function returns first character of string.

Codeigniter array issue -

i'm trying loop through array , insert values database. table looks this: hours_day hours_open hours_close my form enables user select day, opening time , closing time. there plus button adds day below it, user can choose whichever days wish. means select box names arrays, i.e. hours_day[] my model looks this: $hours = array( 'hours_day' => $this->input->post('venue_hours_day'), 'hours_opening' => $this->input->post('venue_hours_open'), 'hours_closing' => $this->input->post('venue_hours_close'), ); so have array ($hours) arrays inside of (hours_day, hours_opening, hours_closing). how loop through add database? you can use : $post_day = $this->input->post('venue_hours_day'); $post_opening = $this->input->post('venue_hours_open'); $post_closing = $this->input->post('venue_hours_closing'); $count = count($post_day); $results = a

heroku - ckeditor rails gem adds base url to assets -

i using ckeditor gem : rails 4 , assets_sync , heroku following url: http://www.baseurl.com//mybucket.s3.amazonaws.com/assets/ckeditor/config-77c214941cb7b15940a497f28f333f30.js while should be //mybucket.s3.amazonaws.com/assets/ckeditor/config-77c214941cb7b15940a497f28f333f30.js as defined in assets_host config.action_controller.asset_host = "//#{s3_bucket}.s3.amazonaws.com" i defined: var ckeditor_basepath = "http://mybucket.s3.amazonaws.com/assets/ckeditor/"; but doesn't either. why baseurl? thanks lot help. upgrading ckeditor gem version 4.0.11 fix issue.

javascript - addClass("test") give error: TypeError: undefined is not a function -

in console have: $(".mycssclass")[0].parentnode <li><span class="mycssclass">some text</span></li> i want add css class parent span , tag <li> i tried this: $(".mycssclass")[0].parentnode.addclass("test") typeerror: undefined not function i use jquery 1.5.2 addclass method of jquery objects. when use $(".mycssclass")[0] , have real element, not jquery wrapper. then, can: wrap jquery object again: $($(".mycssclass")[0].parentnode).addclass("test") only work jquery objects: $(".mycssclass").eq(0).parent().addclass("test") add class plain javascript (not supported on old browsers): $(".mycssclass")[0].parentnode.classlist.add("test")

ruby - What is the correct Rails association for this design? -

environment: ruby 2.0.0, rails 4.1, windows 8.1, devise i confused how handle issue. have items stored @ location until checked out user. want able query item , determine location or user holds it. so, item belong either location or user. each location , each user can have many items. this large library system book in 1 of several buildings , patron check out books each of buildings. @ point, i'd locate book either in building or patron. my confusion stems fact item associated either of 2 different models @ different points in time. @ location or held user, , should never both. what association or design work this? thanks.... i use polymorphic association this, try this: item.rb belongs_to :check_outer, :polymorphic => true user.rb has_many :items, :as => :check_outer location.rb has_many :items, :as => :check_outer you need proper database columns support this. on items table, add check_outer_type:string , check_outer_i

php - MySQL query to return counts of rows by month -

i'm trying counts of number of rows in table last 12 months , on month month basis give 12 counts . so far, have ugly way of doing it: select ( select count(i.id) intrusions i, devices d i.device_id = d.id , d.primary_owner_id = '1' , from_unixtime(start_time/1000) '2014-04%', select count(i.id) intrusions i, devices d i.device_id = d.id , d.primary_owner_id = '1' , from_unixtime(start_time/1000) '2014-03%', select count(i.id) intrusions i, devices d i.device_id = d.id , d.primary_owner_id = '1' , from_unixtime(start_time/1000) '2014-02%', etc ) the tables set 1 user can have many devices , 1 device can have many intrusions , hence conditions. the primary_owner_id , date added in dynamically in php using prepared statements . there better way write out wouldn't involve repitition , binding 24 parameters? appreciated you should use grouping this. this. select concat(year(from_un