Posts

Showing posts from September, 2015

reporting services - Visible Export Data Feed option SSRS report -

i working on ssrs reports , need visible "export data feed" option in ssrs reports. updated tag in render section adding attribute visible="true" in reportconfig file, don't find solution. can 1 me how can solve this. thanks, sid

php - rewriterule to prevent 500 internal error with accented Characters in url -

i got unsolved problem maybe basic 1 dont find answer. problem accent characters in url, i got 500 error(error code: 500 internal server error. request rejected http filter. contact server administrator. (12217)). for instant when search "blé", in url got: /content/search?searchtext=blé , result 500 error, in blog keywords: /content/keyword/blé : (result 500 error). i have created directory out of website folder , have created alias website directory. www.mysite.com/directory if put file accented name result same! can use rewriterule change accented words non-accented or can make url accept these accents? i need , appreciate if can me. this looks issue on tmg/isa firewall. on publishing rule have enable high bit character (right click on publishing rule, configure http, general tab).

php - How to delete an item into an array with a button -

Image
i have code array saves need each time press button, these items saved array showed later erase buttons, don't know how delete it, there part of code shows meant: echo "<table border=1>"; echo "<tr class='tabpreciostitles'>"; echo "<td>nom activitat</td> <td>nom tipus activitat</td> <td>tipus tarifa</td> <td>temps/km</td> <td>preu</td>"; echo "</tr>"; ($x=0;$x<count($savedarray[4]);$x++){ echo "<tr>"; echo " <td>".$savedarray[0][$x]."</td>"; echo " <td>".$savedarray[1][$x]."</td>"; echo " <td>".$savedarray[2][$x]."</td>"; echo " <td>".$savedarray[3][$x]."</td>"; echo " <td>".$savedarray[4][$x]."</td>&quo

Google Search Appliances -

how customize xml output of google search applianes.we need add images , ratings in search result.by default after crawling, when go search, items on indexes not proving details users needed.how cutomize or extend searh result google search appliances. if information in metadata of indexed documents isn't being displayed in xml of results when remove proxystylesheet url parameter, try adding getfields=* url parameter.

java - overriding hashCode, why is this.hashCode() not used? -

when overriding equals() , hashcode() methods in java why isn't used often: public int hashcode() { return (int) this.hashcode(); } or above prime introduced: public int hashcode() { final int prime = 31; //31 common example return (int) prime * this.hashcode(); } is bad practise or not work? the method: public int hashcode() { return (int) this.hashcode(); } would lead stackoverflowerror because recurse infinitely, unless replace this super . second method has same problem. in addition, casting value of type int int useless well. if not provide useful new method, don't override it.

Make a choice with a ComboBox, PyQT -

how ? i create programme wherein propose choice combobox. for exemple, if choice item in combobox, write in spinbox. probléme that, wirte in third spinbox without create new combobox. hope understand check out :) ` # -*- coding: utf-8 -*- import sys pyqt4.qtcore import qt pyqt4.qtgui import (qapplication, qwidget, qvboxlayout, qspinbox, qcombobox) class widget(qwidget): def __init__(self): super(widget, self).__init__() self.layout = qvboxlayout(self) self.spin = qspinbox(self) self.spin2 = qspinbox(self) self.spin3 = qspinbox(self) self.combo = qcombobox(self) self.combo2 = qcombobox(self) self.layout.addwidget(self.spin) self.layout.addwidget(self.spin2) self.layout.addwidget(self.spin3) self.layout.addwidget(self.combo) self.layout.addwidget(self.combo2) self.combo.currentindexchanged['qstring'].connect(self.on_combo_changed) self.combo2.c

parcelable - Unmarshalling unknown type code exception while reading parcel values in Android 4.4+ -

i'm using parcelable interface , working fine till android 4.3 (jelly bean) when install same app on device running under android 4.4+ (kitkat) crashing while reading parcel. throwing below error : java.lang.runtimeexception: parcel android.os.parcel@42acce90: unmarshalling unknown type code 6881383 @ offset 1864 when try read : getintent().getextras().getstring("type").contains("some_type"); i have put extra in intent : intent ointent = new intent(getactivity().getapplicationcontext(), eventfragment.class); ointent.putextra("type", "some_type"); after long time , r&d, came know should not use arraylist inside arraylist , within parcelable object. causing issue. so end-up using serializable interface provided java , both concept same.

jsf 2 - how we can get only number skipping fraction in jsf f:convertNumber? -

i have inputtext takes value user , bound number. if value "6000.0", subsequent pages show "6000". there way format such if user enters fractional number, show below? examples: user enters "35545.9" show "35545" user enters "5546.1" show "5546" user enter "7558.767" show 7558 user enter "548.7943" show 548 you can use: <h:inputtext value="#{receipt.amount}" > <f:convertnumber minfractiondigits="2" /> </h:inputtext> or <h:inputtext value="#{receipt.amount}" > <f:convertnumber pattern="#0.00" /> </h:inputtext > to add fraction digits

android - Want to publish my .apk file on playstore -

i want publish app on play store. first asked me signed .apk file , did using debug.keystore , again i'm trying upload .apk , saying "you created apk in debug mode, have create in release mode" tried method still got no success. can me plzzz? you need create own signed key in order publish app. simple , can done eclipse. just follow quick guide: right click on project in eclipse -> android tools -> export signed application package click next select "create new keystore", choose location, enter password click next , fill needed fields. write 25 years in validity. (it minimum) click next , chose want place apk google play thats all. next time when want update app select "use existing key" in step 3.

java - Solr delay at document delete -

maybe got same problem , can me, when delete document there delay between solr index refresh , got still on list document deleted thans in advance it looks using solrj updaterequest delete document. since not explicitly committing update, actual timing of index update depends on solr configuration. solr docs ( https://cwiki.apache.org/confluence/display/solr/near+real+time+searching ) "a common configuration hard autocommit every 1-10 minutes , autosoftcommit every second" if need make delete committed index right away, can add "commit" action updaterequest this: updaterequest req = new updaterequest(); req.deletebyquery("documentid:"documentid); req.setaction(action.commit, false, true); this have same effect adding "?action=commit" update request , perform soft commit right away.

c - Function returns only letters of string -

i wrote program should take string , return string letters original one, it's not working , can't figure out why. can me? #include<stdio.h> char *only_letters(char *s1ptr, char *s2ptr) { while(*s1ptr) { if((*s1ptr >= 'a' && *s1ptr <= 'z') || (*s1ptr >= 'a' && *s1ptr <= 'z')) { *s2ptr = *s1ptr; s2ptr++; } s1ptr++; } *s2ptr = '\0'; return s2ptr; } int main() { char *s1ptr, *s2ptr; printf("\n write string:\n"); scanf("%s", s1ptr); printf("\n%s\n", *only_letters(s1ptr, s2ptr)); return 0; } you have 3 problems. s1ptr , s2ptr 2 unallocated arrays caused undefined behavior. you're incrementing s2ptr point has value \0 . after returning have string has \0 . to show string, must pass without * (don't dereference it). try this char *only_letters(char *s

sql - Oracle - How to force user to INSERT multiple row -

i using oracle 11gr2 on academic assignment. there constraint room must have 3 - 5 people. know can write trigger check if room has more 5 people: create table people ( pid integer primary key ); create table room ( rid integer primary key ); create table living ( rid integer, pid integer, constraint living_pk primary key (rid, pid), constraint living_fk_rid foreign key (rid) references room(rid), constraint living_fk_pid foreign key (pid) references people(pid) ); create or replace trigger living_biu before insert or update on living referencing new new old old each row declare count number; begin select count(*) count living rid = :new.rid; if(count > 5) raise_application_error(-20002, 'too many people in room.'); end if; end living_bi; but can not check if number lesser 3 because can not insert things living. question how can create trigger force user insert more 3 rows , less 5 rows @ time? with standard p

Deploy TypeScript WebSite from GitHub to Azure -

i have .net website includes typescript files. i'm attempting deploy azure website github, i'm getting error associated typescript. it appears me may related use of newest version (1.0) whereas kudu build has 0.9 - i'm new enough can't sure that's issue, nor how fix it. here deployment log (sorry formatting): command: d:\home\site\deployments\tools\deploy.cmd handling .net web application deployment. packages listed in packages.config installed. restoring nuget packages... prevent nuget downloading packages during build, open visual studio options dialog, click on package manager node , uncheck 'allow nuget download missing packages'. packages listed in packages.config installed. shadow_findly -> d:\home\site\repository\shadow_findly\bin\release\shadow_findly.dll d:\program files (x86)\msbuild\microsoft\visualstudio\v12.0\typescript\microsoft.typescript.targets(96,5): error : project file uses different version of typescript compiler ,

html - Float Two Divs Side By Side -

Image
i'm sorry post this. i've read dozens of posts on same issue, can't solve this. how place blue , green boxes side-by-side? i've got plenty of space in wrapping div, , think dealing float correctly, still incorrect results. gives? <div class="titleframe" > <div class="image" > <img id="thief" src="thief.png"> </div> <div class="titletext"> <h1>my title</h1> <p>line1<br>line2<br>line3</p> </div> </div> .titleframe { margin:0 auto; width:750px; clear:left; height:300px; border: 1px solid red; } .image { width:100px; height:250px; border: 1px solid blue; } .titletext{ position:relative; float:left; padding-left:25px; padding-top:0px; height:150px; width:250px; border: 1px solid green; } add float:left; .image class.

php - simplexml_load_file not working with variable but works with string -

i trying connect crm (pardot). i have create url necessary call xml: //this log in , print api key (good 1 hour) console $rz_key = callpardotapi('https://pi.pardot.com/api/login/version/3', array( 'email' => 'myemail@email.com', 'password' => 'password', 'user_key' => '032222222222222b75a192daba28d' ) ); $number_url = 'https://pi.pardot.com/api/prospect/version/3/do/query'; $number_url .= '?user_key=032222222222222b75a192daba28d'; $number_url .= '&api_key='; $number_url .= trim($rz_key); $number_url .= '&list_id=97676'; $ike = simplexml_load_file($number_url); print_r($ike); now code returns : simplexmlelement object ( [@attributes] => array ( [stat] => fail [version] => 1.0 ) [err] => invalid api key or user key ) however, if echo $number_url , , copy , paste url browser, loads wonderfully. if copy , paste same echoed url simplexml_loa

bash - Synchronize access to shell variables while using Gnu parallel (i.e. critical section in Gnu parallel) -

i have for loop i'd convert parallel . however, i'm appending global ( bash ) array within loop. what's recommended way of dealing situation? parallel provide form of synchronization between jobs besides --keep-order ? i thought replacing array combination of flock , echo > some_shared_file , wanted know if there's standard way of implementing "critical section" parallel . bash has "thread local" variables. there no global variables can updated different threads. variables/arrays copied subprocesses, , changes in 1 not reflected in another. the more general answer -- if had resources updated different processes -- use sem comes gnu parallel.

Android get data using regexp -

i have html string in in trying string between tag using regexp , saving value array-list . not able string between tag array-list empty. <span><div style=\'float:left; width:350px;\'>pharmacie dar d\'bagh</div> my code data using regexp is private void findtextbyregexp() { arraylist<arraylist<string>>datalist1 = new arraylist<arraylist<string>>(); string pattern3 = "<span><div style=\'float:left; width:350px;\'>"; string pattern4 = "</div>"; string text = readfromfile(); pattern p = pattern.compile(pattern.quote(pattern3) + "(.*?)" + pattern.quote(pattern4)); matcher m = p.matcher(text); while (m.find()) { arraylist<string>dataadd = new arraylist<string>(); dataadd.add(m.group(1)); datalist1.add(dataadd); log.d(&quo

Outputting multiple lines of text with renderText() in R shiny -

i want output multiple lines of text using 1 rendertext() command. however, not seem possible. example, shiny tutorial have truncated code in server.r : shinyserver( function(input, output) { output$text1 <- rendertext({paste("you have selected", input$var) output$text2 <- rendertext({paste("you have chosen range goes from", input$range[1], "to", input$range[2])}) } ) and code in ui.r : shinyui(pagewithsidebar( mainpanel(textoutput("text1"), textoutput("text2")) )) which prints 2 lines: you have selected example have chosen range goes example range. is possible combine 2 lines output$text1 , output$text2 1 block of code? efforts far have failed, e.g. output$text = rendertext({paste("you have selected ", input$var, "\n", "you have chosen range goes from", input$range[1], "to", input$range[2])}) anyone have ideas? you can use re

jQuery Auto Refresh Send Value Variable -

i want pass value of variable using jquery auto refresh : var auto_refresh = setinterval ( function () { var p_box_sn = $("#p_box_sn").val(); $.ajaxsetup({ cache: false }); $('#counts').load('load.php?p_box_sn=p_box_sn').fadein("slow"); }, 1000 ); but show output : p_box_sn. wanted value var p_box_sn , sent load function. possible? since p_box_sn variable, need concatenate using + : $('#counts').load('load.php?p_box_sn=' + p_box_sn).fadein("slow");

php - insert single set of data multiple times mysql -

i have insert single set of data multiple times , n rows. insert mytable values ("john", 123, "us"); can insert n rows in single sql statement? here n dynamic value n user input , how make insert query n times , idea. $sql = "insert `mytable` values(`field1`,`field2`,`field3`) values "; $count = 5; for($i=0;$i<$coutn;$i++) { $sql .= " ('john','123','us' )"; } is correct way.. yep, can done easily, should this: insert mytable values ("john", 123, "us"), ("carl", 123, "eu"), ("jim", 123, "fr"); however, programming practice specify columns of table in query, example: insert mytable (column1, column2, column3) values ("john", 123, "us"), ("carl", 123, "eu"), ("jim", 123, "fr"); edit : can build query (in for cycle), $total user input: $sql = "insert mytable (colu

How to read multiple scan using zxing library in android -

this code scan single record return app. how scan multiple record without returning back. intent intentscan = new intent("com.google.zxing.client.android.scan"); intentscan.addcategory(intent.category_default); string targetapppackage = findtargetapppackage(intentscan); if (targetapppackage == null) { return showdownloaddialog(); } intentscan.setpackage(targetapppackage); intentscan.addflags(intent.flag_activity_clear_top); intentscan.addflags(intent.flag_activity_clear_when_task_reset); attachmoreextras(intentscan); startactivityforresult(intentscan, 0); update onactivityresult method this //method getting qr code qr code after scan public void onactivityresult(int requestcode, int resultcode, intent intent) { if (requestcode == 0) { if (resultcode == result_ok) { string contents = intent.getstringextra("scan_result"); toast.maketext(this, contents , toast.length_short).sho

ios - Present UIViewController from subclass of UIView -

i have created subclass of uiview , in app need present uiviewcontroller it, i have tried following : poiinfocontroller = [[poiinfocontroller alloc]initwithnibname:@"poiinfocontroller" bundle:nil]; [poiinfocontroller setmodalpresentationstyle:uimodalpresentationformsheet]; [[[[uiapplication sharedapplication] keywindow] rootviewcontroller] presentmodalviewcontroller:poiinfocontroller animated:yes]; but crash terminating app due uncaught exception 'nsinvalidargumentexception', reason: 'application tried present modally active controller .' please help, **edit crash log:** 2014-04-23 17:04:26.433 navigationlibsprintmom[4610:a0b] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: 'application tried present modally active controller <viewcontroller: 0x9d52140>.' *** first throw call stack: ( 0 corefoundation 0x017c15e4 __exceptionpreprocess + 180 1 libobjc.a.dylib

android - Custom Listview - multiselect items and colour -

i using custom listview adapter, , working well. i using checkbox stored checked values, think might better change background colour of list item when selected. i have tried (and failed) using selectors, , tried modify code change view background. here custom adapter code, can change set blue background when row selected, , maintain selection if multiple selected? public class imageadapter extends baseadapter { context context; arraylist<bitmap> images; arraylist foldername; boolean[] checkboxstate; public imageadapter(context c, arraylist<bitmap> images, arraylist foldername){ this.context = c; this.images = images; this.foldername = foldername; this.context = context; checkboxstate=new boolean[images.size()]; } public int getcount() { return images.size(); } public object getitem(int arg0) { // todo auto-generated method stub return null; } publi

algorithm - Similarity measurement of time-sequenced data with different length -

consider following data. groundtruth | dataset1 | dataset2 | dataset3 datapoints|time | datapoints|time | datapoints|time | datapoints|time |0 | |0 | |0 | |0 b |10 | b |5 | b |5 | b |13 c |15 | c |12 | c |12 | c |21 d |25 | d |22 | d |14 | d |30 e |30 | e |30 | e |17 | | | f |27 | | | g |30 | visualized (as in number of - between each identifier): time -> groundtruth: a|----------|b|-----|c|----------|d|-----|e dataset1: a|-----|b|-------|c|----------|d|--------|e dataset2: a|-----|b|-------|c|--|d|---|e|----------|f|---|g dataset3: a|-------------|b|--------|c|---------|d my goal compare datasets groundtruth. want crea

seo - How can I prevent Googlebot from crawling my Underscore client-side templates? -

Image
in google webmaster tools, under crawl errors/other, we're seeing 400 error urls this: /family-tree/<%=tree.user_url_slug%>/<%=tree.url_slug%> this not real url, or url intended crawled. underscore/backbone template: <script type="text/template" class="template" id="template-trees-list"> <% _.each(trees, function(tree) { %> <a href="/family-tree/<%=tree.user_url_slug%>/<%=tree.url_slug%>" rel="nofollow"> <%= tree.title %> </a> <% }); %> </script> why google crawling inside of script block? why google ignoring rel="nofollow" attribute? is there else can keep googlebot away our underscore templates? update: i'm open using robots.txt if can find right pattern keep pages , block bad pages. example, want keep /surnames/jones/queries while blocking /surnames/jones/queries/<%=url_slug%> . have thousands this. looks

mvvm - Encountering lag in WPF Tab Control when switching between tabs (new instance of view is created each time I switch tabs) -

i beginner wpf, , having lot of learning while coding, please bear me. have searched archives, , couldn't find answer fits question. i have view contains tab control, loaded 2 default tabs, , additional tabs added , removed programmatically based on user actions. the way having observable collection of viewmodels different types of views can add , remove. in xaml view, had few different datatemplates used determine kind of view load. the issue i'm facing when click 1 tab another, seeing lag - close 1 second. put break point in code behind view, , noticed initializecomponent() method being called view every time click on tab. the collection of viewmodels called activecontents , holds items of type activecontent . activecontent class 1 created, , contains object named contentitem hold viewmodel. here of code project: one of data templates xaml: <usercontrol.resources> <resourcedictionary> <resourcedictionary.mergeddictiona

python - shutil.move(scr, dst) gets me IOError: [Errno 13] Permission denied and 3 more errors -

documents = ['*pdf', '*docx', '*txt'] in range(len(documents)): if glob.glob(documents[i]): print(documents[i], true) shutil.move(glob.glob(documents[i])[0], '/home') else: print(documents[i], false) well, goes great until: shutil.move(glob.glob(documents[i])[0], '/home') which basically: shutil.move(scr, dst) and produces error: *pdf false *docx true traceback (most recent call last): file "/usr/lib/python3.2/shutil.py", line 326, in move os.rename(src, real_dst) oserror: [errno 13] permission denied during handling of above exception, exception occurred: traceback (most recent call last): file "teste.py", line 19, in <module> shutil.move(glob.glob(documents[i])[0], '/home') file "/usr/lib/python3.2/shutil.py", line 334, in move copy2(src, real_dst) file "/usr/lib/python3.2/shutil.py", line 146, in copy2 copyfile(src,

Can't get jQuery :not selector to work -

if type character inside input field of jsbin below, div slide down. on click of elements other div.wrap , children, want div slide up. can not seem right. keeps doing opposite of want. http://jsbin.com/sobecume/1/edit?html,css,js,console,output js $('.blah').keyup(function(){ $('.blah2').slidedown(); }); $('body:not("#wrap")').click(function(){ console.log("click!"); var display = $('.blah').css('display'); if (display !== 'none') { $('.blah2').slideup(); } }); i don't think can craft selector check against element's ancestors (i think?). try this: $('*').click(function(){ if($(this).closest('#wrap').length>0){return false;} console.log("click!"); var display = $('.blah').css('display'); if (display !== 'none') { $('.blah2').slideup(); } }); http://jsbin.com/sobecume/3

json - getJSON with [ ] doesn't work -

i'm not experienced in stuff, call api wich returns me this [ { "beatmapset_id":"18860", "beatmap_id":"66609", "approved":"2", "approved_date":"2010-08-15 10:04:19", "last_update":"2010-08-15 10:00:44", "total_length":"468", "hit_length":"447", "version":"legend", "artist":"dragonforce", "title":"revolution deathsquad", "creator":"lesjuh", "bpm":"250", "source":"", "difficultyrating":"3.95095", "mode":"0" } ] my html : $(document).ready(function(){ $.getjson('whatever.html', function(fbresults) { document.write(fbresults.beatmapset_id); }); }); now problem is,

vagrant - How to lock in a chef recipe -

i attempting run vagrant chef, running current bug ; https://tickets.opscode.com/browse/cook-3989?focusedcommentid=43724&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-43724 [2013-11-12t15:47:30+00:00] fatal: syntaxerror: compile error /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix/metadata.rb:19: syntax error, unexpected ':', expecting $end display_name: 'postfix/main', this commenter states fixed doing following : i locked postfix recipe usage @ 3.0.2 in meantime how can done? you have 2 options: upgrade ruby you running ruby < 1.9. supported version of ruby 2.1 , 1.8 series deprecated , 1.9 series scheduled deprecation. change version what commenter meant "use older version of cookbook". can specifying -v flag knife or downloading older version community site.

google analytics not recording 33% of results -

hi have website running google analytics , results recording inaccurate. recording event in google analytics , recording same event in database count should match. finding google analytics not recording around 1/3 of results. know things can affect such people disabling javascript , cookies surely can't 1/3 of people. talking less 100 hits per day ga shouldn't sampling data. comments appreciated. edit: if have compared google analytics results results of own database interested in results. edit: in tests results have matched perfect, users results seem wrong. edit: found problem, have ssl configured on server , linking non ssl google analytics url. since different browsers handle sort of thing differently getting mixed results. i'm still having issue found problem. caused third party cookie issue. because app third party app running on site(similar facebook apps) , 3rd party cookies disabled wont recorded. issue fixed not using cookies google analytics.

ios - Trouble changing app's name in xcode 5 -

i using xcode 5.1 i have changed app's name before using same steps described this question . but reason having trouble right now. usually, have experienced this same screen . time when changed name did not change everything. when view project's targets, old app name still being used. if clean , build project, show old name in "progress bar" @ top of xcode. if @ project's supporting files folder, plist still has old app name ie. old-app-name-info.plist so far have manually changed project name, changed bundle identifier, changed product name in build settings, , changed name of scheme. don't know else do. the app has correct name when run on simulator or on iphone, old app name still being used throughout various areas in project folder's, xcode settings, etc. i want change use's old app's name , make them use new app name. edit: here's example. if go file inspector tab correct name shown project, if go issue navigator tab s

knockout.js - How to link checkbox and text value using knockout? -

i want clear text box when checkbox unchecked. this html: <input type="checkbox" id="chkminfixcharge" class="left" data-bind="enable: isenableminfixedcharge,checked: ischeckminfixedcharge" /> <input type="text" id="txtminfixcharge" class="minitext left" data-bind="value:?????" style="margin: 0px 10px;" /> use line of code you value:ischeckminfixedcharge()? urdefinedvariable:''

token - Laravel "remember_token" -

is safe use remember_token in users table authenticating user application? what purpose of token? currently, i'm using in forms check whether user logged in - if token not present, show login screen. each time user logs out, token regenerated. no it's not supposed used authenticate, it's used framework against "remember me" cookie hijacking. value refreshed on login , logout, if cookie hijacked malicous person, logging out making hijacked cookie useless since doesn't match anymore. http://laravel.com/docs/upgrade#upgrade-4.1.26

INSERT in MySQL 5.1 and 5.6 and then SELECT returns in a different order -

im trying 2 inserts 2 databases on different servers. 1 running mysql 5.1 (on nas) , mysql 5.6 (on ubuntu). i simple insert table(pri1,pri2,value) values (1,1,1); insert table(pri1,pri2,value) values (1,2,1); in order. when a select * table; mysql 5.6 returns pri1 pri2 value 1 1 1 1 2 1 which correct because order inserted. when same thing (insert in same order , select) mysql 5.1 returns: pri1 pri2 value 1 2 1 1 1 1 basically stores data in reverse , displays in order. why happen , how can prevent shows data correctly in mysql 5.6 ? thank you if need guaranteed specific order have use order by -clause, i.e. select * your_table order your_column desc without order by -clause, may appear if result in same order inserted them. not case. order may affected factors indexes or caching. by default, rows in result set produced select statement returned server client in no particular order. when query issued, server

including Sass-cache folder on live site -

hey guys new sass . project includes sass cache folder . point it's taking space. want know is, should upload folder? deleted contents of , nothing happened on site. thanks. you can delete directory. browsers care css files. in fact can compile sass locally , push produced css only.

c++ - Call function of template class created at runtime -

i have tricky question c++(11) template classes , instantiation types determined @ runtime: following scenario: user defines type of template class using config file (ros parameters). determines type of template class, not further logic: class definition: template<typename t> class myclass { //[...] } exemplary code: /* [read parameter , write result bool use_int] */ std::unique_ptr<myclass> myclassptr {nullptr}; if(use_int) { myclassptr.reset(myclass<int>); } else { myclassptr.reset(myclass<double>); } myclassptr->foobar(); /* [more code making use of myclassptr] */ so code (of course) not compiling, because unique_ptr template must specified template type. however, problem arises template type must same objects assigned using reset . one ugly solution copy code myclassptr->foobar(); , following each branch of if/else, don't like. i see solution similar this: /* [read parameter , write result bool use_int] */ myc

c# - nHibernate Mapping BaseClass to Multiple tables -

i have group of objects share similar properties, inherit these base class. here simple example of doing. i have 2 objects, employee , customer have corresponding tables. each contain list of addresses. address class shared between 2 objects, reside in 2 seperate tables employeeaddress , customeraddress . employeeaddress - employeeid uniqueidentifier address varchar (50) zipcode varchar (10) city varchar (20) state id not null customeraddress - customerid uniqueidentifier address varchar (50) zipcode varchar (10) city varchar (20) state id not null how can map address object 2 seperate tables? want able pull data either employeeaddress or customeraddress table when needs to. i have tried: (employeemap) hasmany(x => x.addresses).table("employeeaddress").keycolumn("employeeid"); but nhiberna

java - How change foreground color in a specific row from a default jtable -

i have default jtable in application. little checking, , change color of rows have first column equal close. i've been trying this, , got this: string x = jtable.getmodel().getvalueat(0, 0).tostring(); if(x.equals("close")) { jtable.setforeground(color.red); } but way did, change color of lines. , makes checking first element of table. i liked checking lines , change had first column equal close. does can me please? thank can give me. greetings. you have implement tablecellrenderer . have @ using custom renderers of jtabel tutorial oracle.

java - Does an Array's specified capacity include 0? -

when declare array: int[] array = new int[2] when specify capacity of (in case 2) include 0 or not? if did include 0 indexes be: 0,1,2 , if didn't 1,2 please answer question need know. in advance :) what call capacity, size, or better length of array, i.e. amount of items can store in array. the indexing start zero, therefore, can figure out yourself, if start 0 , have array of length n, indexes start 0 , ends in n-1, i.e. last item in array @ n-1 index.

javascript - Create numerical restrictions for date; year, month and day -

i'm trying put restrictions on date input field users don't put in exaggerating dates year 3000. found neat solution works. want date in yyyy/mm/dd format year having restriction, mm between 1-12, dd between 1-31, , yy between 1900-2100. here's jsfiddle , can't work format yyyy/mm/dd. if change dtarrays dtmonth = dtarray[5]; dtday= dtarray[7]; dtyear = dtarray[1]; year works mm ends being in place of dd. doing wrong? there better ways of accomplish this? last question.. problem seems pretty simple, books on jquery/javascript recommend may able on own? i think you've misunderstood in dtarray (which isn't great name). it's output of capture groups regex: /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/ which matches mm/dd/yyyy (where digits) so [1] = m or mm [2] = / or - separator [3] = d or dd [4] = / or - separator [5] = yyyy they aren't offsets string. ( dtarray[0] whole date matched.) modified regex is /^(\

wso2is - LDAP-Error in Identity Server 4.6 when using user registration with "Ask password from user" -

Image
wanted try password-notification feature of 4.6 throwing exception. followed links: https://docs.wso2.org/display/is460/recover+with+notification http://cgchamath.blogspot.mx/2013/12/wso2-identity-server-user-creation-with.html error getting here stacktrace caused by: org.wso2.carbon.identity.base.identityexception: error while persisting identity user data in user store @ org.wso2.carbon.identity.mgt.store.userstorebasedidentitydatastore.store(userstorebasedidentitydatastore.java:81) @ org.wso2.carbon.identity.mgt.identitymgteventlistener.dopostadduser(identitymgteventlistener.java:420) ... 124 more caused by: org.wso2.carbon.user.core.userstoreexception: 1 or more attributes trying add/update not supported underlying ldap. @ org.wso2.carbon.user.core.ldap.readwriteldapuserstoremanager.dosetuserclaimvalues(readwriteldapuserstoremanager.java:874) @ org.wso2.carbon.identity.mgt.store.userstorebasedidentitydatastore.store(userstorebasedident

github - Git unable to update clean working directory -

i have git setup on machine, , it's been doing strange. i'll start scratch. [nighthawk]$ cd ~ [nighthawk]$ rm -rf ./www [nighthawk]$ ls maildir logs [nighthawk]$ now clone repository. [nighthawk]$ git clone https://key:@github.com/user/repo.git ./www cloning ./www... remote: counting objects: 260, done. remote: compressing objects: 100% (195/195), done. remote: total 260 (delta 82), reused 217 (delta 47) receiving objects: 100% (260/260), 7.41 mib | 4.88 mib/s, done. resolving deltas: 100% (82/82), done. [nighthawk]$ cd www [nighthawk]$ git status # on branch master nothing commit (working directory clean) [nighthawk]$ now can see it. it's there. i'm going make change readme file, , pull changes onto machine. this strange: [nighthawk]$ git status # on branch master # changed not updated: # (use "git add <file>..." update committed) # (use "git checkout -- <file>..." discard changes in working directory) # # mo

distance function of Google AppEngine Search API is behaving unconsistantly -

string loc_expr = "distance(location, geopoint(" + userlatitude + ", " + userlongitude + "))"; // build sortoptions sortoptions sortoptions = sortoptions.newbuilder() .addsortexpression(sortexpression.newbuilder().setexpression(loc_expr).setdirection(sortexpression.sortdirection.ascending).setdefaultvaluenumeric(0)) .setlimit(200).build(); // build queryoptions queryoptions options = queryoptions.newbuilder().addexpressiontoreturn(fieldexpression.newbuilder().setexpression(loc_expr).setname("distance")).setlimit(limit) .setcursor(cursor).setsortoptions(sortoptions).build(); string querystring = loc_expr + " < " + searchradius * 1000; // build query , run search query query = query.newbuilder().setoptions(options).build(querystring); indexspec indexspec = indexspec.newbuilder().setname("restaurants").build(); index index = searchservicefacto

android - google Analytics V4 cannot be imported? -

i'am trying add google analytics application i've followed every step @ page https://developers.google.com/analytics/devguides/collection/android/v4/#tracking-methods the issue eclipse not recognized tracker , googleanalytics the google play service , every thing installed sdk i've tried search v4 analytics sdk could't find i don't know if mess here any advice ? finally found solution .. google analytics v4 has no sdk , depends on google play services sdk so here did : download google play services sdk android sdk go android sdk folder on pc partition follow path (/extras/google/google_play_services/libproject/ ) you'll find folder ( google-play-services_lib ) <- thats need now go eclipse , import project ( google-play-services_lib ) library right click on project properties -> android -> second tab ( library ) click add , select google-play-services_lib now you've done can use google analytics v4

Does Go sanitize URLs for web requests? -

i implementing simple web server in go. have no experience in web development, striked serious question me. let's i'm serving web pages modified loadpage function here func loadpage(title string) []byte { filename := title body, _ := ioutil.readfile(filename) return body } func handler(w http.responsewriter, req *http.request) { content := loadpage(req.url.path[1:]) fmt.fprintf(w, "%s", content) } technically allows me write request in form of http://example.com/../../etc/passwd and code happily serve /etc/passwd file, not. mean there sort of protection against ../ in go http package or http protocol itself, or doing wrong , security hole? net/http in http request multiplexer, servemux : servemux takes care of sanitizing url request path, redirecting request containing . or .. elements equivalent .- , ..-free url. the relevant function private func cleanpath(p string) string , calls path.clean : 1415 np

Thinktecture Identity Server with OAuth Implicit Login -

i trying use javascript login identity server in oauths client. can login , return return webpage successful. met problem why thinktecture identity sevrer return '#' not '?' before parameters in querystring ,is bug? the other question how can uses claims when have access_token? implicit flow uses hash fragment not query string - not bug (check oauth2 spec). the client not consume access token in oauth2 - opaque client - access token meant used backend.

oop - Inheritance in Python, init method overrriding -

i'm trying understand inheritance in python. have 4 different kind of logs want process: cpu, ram, net , disk usage i decided implement classes, they're formally same except log file reading , data type data. have following code (log object logging object instance of custom logging class) class logfile(): def __init__(self,log_file): self._log_file=log_file self.validate_log() def validate_log(self): try: open(self._log_file) dummy_log_file: pass except ioerror e: log.log_error(str(e[0])+' '+e[1]+' log file '+self._log_file) class data(logfile): def __init__(self,log_file): logfile.__init__(self, log_file) self._data='' def get_data(self): return self._data def set_data(self,data): self._data=data def validate_data(self): if self._data == '': log.log_debug("empty data list&quo

ios - ios7: adding iAd.framework to a project causes SIGABRT on run -

i have project working fine. want incorporate ads , make free version. i've copied project, renamed , added iad.framework. has caused sigabrt on run. debugging not explain anything... crashes on setting vc properties viewdidload method of root vc. not think relevant, can provide details if think otherwise. is there trick in linking iad? in advance! edit: logs , clarification added 2014-04-25 16:04:04.249 myapptest[686:60b] -[mpviewcontroller setsoundname:]: unrecognized selector sent instance 0x16e43a30 2014-04-25 16:04:04.252 myapptest[686:60b] * terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[mpviewcontroller setsoundname:]: unrecognized selector sent instance 0x16e43a30' it complains on non-recognized selector (property setter, precise). did not change apart linking iad.framework. , if remove framework, starts working fine again. after more tracing, i've figured out that, iad framework, [self.storybo