Posts

Showing posts from June, 2014

jquery select appended elements -

jquery select appended elements - this question has reply here: event binding on dynamically created elements? 13 answers faced problem jquery doesn't allow select appended element. i've seen lot of advices how solve it. example: var $li = $('<li><span>' + html + '</span></li>'); $('.top').append($li); but can't help me in way. server list of records database in json format , in view , loop list , generate html structure. for example: $.getjson( "/searchbytype", data, function( info ) { $.each( data, function( key, val ) { $('items').append('<li class="item">'+ val.name + '</li>'); }); }); and want next click on li item , manipulation. ul list may contain 100-200 li tags. ideas appreciated! i think need event-del

numeric limits - How double can store 1024 bits in just 8 bytes in C++? -

numeric limits - How double can store 1024 bits in just 8 bytes in C++? - i can't figure what's going on here. i find size of next info types in bytes: char:1 int:4 float:4 double:8 long long int:8 long long int max size 9223372036854775807 whereas double max size 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 what!!! how mr. double storing such big value in 8 bytes ??? how many decimal digits need represent every integer between 0 , 10100 - 1? the reply should obvious: 100 digits. how many decimal digits need represent integral values between 0 , 10100 - 1, if need 7 important digits? you need 9. every number can represented abcdefg * 10hi. double s work in same way.

c# - How to find the difference between two images? -

c# - How to find the difference between two images? - i'm developing screen-sharing application. in project need transport images on internet. obviously, can't send new image on net every few seconds, extremely slow. want send 1 image of server's screen client, , afterwards, instead of sending new image sending pixels have been changed since lastly image (the 1 client has). i have written code: private list<color> comparebitmaps(image old, image _new) { list<color> returnlist = new list<color>(); for(int = 0; < old.width; i++) (int j = 0; j < old.height; j++) { if (((bitmap)old).getpixel(i, j) != ((bitmap)_new).getpixel(i, j)) { returnlist.add(((bitmap)_new).getpixel(i, j)); } } homecoming returnlist; } however, works way slow. i'm looking faster algorithm, 1 improve complexity. note: don't want built library that. need algorithm.

Groovy - Extract and display a substring from a String -

Groovy - Extract and display a substring from a String - i find pattern below string. words containing "match.text3", perchance latest 1 matching ending number. {match.text1.1=[1, admin, 07/10/14 09:29:34], match.text2.2=[2, admin, 07/10/14 10:01:08], match.text3.3=[3, admin, 07/10/14 10:08:01], match.text3.4=[4, admin, 07/10/14 11:08:01], match=[text3]} expected output: match.text3.4 or match.text3.3 match.text3.4 you can utilize findall() method on string extract tokens match given pattern: string s = '{match.text1.1=[1, admin, 07/10/14 09:29:34], match.text2.2=[2, admin, 07/10/14 10:01:08], match.text3.3=[3, admin, 07/10/14 10:08:01], match.text3.4=[4, admin, 07/10/14 11:08:01], match=[text3]}' list<string> tokens = s.findall(/match\.text3(\.[0-9]+)?/) assert tokens == ['match.text3.3', 'match.text3.4'] string lastly = tokens.last() assert lastly == 'match.text3.4' groovy

maven - bowerInstall task alternative for Java? -

maven - bowerInstall task alternative for Java? - i'm working on springmvc project , i'm organising project construction "client" module. i'm using webjars , wro4j projects great, organise javascript dependencies , concatenate , minimise css/js code. what miss exists in "javascript" world allows utilize html code depending on environment. i'm talking bowerinstall task. have in jsp code: * includes js files 1 one, when working in "development" profile * single file, concatenation , minification, when working in "production" profile. next lines html file in yeoman based project: ... <!-- build:css styles/vendor.css --> <!-- bower:css --> <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.css" /> <link rel="stylesheet" href="../bower_components/highlightjs/styles/monokai.css" /> <link rel="stylesheet" href="../

scala - Why can't I access my objects member variable? -

scala - Why can't I access my objects member variable? - i have next class setup: class myclass { class myinnerclass(membervar: string) def getainner: myinnerclass = { new myinnerclass("hello") } } then have next code outside of class: def myfunction = { val = new myclass val b = a.getainner.membervar // value membervar not fellow member of a.myinnerclass } why this? you need add together keyword val create membervar public otherwise it's private value: class myclass { class myinnerclass(val membervar: string) def getainner: myinnerclass = { new myinnerclass("hello") } } scala

python - How to ensure that script only executes subsequent methods after subprocess.Popen has completed execution -

python - How to ensure that script only executes subsequent methods after subprocess.Popen has completed execution - i'm running problems here trying utilize subprocess.popen. cannot utilize subprocess.call script i'm writing because i'd able specify environment execution, can in popen through argument method. i've noticed subprocess.popen takes longer finish subprocess.call, , creates problems downstream in script because rest of script relies on exit code (return code) spawned process decide (through set of conditional if statements) on suitable action. the method involves using subprocess is: def execute_local(self): ''' spawns test execution process locally , directs standard output , error streams process appropriate log files. ''' self.return_code = subprocess.popen(args = self.cmd_string, stdout = open(self.out_log_filepath, 'w'), stderr = open(s

objective c - IOS Disable UItableview Selection on All Cells but one Cell -

objective c - IOS Disable UItableview Selection on All Cells but one Cell - how can 1 disable selection on uitableviewcell 's except 1 in uitableview . - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { // deselect row [tableview deselectrowatindexpath:indexpath animated:yes]; // nslog(@"row selected = %li",(long)indexpath.row); self.selectedinviteduserid = [[self.vieworderuserarray valueforkey:@"inviteduserid"] objectatindex:[indexpath row]]; nslog(@"row selectedinviteduserid = %@",self.selectedinviteduserid); if( self.selectedinviteduserid && [indexpath row] != 0 ) { if ([[self.viewselecteditemsarray lastobject] count] == 0) { [self performseguewithidentifier:@"delimenufromvieworderlist" sender:self]; } else { [self performseguewithidentifier:@"vieworde

Listen Webview Key Events from software keyboard in Android Activity -

Listen Webview Key Events from software keyboard in Android Activity - is possible handle software keyboard events webview in host android application? for example, can application's activity hear typed content in search field of webview displaying google website? considering method described below possible if overwrite returning true, unfortunatelly not able it. ideas? public boolean shouldoverridekeyevent (webview view, keyevent event) added in api level 1 give host application chance handle key event synchronously. e.g. menu shortcut key events need filtered way. if homecoming true, webview not handle key event. if homecoming false, webview handle key event, none of super in view chain see key event. default behavior returns false. parameters view webview initiating callback. event key event. returns true if host application wants handle key event itself, otherwise homecoming false i think shouldoverridekeyevent method tells scheme "wind

maven - How can I use a secure file in a CircleCI build? -

maven - How can I use a secure file in a CircleCI build? - i trying build project on circleci needs access secure file. cannot utilize environment variable, must in form of file. in case maven settings.xml file, there other utilize cases. can do? there quite few solutions problem: file environment variable if contents of file short (just password example), can store entire file environment variable, , add together line circle.yaml build file: echo $secure_file > mysecurefile variable substitution if contents of file large, little portion of file secure, can store file in code repository, , utilize sed replace fixed string environment variable, this: sed -e s/secure_password/${secure_password}/g mysecurefile.tmpl > mysecurefile encrypt file you can encrypt config file , check source repository, store decryption key environment variable. decrypt during build process. maven settings.xml special case for special case of maven settings.xml fil

javascript - Function not defined....My Function Call is not Working -

javascript - Function not defined....My Function Call is not Working - i need help code. maintain getting error changebg not defined. the way code should work when select radio button background changes. if alter function inline function within onclick event works if move funtion script section doesn't work example: <input type="radio" id="red" name="change1" value=1 onclick="document.body.style.backgroundcolor='red'" /><label for="red">red</label><br /> works @ changing background red but when create function in script section , phone call function in onlick event doesn't work, example of code not working: script: <script type="text/javascript"> function changebg(n) { if (n==1) document.body.style.backgroundcolor='red'"; if (n==2) document.body.style.backgroundcolor='yellow'"; if (n==3)

java - Android Development, Google Tutorial -

java - Android Development, Google Tutorial - i next google tutorial building first android application. got point needed implement actionbar actions functions opensearch() , opensettings(). i implemented of in mainactivity.java file. my question this: in illustration app can type message , send , displays in sec activity. in sec activity, top action bar changes , not display search icon or perform action when settings button clicked. in order have these icons displayed in action bar activity well, need add together methods , update onoptionsitemselected method in displaymessageactivity.java in mainactivity.java? way carry action bar icons/actions over? retype same methods in each activity want them in? or there improve way it? my other related curiosity this. method opensettings() called when click 3 vertical dots , settings. these 3 vertical dots show on every activity, , settings in list. clicking settings doesn't perform phone call opensettings() wh

jquery - posting a single dimenstion array to db ajax post -

jquery - posting a single dimenstion array to db ajax post - i have form, loads details using jquery load function here form <form id="form1" name="form1" method="post" action=""> <div id="tablebg"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="list"> <thead> <tr> <th width="39%" scope="col">white list</th> <th width="61%" scope="col">&nbsp;</th> </tr> </thead> </table> <div style="max-height:400px; overflow-y:auto"> <table width="100%" border="0" cellspacing="0" cellpadding="0" id="list"> <tr class="sub_head"> <td scope="col"><strong>reg. no.</strong></td> <td scope="co

sql - How to make a new column based on values in new and old table in Oracle -

sql - How to make a new column based on values in new and old table in Oracle - given below construction of data name country s republic of india d ind c afric r africa f ind v republic of india there many mistakes in country column. below table containing identified mistakes old value new value source column ind republic of india avox country afric africa avox country i need next table contains right value of country name country new_column s republic of india republic of india d ind republic of india c afric africa r africa africa f ind republic of india v republic of india republic of india given below command using. snapsshot of data. info big merge l03_a_avox_data_test n using ( select old_value , new_value transformation_data_all column_identifier='country' , source_identifier='avox' ) o on (n.country =

jquery - Slicknav: how to close menu when clicking outside -

jquery - Slicknav: how to close menu when clicking outside - i using slicknav jquery plugin, seems auto-closing menu on blur or lost focus not set default , there no setting it. i thought simple phone call this: <script> $(document).ready(function() { //close menu on lost focus $('.js .slicknav_menu').focusout(function(event){ $(this).slicknav('close'); }); }); </script> but doesn't anything. how close menu when clicking outside of menu? i referred site mentioned in question. tried first illustration given in site. (html code of given below) html - <ul id="menu"> <li><a class="scroll" href="#features">features</a></li> <li><a class="scroll" href="#usage">usage instructions</a></li> <li><a class="scroll" href="#examples">examples</a></li> <

c++ - read access from multiple threads -

c++ - read access from multiple threads - read access (without using mutexes or atomics) multiple threads safe when there no write access @ same time. const variables can read multiple threads: const int x = 10; can safe read variable without const qualifier multiple threads when i'm sure there not write access ? know not practise wonder if safe. pointers ? when need using pointer read-only access multiple threads should declared way, right ? : const int * const p = &x; of course of study can read non-const variable multiple threads long sure there no write operation ongoing. const int * const p = &x; the above statement means preventing both value , pointer beingness modified. if want protect value itself, can use const int * p = &x; c++ multithreading

c# - Why Dictionary.Item() throws exception on a key not found while IDictionary.Item() should not? -

c# - Why Dictionary<TKey, TValue>.Item() throws exception on a key not found while IDictionary.Item() should not? - that's seems unusual me dictionary.item() method throws keynotfoundexception while idictionary.item() not. , dictionary implements interface. why there such implemenation image breaks interface convention? (also symbol type construction image thought behind dictionary seems have convention method should not throw exception.) idictionary not generic, illustration hashtable implements it. hashtable 's key , it's value objects, hence can (and indeed does) homecoming null if key not found. idictioanary<tkey, tvalue> 's value can value type, hence has no "error"-value null can returned instead. c# dictionary symbol-table

sip - How to fix Unknown RTP codec 126 received on aterisk? -

sip - How to fix Unknown RTP codec 126 received on aterisk? - hello asterisk guys out there, im having problem lately on our server. before fine have error of res_rtp_asterisk.c:4100 ast_rtp_read: unknown rtp codec 126 received 'x.x.x.x:55066' cant dial voicemail " sip.conf------------------------ [johndoe] type=friend secret=jonddoe directmedia=no disallow=all nat=force_rport allow=gsm allow=ulaw allow=alaw allow=g722 allow=g726 allow=h261 allow=h263 allow=h263p allow=h264 mailbox=1234@default extensions.conf-------------------- exten => 1000,1,dial(sip/johndoe,30) exten => 1000,2,voicemail(1234@default) exten => 1000,3,playback(vm-goodbye) exten => 1000,4,hangup() exten => *1,1,voicemailmain(1234@default) voicemail.conf------------------------ 1234 => 1234, johndoe, john@doe.com " hope guys can give insights , help me on this, thanks in advance! this warning, meaning sip client

Grails 2.3.8 Stacktrace doesn't show any of my calling code -

Grails 2.3.8 Stacktrace doesn't show any of my calling code - i have method in controller beingness called somewhere. far can tell, nil in code calling it, added stack trace output line see if can tell it's getting called from. this, here method looks like: def remediationsearch() { println " "; println ">>>>>> remediationsearch() start @ " + system.nanotime() new exception("why calling me?!?!").printstacktrace() def resultlist if (params.rerender) { println "<><><> remediationsearch() called rerender." resultlist = recordsearchservice.individualsearch(session.oldindremedparams) } else { params.selectedbatch = selectedbatch session.oldindremedparams = params resultlist = recordsearchservice.individualsearch(params) println "<><><> remediationsearch() ca

javascript - Change the date to UNIX timestamp in all stock quotes for highstock -

javascript - Change the date to UNIX timestamp in all stock quotes for highstock - i want create graph of stock quotes (downloaded yahoo finance csv , changed json array), date in standard format(mm/dd/yyyy) highstocks works in unix timestamp (i guess). please give me whole code on how alter time's format. know date.parse() don't know how apply whole data. please help me code please $(function() { $.getjson('http://www.highcharts.com/samples/data/jsonp.php?a=e&filename=aapl-ohlc.json&callback=?', function(data) { // create chart $('#container').highcharts('stockchart', { rangeselector: { inputenabled: $('#container').width() > 480, selected: 1 }, title: { text: 'aapl stock price' }, series: [{ type: 'candlestick', name: 'aapl stock price',

Preserve git notes when rewriting history with git filter branch -

Preserve git notes when rewriting history with git filter branch - for reasons, have rewrite entire history of git repository alter committer_id of every commit. however, attached note more or less every commit , using git-filter-branch alter committer_id logically create new commits, leaving notes behind. there way re-create notes matching new commit? this thread seems inquire similar questions left no solution in 2011. thank help! git git-filter-branch git-notes

python - how to add new record to pandas dataframe -

python - how to add new record to pandas dataframe - i add together new records new indices pandas dataframe example: df = pandas.dataframe(columns = ['col1', 'col2']) now have new record, index label 'test1', , values [20, 30] (pseudo code): df.append(index='test1', [20, 30]) so result be col1 col2 test1 20 30 the furthest i've reached was: df = df.append({'col1':20, 'col2':30}, ignore_index=true) but solution not includes new index thanks! you can utilize .ix: in [1]: df = pd.dataframe(columns = ['col1', 'col2']) in [2]: df.ix['test1'] = [20, 30] in [3]: df out[3]: col1 col2 test1 20 30 [1 rows x 2 columns] python pandas

scala - Stack overflow. Function fails to stop at base case -

scala - Stack overflow. Function fails to stop at base case - i have class called rational: class rational(x:int,y:int){ def numer=x def denom=y def add(r: rational) = new rational(numer* r.denom+ r.numer* denom, denom* r.denom) override def tostring= numer+ "/"+ denom def neg = new rational(-numer, denom) def -(that: rational) = add(that.neg) def < (that:rational)=numer * that.denom < that.numer * denom def max(that:rational)= if (this < (that)) else def / (r: rational) = new rational(numer * r.denom, denom * r.numer) def numermin = new rational(numer -1, denom) def denommin = new rational(numer, denom-1) } i've written function, subfunction of bigger one. i'm debugging it. assume b rational 3/4 , pass rational 2/4 iter. def iter(c:rational): rational={ if (c.denom==0) new rational(0,0) else if(!(c < b)) denomdec(c) else c add together iter(denomdec(c)) } and here's denomdec: def denomdec(r: rational) = new rati

Rails configure Timezone from YML file -

Rails configure Timezone from YML file - i have rails 3.2.x app default timezone set in application.rb config.time_zone = 'central time (us & canada)' i spinning new servers in other timezones , need figure out how read timezone configuration company.yml file set company attributes while still using same github repo ease of management. for each server have next file in config/initializers/company.rb default_company = { company_name: "changeme", company_phone: "000-000-0000", company_email: "default_email@example.net", logo_path: "public/logo_changeme.png", no_reply_email: "noreply@example.com" } file_name = rails.root.join('config', 'company.yml') company = default_company.merge(yaml.load_file(file_name)) then have company.yml file contains specific settings each server instance phone call through app: :company_name: 'john's company' :company_phone: '

postgresql - Bad performance on EXISTS-clauses in functions -

postgresql - Bad performance on EXISTS-clauses in functions - i have next function i'd utilize in sql query (postgres 9.3): select * test_table tt has_access(tt.id, tt.login) create or replace function has_access(integer, integer) returns boolean $body$ select exists (select true test_read_access id = $1 , login = $2 ) , not exists (select true test_no_read_access id = $1 , login = $2 ) $body$ this works fine long have concern functional correctness. because query analyzer tells me, function has evaluated every row , hence exists-clauses cannot optimized expected. indeed query slow compared next query (inlining exists-clauses without select-clause): select * test_table tt exists (select true test_read_access id = tt.id , login = tt.login ) , not exists (select true test_no_read_access id = tt.id , login = tt.login ) the intention of function has_ac

c# - Insert empty value from datagridview -

c# - Insert empty value from datagridview - i trying insert empty value datagridview when cell left empty. i'm doing: using (var context = new employeeentities()) { employee emp= new employee (); foreach (datagridviewrow row in dgvloadtable.rows) { if (row.cells[0].value != null) { emp.emp_id = int.parse(row.cells[0].value.tostring()); emp.department = row.cells[2].value dbnull ? string.empty : row.cells[2].value.tostring(); //also tried: emp.department = row.cells[2].value dbnull ? dbnull.value.tostring() : row.cells[2].value.tostring(); context.employee.addobject(emp); context.savechanges(); } } } but it's not working, when seek insert null value throws "object reference not set instance of object" exception. doing wrong here? c# entity-framework datagridview

css3 - Skew background image without distortion? -

css3 - Skew background image without distortion? - i need skew shape of div contains background image, without distorting background image. right i'm using transform: skew(-25deg) is possible without distortion? you need add together background image on kid of skewed element , apply opposite skew child. here's example: class="snippet-code-css lang-css prettyprint-override"> .parent { height: 100px; overflow: hidden; transform: skew(0.5rad, 0); width: 100px; } .child { background: linear-gradient(to right, reddish 0%, bluish 100%); height: 100%; transform: skew(-0.5rad, 0); width: 100%; } class="snippet-code-html lang-html prettyprint-override"> <div class="parent"> <div class="child"> etc. </div> </div> css3

android - what does this error means? -

android - what does this error means? - i got lots of crashes on lots of devices on device(lg p920) works fine. below study goggle play app crashed , got 6 reports. way utilize sql pre created database.and created android_metadata table , locale en_us inserted database. this stack traces: android.database.sqlite.sqlitediskioexception: disk i/o error @ android.database.sqlite.sqlitedatabase.native_setlocale(native method) @ android.database.sqlite.sqlitedatabase.setlocale(sqlitedatabase.java:2074) @ android.database.sqlite.sqlitedatabase.opendatabase(sqlitedatabase.java:1014) @ android.database.sqlite.sqlitedatabase.opendatabase(sqlitedatabase.java:986) @ android.database.sqlite.sqlitedatabase.opendatabase(sqlitedatabase.java:962) @ offline.sinhaladic.com.mainactivity.sugen(mainactivity.java:1312) @ offline.sinhaladic.com.mainactivity$7.aftertextchanged(mainactivity.java:972) @ android.widget.textview.sendaftertextchanged(textview.java:7665) @ android.widget.textview

javascript - C3 bar chart unknown number of bars -

javascript - C3 bar chart unknown number of bars - i using c3.js create bar chart. my case such: i want collect x number of info , display them in chart have created next script: $.ajax({ type: 'post', url: '/academystat/academy_module_user_report', datatype: 'json', data: { request: 'ajax', team_id: team_id, module_id: module_id }, success: function (data) { if(data != null) { (var = 0; < data.length; i++) { var add_data = [data[i]['name'], data[i]['score']] char_data.push(add_data); } var chart = c3.generate({ bindto: '#score_chart', data: { columns: [ char_data ], type: 'bar' } }); } } }); as ca

c# - Binding StringFormat in Windows Phone -

c# - Binding StringFormat in Windows Phone - i develop silverlight app windows phone 8. bind integer value in longlistselector illustration 123. , want create looks 000123 <phone:longlistselector itemssource="{binding allvalues}"> <phone:longlistselector.itemtemplate> <datatemplate> <stackpanel> <textblock x:name="valueblock" text="{binding valuevalue}" horizontalalignment="left" verticalalignment="center" style="{staticresource phonetextlargestyle}"/> ... i know stringformat can this, problem number of leading zeros different , want bind viewmodel. ... text="{binding valuevalue}, stringformat=\{0:d6\}" ... how can bind number after d in stringformat? you can't bind stringformat part of binding expression. can instead add together property view model "val

c# - Can't send complex types to WCF Service? -

c# - Can't send complex types to WCF Service? - i have working c# web service running on iis on dedicated server. there method gets session object( datacontract ) , tested , working on windows clients. i'm developing "xamarin.mac" application , need connect server , i'm facing specific error. [datacontract] public class session{ [datamember] public string email { get; set; } [datamember] public string password { get; set; } [datamember] public string computerhash { get; set; } [datamember] public string ip { get; set; } } this session class i'm trying send. [operationcontract] bool login ( session session ); and method i'm calling. but when i'm debugging, checked session object filled , values set. server gets session object fields of object set null. gives me null exception. interestingly non-complex objects beingness sent without problem, these complex types giving me headaches. what might

c - mmap vs fgetc to avoid cache misses -

c - mmap vs fgetc to avoid cache misses - i have programme read file fgetc() , 1 question asked "does using mmap() , unmap() can cut down amount of cache misses?" to test wrote dirty piece of code given argument on command line, utilize mmap , address returned mmap or fgetc read file character character , used valgrind --tool=cachegrind on programme measure number of cache misses , mmap not cut down number of cache misses increment it i have searched net day find useful resources help me understand why this. while can see loading our file memory because loaded in contiguous memory zone , read first character last, why increment cache misses?. i looking particular resources or explanation might help me understand what's going on. thanks in advance. there several caches. guess talking kernel file scheme cache (or page cache), not cpu cache. you utilize madvise(2) syscall give hints (after mmap , or pass map_populate mmap(2)) memory mapping,

Get the Linux distribution name in PHP -

Get the Linux distribution name in PHP - is there way in php figure out linux distribution name of remote server? extracting $_server['http_user_agent'] os name of client's machine. not want. tried php_uname() echo 'operating system: '.php_uname('s').'<br>'; // echo php_os; echo 'release name: '.php_uname('r').'<br>'; echo 'version: '.php_uname('v').'<br>'; echo 'machine type: '.php_uname('m').'<br>'; but mode s returns kernel type - linux. operating system: linux release name: 2.6.32-431.29.2.el6.x86_64 version: #1 smp tue sep 9 21:36:05 utc 2014 machine type: x86_64 i want know fedora, centos or ubuntu, etc. possible? have tried posix_uname(), got error. fatal error: phone call undefined function posix_uname() try php system($call) phone call http://php.net/manual/en/function.system.php there can whatever want find ou

php - Exporting Magento Orders - Getting Discount Amount -

php - Exporting Magento Orders - Getting Discount Amount - i have custom php code shown below exports orders in magento. need code able total discount of order amount of items in order. can please help me this? // ! ----- new orders ----- $myorder=mage::getmodel('sales/order'); $orders=mage::getmodel('sales/mysql4_order_collection'); //optional filters might want utilize - more available operations in method _getconditionsql in varien_data_collection_db. $orders->addfieldtofilter('total_paid',array('gt'=>0)); //amount paid larger 0 $orders->addfieldtofilter('status',array('eq'=>"processing")); //status "processing" $allids=$orders->getallids(); foreach($allids $thisid) { $myorder->reset()->load($thisid); //getting order fields echo "'" . $myorder->getbillingaddress()->getlastname() . "',"; echo "'" . $myorder->gettotal_pai

XAMPP Tomcat - GET request doesnt work, HTTP 404 -

XAMPP Tomcat - GET request doesnt work, HTTP 404 - i've got xampp 1.8.3 tomcat 7. my app starts fine, when sending get-request server, request doesnt work, grab httpresponseexception. that's tomcat saying - localhost_access_log: [12/nov/2014:14:14:49 +0900] "get /myapp/chat?name=alex http/1.1" 404 1009 how can solve it? previously i've tested app on tomcat in eclipse. work's fine. same app, tomcat configurations know same. tomcat xampp

Extra content at the end of document - XML PArsing Error -

Extra content at the end of document - XML PArsing Error - i wrote bit of xml first try, somehow gives error. have read other post on topic tell have 1 root parent; in case catalog. , gave attributes single name without white spaces. idea's problem be? any help appreciated. <?xml version="1.0"?> <catalog> <enginepart1> <petroltype>diesel</petroltype> <generalinfo> <carbrand>alfa romeo</carbrand> <noofcyl>4</noofcyl> <boredia>69.6mm</boredia> <capacity>1,248cc</capacity> </generalinfo> <image> <file type="png">capture.png3.png</file> </image> <linerkit> <referenceno /> </linerkit> <pistonrings> &l

oracle11g - What is CHR code for single quote ' in oracle? -

oracle11g - What is CHR code for single quote ' in oracle? - what chr code single quote ( ' ) in oracle? generating update statements atm tables without pks, , regex replacing special characters. select 'update question set questiontypeid = '||questiontypeid||', questiontext = '''||questiontext||''', questiondescription = '''||questiondescription||''', productid = '||productid||', mandatory = '||case when mandatory null 'null' else to_char(mandatory) end ||', displayorder = '||displayorder||', minvalue = '||case when minvalue null 'null' else to_char(minvalue) end||', maxvalue = '||case when maxvalue null 'null' else to_char(maxvalue) end||', parentid = '||case when parentid null 'null' else to_char(parentid) end||', questioncategoryid = '||questioncategoryid||', isasset = '||case when isasset null 'null' else to

html - How to hover a whole element to show details -

html - How to hover a whole element to show details - i'm creating 'portfolio' section has 2 thumbnails, first 1 @ top of block , sec @ bottom. this want: http://i.imgur.com/prenipv.png jsfiddle there problem hovering on image placed @ bottom, has margin-top: 200px when hover removed margin-top:0; not want, create hover effect whole element, if hove either image on top or image on bottom, hover effect activates. if guys give me improve construction valids arguments can alter mine :) i leave html , css below guys can help me figure out how solve this. html: <div class="col-lg-3"> <div class="portfolio-item"> <a class="portfolio-image" href="#"> <div class="portfolio-image-one"> <img src="../img/portfolioweb/1.jpg" alt="thumbnail" />

c# - Use Converter for static text In Windows Phone 8 -

c# - Use Converter for static text In Windows Phone 8 - i want give text binding parameter here code .. want utilize converter alter text language <textblock text="{binding #mytext goes here#,converter={staticresource languageconverter}}" style="{staticresource tbinfo}" /> in above textblock want alter text using languageconverter update even can bind class property straight string or content public string header_text = {get;set;} <textblock text="{binding header_text,converter={staticresource languageconverter}}" style="{staticresource tbinfo}" /> i add together static resource entry: <usercontrol.resources> <sys:string x:key="headertext" xmlns:sys="clr-namespace:system;assembly=mscorlib">mytext goes here</sys:string> </usercontrol.resources> <textblock text="{binding source={staticresource headertext},converter={stat

sublimetext2 - Change Sublime Text 3 Sidebar Width -

sublimetext2 - Change Sublime Text 3 Sidebar Width - i wanted know if possible alter sidebar width in st3? project based, theme based, or in settings? did not see in default settings why brought question here. thank you. to resize sidebar, need click , drag: there no way set "default" size in user preferences, project, or current theme, unfortunately. sublimetext2 sublimetext3

Useful features for classifying color images -

Useful features for classifying color images - i asked question on signal processing so. reposting here didn't response there. i have 2 sets of images. in 1 set, background , foreground differs in color (either background dark , foreground lite or vice versa). useful features distinguishing between these types of images? i started histograms of colors (i concatenating r/g/b histograms 8 bins 24 dimensional feature vector), can improved? using other color spaces? edit i have added image example. greenish rectangle shows part colors not vary much. magenta rectangle shows part do. separate these 2 regions. doing calculating histograms of color channels on these regions , concatenating them. if looking regions colours vary, suggest averaging colours , subtracting each pixel avergae of pixels in vicinity. image homogeneous, difference between pixel , average of local area tend 0 - i.e. black. here have done gaussian blur 5 pixel radius , differenced relative o

javamail - create user accounts in apache james with java api -

javamail - create user accounts in apache james with java api - i need add together new users in apache james mail service server using java api, in whole net there not illustration of how utilize it. http://james.apache.org/server/2.3.1/adding_users.html java mail service api can send mail service apache james mailbox read messages, that. string user = "user"; // newly created user on james string password = "user"; // user password string fromaddress = "user@localhost"; // newlycreateduser@localhost string toaddress = "usver@gmail.com"; // create mail service session properties properties = new properties(); properties.put("mail.smtp.host", "localhost"); properties.put("mail.smtp.port", "25"); properties.put("mail.smtp.username", user); properties.put("mail.smtp.password", password); session session = session.getdefaultinstance(properties, null); seek {

webforms - ASP.NET 4.5 Web.config Error -

webforms - ASP.NET 4.5 Web.config Error - my web.config file structured follows: <?xml version="1.0" encoding="utf-8"?> <configuration> ... </configuration> the above works. when seek add together appsettings section follows: <?xml version="1.0" encoding="utf-8"?> <configuration> <appsettings> </appsettings> ... </configuration> i next error: http error 500.19 - internal server error requested page cannot accessed because related configuration info page invalid. error code 0x8007000d config error 1 element allowed. must first kid element of root element update if place <appsettings></appsettings> section after <configsections></configsections> section, works! what's happening? your error message "config error 1 element allowed. must first kid element of root element" referring <configsecti

c++ - Why won't QTabBar's tabBarDoubleClicked(int) handle double clicking the tab bar? -

c++ - Why won't QTabBar's tabBarDoubleClicked(int) handle double clicking the tab bar? - this driving me nuts. qtabbar's documentation says that: void qtabbar::tabbardoubleclicked(int index) [signal] this signal emitted when user double clicks on tab @ index. index refers tab clicked, or -1 if no tab under cursor. so, when double click tab bar, shouldn't returning -1 ? just clear, bit in reddish box trying double click, , think should returning -1 . returns tab index when double click tab, know working correctly. but shouldn't bit in reddish box still technically tab bar? or tab bar expand tabs added? if so, there way create expand fill window horizontally? i'm trying implement adding tab on double clicking tab bar; there way should going this? run code , add together bar. void mainwindow::on_tabwidget_tabbardoubleclicked(int index) { qdebug() << index << ui->tabwidget->tabbar()->geometry(); }

ios - Remove spaces in SHA256 output -

ios - Remove spaces in SHA256 output - can solve problem related sha256 in ios? #import <commoncrypto/commondigest.h> nsdata *datain = [@"xxxxx" datausingencoding:nsasciistringencoding]; nsmutabledata *macout = [nsmutabledata datawithlength:cc_sha256_digest_length]; cc_sha256(datain.bytes, datain.length, macout.mutablebytes); nslog(@"datain: %@", datain); nslog(@"macout: %@", macout); i getting output : 2014-10-14 10:46:43.602 sha256[480:70b] datain: <416e616e 64> 2014-10-14 10:46:43.604 sha256[480:70b] macout: <e9fb6a39 4db5ffd6 dba9b31a c7d9a90d 56f90767 afaf1e14 d6dcaa37 db180932> what need need remove space in macout. i.e this add below code: nsstring *macoutstring = [nsstring stringwithformat:@"%@", macout]; nsstring *encryptedstring = [macoutstring stringbyreplacingoccurrencesofstring:@" " withstring:@""]; nslog(@"macout: %@", encryptedstring); you can verify

android - Populating a ListView with parse.com -

android - Populating a ListView with parse.com - i'm building app display the values column "namemessage" table/class "messages" parse.com app called : "parsequeryadapter" on click of "display" button. nil happens when display button clicked, , app crashes when display button clicked 2nd time. i'm attaching logcat. please help. thanks import java.util.arraylist; import java.util.list; import android.app.activity; import android.content.context; import android.location.location; import android.location.locationlistener; import android.location.locationmanager; import android.os.bundle; import android.util.log; import android.view.view; import android.view.view.onclicklistener; import android.widget.arrayadapter; import android.widget.baseadapter; import android.widget.button; import android.widget.edittext; import android.widget.listview; import com.parse.findcallback; import com.parse.parse; import com.parse.parseexception; impor