Posts

Showing posts from May, 2015

angularjs - $scope variable has no content -

angularjs - $scope variable has no content - i had controller , function getdata shown. problem $scope.results outside loop has no content. while within sec http.get request, has content. appcontrollers.controller('myasellerorderctrl', ['$scope', '$rootscope', 'order', '$http', function($scope, $rootscope, order, $http) { $scope.results = []; $scope.getdata = function() { $http.get('api/orders/business/?user_id=' + $rootscope.user.user_id).success(function(data){ (var = 0; < data.length; i++) { $http.get('api/orders/seller/?business_id=' + data[i].business_id).success(function(data1){ // console.log(data1); $scope.results[i] = data1; }); } console.log($scope.results); }); }; $sc

Can I write software using Unreal Engine 4 without compiling Unreal Engine 4 from source? -

Can I write software using Unreal Engine 4 without compiling Unreal Engine 4 from source? - i watched video on youtube: introduction ue4 on github basically explaining how unreal engine 4 source code github , how build in vs2013. now understand need if people want create modifications engine itself, if want utilize engine , programme games it, need this? i'm building right (75 minutes , counting), because watched ue4 programming tutorial , noticed missing few things programmer in tutorial had (thought maybe because didn't compile engine). figured needed build engine because ue4 programming tutorial said "i assume have downloaded engine source github , compiled in vs2013", nobody says why, nobody states whether or not required create game in c++ using unreal engine 4. no dont need whole engine. there difference between code builds editor , code builds game. if want programme game should create new "code project" , modify code you're

path - File not found with subdomain and php's system() function -

path - File not found with subdomain and php's system() function - in php script want check file types, this: $info = explode('/',system("file -bi -- uploads/img/test.gif")); if ( $info[0]) echo 'ok'; this working fine, long url without subdomain, f.e domain.com, not working under en.domain.com. appears, file not found. on other hand, if in same script check existance of file: if ( file_exists("uploads/img/test.gif")) echo 'exists'; the file found, wheter current url domain.com or en.domain.com. why file not found, if system() function used? solved friends, figured out solution, after 3 working days. maybe can imagine how relieved am. the solution in php options activate mod_rewrite. allready activated in regular domain, not subdomains. guess have thought of earlier. though answers didnt lead me how solve this, still give thanks input, going in same directions trying solve myself past days. the shell command

.htaccess - apache 2.4 howto "Require not ip" per virtualhost? -

.htaccess - apache 2.4 howto "Require not ip" per virtualhost? - i know it's not efficient, have @ root htdocs (for "/") big .htaccess whith banned ip inside, this: <requireall> require not ip 1.163.1.5 require not ip 1.163.192.83 require not ip 1.163.193.136 ... (4000+ ips) </requireall> (it's scriptly updated upon analysis of access log files: scans 404 w00tw00t , script kiddies attempts, see mean). thought behind utilize of .htaccess dynamically updated , parsed when add together new ips :-) like many companies, have public virtualhost hear on http:80 multiple proxypass rules, multiple backend sites listening on localhost (or lan ips). the goal configure security stuff in reverse proxies, company does. hence, expected, every request backends have 127.0.0.1 (or local proxy ip) source ip. however noticed configuration not working expected: .htaccess evaluated backend sites only. not front end virtualhosts. excactly reverse

monodroid - Custom Visibility Converter - Android - Release (MvvmCross) -

monodroid - Custom Visibility Converter - Android - Release (MvvmCross) - i've developed application android using mvvmcross. there part of in should show either imageview or mvximageview. when test in debug mode works fine, when alter release mode visibility converter seem stop working. other converters work way should, converters stop working. a resume xml: <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="vertical"> <imageview android:layout_width="120dp" android:layout_height="120dp" android:scaletype="fitcenter" local:mvxbind="visibility myobject, converter=byteinversevisibility; assetimagepath myobject, converter=attachmenttypetosource" /> <mvx.mvximageview android:layout_width="wrap_content" android:layout_he

sqlite - Best way to store 100,000+ CSV text files on server? -

sqlite - Best way to store 100,000+ CSV text files on server? - we have application need store thousands of little csv files. 100,000+ , growing annually same amount. each file contains around 20-80kb of vehicle tracking data. each info set (or file) represents single vehicle journey. we storing info in sql server, size of database getting little unwieldy , ever need access journey info 1 file @ time (so need query in mass or otherwise store in relational database not needed). performance of database degrading add together more tracks, due time taken rebuild or update indexes when inserting or deleting data. there 3 options considering: we utilize filestream feature of sql externalise info files, i've not used feature before. filestream still result in 1 physical file per database object (blob)? alternatively, store files individually on disk. there end beingness half 1000000 of them after 3+ years. ntfs file scheme cope ok amount? if lots of files pr

phoenix framework - What is Elixir Plug? -

phoenix framework - What is Elixir Plug? - as newcomer both elixir , web domain in general (no web framework experience) know, plug? understand cowboy web server (albeit in erlang, not elixir) , phoenix framework building web apps, plug come in? abstraction layer between 2 or perhaps plug-in scheme in same abstraction layer phoenix? is abstraction layer between two yes, exactly! plug meant generic adapter different web servers. back upwards cowboy there work back upwards others. plug defines how different components should plugged together. similar rack in ruby, wsgi in python, ring in clojure, , on. elixir phoenix-framework

c# - Create Script Component as Source Programmatically -

c# - Create Script Component as Source Programmatically - i working on programmatically creating bundle info flow task containing script component source. have been able create package, info flow task, , add together script component. however, script component appears default transform. does know how souce? here class single method i'm working on: using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using dynamicpackagecreator.models; using microsoft.sqlserver.dts.runtime; using system.io; using microsoft.sqlserver.dts.pipeline.wrapper; // alias prevent ambiguity using dtscolumndatatype = microsoft.sqlserver.dts.runtime.wrapper.datatype; namespace dynamicpackagecreator { public class dtsclient { public void createpackagewithdataflowandscriptsource(string filepath, string dataflowname, string sourcename, list<outputdefinition> outputdefinitions) { // create

oracle - ORA-01795 - why is the maximum number of expressions limited to 1000 -

oracle - ORA-01795 - why is the maximum number of expressions limited to 1000 - so total of work-arounds, i'm wondering historical reasons behind 1000 limit "maximum number of expressions" in in clause? it might because, there potential of beingness abused tons of values. , every value in transformed equivalent or condition. for illustration name in ('john', 'charles'.. ) transformed name = 'john' or name = 'charles' so, might impact performance.. but note oracle still supports select id emp name in (select name attendees) in case, optimzer doesnt convert multiple or conditions, create join instead.. oracle

html - Caesar cipher in JavaScript returning unexpected results -

html - Caesar cipher in JavaScript returning unexpected results - i creating webpage calculate simple caesar cipher without using jquery. cannot locate error , not sure of how homecoming new string text area. html: <input type="button" value="encrypt value = 1" onclick ="caesarencipher(shift, text)"/> javascript: function caesarencipher(shift, plaintext) { this.shift = shift; this.plaintext = plaintext; var ciphertext (var = 0; < plaintext.length; i++) { // ascii value - numerical representation // 65 = 'a' 90 = 'z' var encode = plaintext.charcodeat(i); if (encode >= 65 && encode <= 90) // uppercase ciphertext += string.fromcharcode((encode - 65 + shift) % 26 + 65); // 97 = 'a' 122 = 'z' else if (encode >= 97 && encode <= 122) // lowercase ciphertext += string.fromcharcode((encode - 97 + shift) % 26 + 97); e

java - MissingSessionUser Exeption in Sockjs with Spring -

java - MissingSessionUser Exeption in Sockjs with Spring - i trying create chat application websocket. able send message of connected client, , trying send message single user. script: var socket = new sockjs("server endpoint"); subscribe stompclient.subscribe('/topic/chat', rendermessage); connection stompclient.connect("guest", "guest", connectcallback, errorcallback); where send stompclient.send("/app/addmessage", {}, jsonstr); and in spring config <websocket:message-broker application-destination-prefix="/app"> <websocket:stomp-endpoint path="/ws"> <websocket:sockjs /> </websocket:stomp-endpoint> <websocket:simple-broker prefix="/topic" /> <websocket:client-inbound-channel> <websocket:interceptors> <bean class="com.websocket.interceptor.connec

C++ std::array don't work on my local compiler -

C++ std::array don't work on my local compiler - i follow illustration array::size, it's don't work on dev c++ ide, , don't know why. i tried run on code blocks it's still same. think code right how prepare problem here code #include <iostream> #include <array> using namespace std; void usearray() { array<int,4> myints; myints[0]=1; cout<<"size of array: "<<myints.size(); } int main() { usearray(); system("pause"); } and compiler error: std::array c++11 only. dev-c++ not back upwards c++11. if you're looking options visual studio article right starting place: http://www.cplusplus.com/articles/36vu7k9e/ c++ arrays

How to implement push to client using Java EE 7 WebSockets? -

How to implement push to client using Java EE 7 WebSockets? - i've browsed lot of web socket examples, presentation slides , concentrated on rather simple scenarios in client-server communication initiated client. i interested in scenario, seems as practical: pure server force client. example have in mind application updates stocks value on website. imagine there external scheme stock exchange system, sending jms message every subscribed stock value change. i know how translate such incoming jms event server force , efficiently , idiomatically java ee 7 point of view. as far can understand spec, supposed write web socket endpoint @serverendpoint("/demo") public class wsendpoint { private static final logger log = logger.getlogger(wsendpoint.class); @onmessage public void onmessage(string message, session session) { log.info("received : " + message + ", session:" + session.getid()); } @onopen public void open(sessio

python - How to change the date dynamically using a command in linux -

python - How to change the date dynamically using a command in linux - i writing python code alter date in linux scheme today-1 (dynamically). tried various combinations but, yet not able succeed. searched , found close proximity scenario in question . i able alter date if execute command static value say: date --set="$(date +'2013%m%d %h:%m')" however, don't want specify hardcoded value year i.e., 2013. instead want specify "%y-1" i.e., date --set="$(date +'%y-1%m%d %h:%m')" if run above command next error [root@ramesh ~]$ date --set="$(date +'%y-1%m%d %h:%m')" date: invalid date `14-11016 13:05' thanks answer. did not seek approach though, reason beingness has 1 time 1 time again dealt formatting issues when working arithmetic operations incase if want to. so, figured out much simpler , generalized approach fetch previous_year value command date --date='1 years

java - Pagination in Spring Data Rest for nested resources -

java - Pagination in Spring Data Rest for nested resources - when below url visited, paginations in response /api/userposts/ { "_links" : { "self" : { "href" : "/api/userposts{?page,size,sort}", "templated" : true }, "next" : { "href" : api/userposts?page=1&size=20{&sort}", "templated" : true } }, "_embedded" : { "userposts" : [ { ... however when visiting next url, there no pagination out of box spring info rest - /api/users/4/userposts { "_embedded" : { "userposts" : [ { both userrepository , userpostrepository jparepository pagination. result, sec url throwing gc overhead exceeded error since row count results returned huge. @repositoryrestresource(excerptprojection = userprojection.class) public interface userrepository extends baserepository<user, integer>, u

json - Knockoutjs Dropdown Pre Selection In Nested Arbitary Javascript Object Working Fine KO 2x versions Not working in KO 3x versions -

json - Knockoutjs Dropdown Pre Selection In Nested Arbitary Javascript Object Working Fine KO 2x versions Not working in KO 3x versions - so sample data. il loading form server in json format build below looking objec graph. array of "choice" objects each having id, name, stages & currentstageid properties. "stages" property in "choice" object array of "stage" object having id, name & value properties.the "choice" object go through no.of stages "first stage" "fourth stage" user can select "stage" give dropdown list , save it. "currentstageid" property stores "id" of stage object give in stage respective "choice" object in note: each selection can have different types of stages brevity kept simple possible i.e selection 1 current saved stage 4 var info = [ new choice({ id: 1, name: "one", stages: [ new stage({ id: 1,

php - It's better to use BIT or BOOLEAN fro YES/NOT values in MySQL? -

php - It's better to use BIT or BOOLEAN fro YES/NOT values in MySQL? - 1) in table have column set privileges of users. i want have flag 1/0 (yes/not,true/false , on..) privileges (for example: if user admin or mod...). i searched lot, i'm still confused differences boolean , bit in terms of resources requests dbms. better? i found lot of question of pasted years, i'd have fresh answer, in case it's changed/improved. 2) question... i tryied utilize both of these types , saw boolean, it's easy check if value true or false, haven't figured out how see value of variable bit. i'm database coloumn set values 1 or 0, echo of bit variable, nil shown. so, how can see value of bit (i need utilize 1 or 0). thank in advice! use tinyint(1) . it's what's commonly used boolean values. bear in mind though allows values beyond 1 , 0 sake of consistency i'd suggest using keywords true , false when inserting info in reflect 1 , 0

xpages - How to bind a component to the backend document instead of the bean when in Read mode? -

xpages - How to bind a component to the backend document instead of the bean when in Read mode? - if component bound bean value of actual field backend document not retrieved when in read mode. how bind component backend document instead of bean when in read mode? xpages

java - Why the list must be declare by final -

java - Why the list must be declare by final - tintarraylist list = new tintarraylist(); final tintarraylist templist = new tintarraylist(); list.add(10086); list.add(12345); list.add(1989); list.foreach(new tintprocedure() { @override public boolean execute(int i) { if (i > 10086) { templist.add(i); } homecoming true; } }); i utilize intellij, , prompts me declare templist final,why templist has declared final? it's because of way virtual machine works. first, understand this, need know internal stack , stack frames (inside virtual machine) local variables (both primitives , references) stored in method's stack frame , not accessible other methods. in case, local variable templist not accessible in method boolean execute(int i) because "belongs" enclosing method (it "lives" in local stack frame). but, create accessible declare variable final, way internally set "outside&qu

c++ - How to use RcppEigen -

c++ - How to use RcppEigen - i beginner of c++, , want add together new bundle "crtrcppeigen" in c++ code rcppeigen, while thing wrong happened when run .bat file. help appreciated. here c++ code function named "crtrcppeigen" want add together rcppeigen in file 'src': #include < rcpp.h > #include < rcppeigen.h > #include <eigen/dense> #include <iostream> #include <string> using eigen::matrixxd; using namespace std; using namespace rcpp; using namespace rcppeigen; using namespace eigen; rcppexport sexp matop(sexp xr, sexp yr, sexp kr) { matrixxd x = rcppeigen::as<matrixxd>(xr); matrixxd y = rcppeigen::as<matrixxd>(yr); string k = rcpp::as<string>(kr); int n=x.rows(); int p=x.cols(); int ny=y.cols(); matrixxd i(n,n); i.setidentity(n,n); double sse=(y.transpose()*(i-x*(x.transpose()*x).inverse()*x.transpose())*y).determinant(); if(criteria=="k1") homecoming (

ajax - JQuery $.ajaxSend() not working in Firefox(33.0) -

ajax - JQuery $.ajaxSend() not working in Firefox(33.0) - i have: .............. $(document) .ajaxsend(function () { alert('test'); //for testing in ff switch (flag_mask) { case 0: mask_find_way.hide(); mask_create_way.hide(); mask_load.show(); break; case 1: mask_load.hide(); mask_create_way.hide(); mask_find_way.show(); break; case 2: mask_find_way.hide(); mask_load.hide(); mask_create_way.show(); break; } }).ajaxstop(function () { mask_load.hide(); mask_find_way.hide(); mask_create_way.hide(); }); .............. i trying jquery 1.8.3, 1.11.1, 2.1.1 , $.ajaxsend() not working in ff(alert not working too)? working fine: function preload_mask() { $(document) .ajaxsend(function () { switch (flag_mask) { case

java - How to find numbers in an array that are greater than, less than, or equal to a value? -

java - How to find numbers in an array that are greater than, less than, or equal to a value? - i trying output values less 5 , values greater average of values in array . can't figure out how create work out , output right numbers. can help? here's have, there don't know i'm doing wrong. { int[] numbers = {2, 4, 6, 8, 10, 12, 14, 16}; int sum = 0; (int x : numbers) sum += x; system.out.println("numbers in order:"); { for(int x = 0; x < numbers.length; ++x) system.out.println(numbers[x]); } system.out.println("numbers in reverse order:"); { for(int x = 0; x < numbers.length; ++x) system.out.println(numbers[x]); } system.out.println("the sum of 8 numbers is: " + sum); system.out.println("the lowest number is: " + numbers[0]); system.out.println("the highest number is: " + numbers[7]); system.out.println("the average of 8 numbers i

jquery mobile's popup widget doesn't play well with Chrome -

jquery mobile's popup widget doesn't play well with Chrome - unfortunately, can't reproduce issue in jsfiddle, test file reproduces issue: github file basically, have standard popup , close button within popup. can open popup. can close popup. can on , on 1 time again without problem. however, when bind "popupafterclose" event popup, reopens popup after receiving event. weird happens. on iphone 5s's chrome (v38.0.2125.67), after sec close, page goes beyond popup , previous page, if hitting "back" twice. this happens on phone's chrome. test page works fine on phone's safari. works fine on mac's chrome (v38.0.2125.104). i suspect may sort of bug prevention mechanism (like preventing many popups or infinite loops), wanted confirm. i'm hoping i'm doing wrong in code. if comment out "popupafterclose" event, you'll see can open/close popup 1 time again , 1 time again in every browser including mobile

How to connect to Sharepoint 2010 with Sharepoint Designer when server has multiple SP sites with host headers? -

How to connect to Sharepoint 2010 with Sharepoint Designer when server has multiple SP sites with host headers? - hi , sorry long title. i've had management of sharepoint 2010 farm environment tossed me , while things working 1 thing not. none of our users able connect of sites in farm sharepoint designer. dreaded "server not finish request" message followed eternally helpful ms error message "object moved. object moved here." i've dug around everywhere can think , closest explanation see may have our sp server hosting 5 sp applications, own host headers. things find seem suggest designer won't play sp servers featuring multiple host headers...but have think can't case. sharepoint encourages create utilize of host headers when setting applications. i've tried installing designer straight onto server itself: no dice. i've tried setting sites without host header: sites don't work (and wouldn't permanent prepare beca

c - Struct causing segmentation fault -

c - Struct causing segmentation fault - i having problem grappling error. implementing reddish black tree in c , running segmentation fault @ particular location (line 29) tnode *tree_add(tnode *root, const key k, const value v) { lnode *lnode = null; if (root == null) { tnode *node = talloc(k); lnode = lalloc(v); node->head = lnode; node->tail = lnode; node->is_red = true; homecoming node; } if (strcmp(k, root->key) < 0) { root->left = tree_add(root->left, k, v); } else if (strcmp(k, root->key) > 0) { root->right = tree_add(root->right, k, v); } else { if (strcmp(k, root->key) == 0) { lnode = lalloc(v); root->tail->next = lnode; root->tail = lnode;

internet explorer - How to use SvnProtocolHandler -

internet explorer - How to use SvnProtocolHandler - svnprotocolhandler (http://tortoisesvn.net/svnprotocolhandler.html) allows net explorer access subversion repositories using svn (svnserve) protocol. downloaded package, consists of half dozen dlls. however, can't figure out how these dlls intended used ie. suggestions, please? i'd seek contact author (stefan küng) if knew how. the bundle looks useful -- can't off launch pad. it appears if install 32-bit version of svnprotocolhandler, works without questions. if install 64-bit version, work 64-bit ie only. see explanation @ users@ tortoisesvn mailing list here: http://tortoisesvn.tigris.org/ds/viewmessage.do?dsforumid=4061&dsmessageid=3090669. internet-explorer svn tortoisesvn

ms access - VBA: Updating a Record Set Based on current data -

ms access - VBA: Updating a Record Set Based on current data - so i'm kind of new vba access , ran huge issue code. allow me explain, have form loads info current record , allows user edit it. i'm creating save button info has been changed updated in database. have check create sure info in textbox equal info in record set. problem if info null in database run if equal info in textbox though textbox has "updated group" in it. me bit of oversight , kinda of disappointing. question know workaround issue? thanks in advance info. here's answer: if rstrecset("groupname").value & "" <> txtgroupnameedit.value & "" -wayne here's code: dim searchgroup string dim db dao.database dim rstrecset dao.recordset dim rst dao.recordset set db = currentdb searchgroup = txtgroupnredit set rstrecset = db.openrecordset("select * tblgroupheader groupnum '*" & searchgroup & "*';

c# - WebBrowser control content width/height -

c# - WebBrowser control content width/height - i'm having difficulties trying programmitcally determine width , height of webbrowser based on contents of loaded page. need info capture screenshot of webpage. this occures within button click event wbny.navigate(new uri("http://www.website.com"), "_self"); wbny.documentcompleted += wbny_documentcompleted; this document completed code private void wbny_documentcompleted(object sender, webbrowserdocumentcompletedeventargs e) { if (e.url == wbny.url) { if (wbny.readystate == webbrowserreadystate.complete) { dopagechecks(); } } } within dopagechecks phone call method takescreenshot(wbny); this takescreenshot method protected void takescreenshot(webbrowser wb) { size pagesize = new size(wb.document.window.size.width,wb.document.window.size.height) } my screenshot code works fine, i'm showing point i'm trying height , width of w

java - NullPointerException in Avro ReflectDatumWriter -

java - NullPointerException in Avro ReflectDatumWriter - i have specific issue avro serialization of java objects. have pojo's generated xsd schemas trying serialize using avro place on kafka topic. of xmlelements optional a test message looks this: @xmlrootelement(name = "message") public class testmessage { @xmlelement public string id; @xmlelement public string name; public testmessage(string id, string name) { this.id = id; this.name = name; } public testmessage() { } @override public string tostring() { homecoming "message{" + "id='" + id + '\'' + ", name=" + name + '}'; } } and method serialize , place on topic is: public void sendmessage(testmessage msg) throws exception{ datumwriter<testmessage> author = new reflectdatumwriter<testmessage>(testmessage.class); bytearrayoutputstream os = new bytearrayoutputstream

perl - How do I modify a Boolean LDAP Active Directory attribute using Net::LDAP? -

perl - How do I modify a Boolean LDAP Active Directory attribute using Net::LDAP? - i can bind advertisement ldap, , modify , create objects. however, if want update or set attribute of type 'boolean', error: 00000057: ldaperr: dsid-0c090c3e, comment: error in attribute conversion operation, info 0, v1db1 here piece of perl code responsible: $rv = $ldap->add($dn, attr=> [ cn => [$u], objectclass => [ 'top','person', 'organizationalperson', 'contact' ], displayname => "$u mailing list", mail service => $email, name => $u, mailnickname => $local, proxyaddresses => [ "smtp:$email", "smtp:$local\@$serverdom", ], givenname => $u, targetaddress => "smtp:$email", internetencoding => 1310720, msexchaddressbookflags => 1, msexchmoderationflags => 6, msexchprovisioningflags => 0,

Spring Integration(JDBC - SFTP) : Read a record, send it to SFTP and delete that record -

Spring Integration(JDBC - SFTP) : Read a record, send it to SFTP and delete that record - i have next requirement implement each incoming message our system convert incoming to xml file , save in database read file info base of operations , send sftp delete entry 1 time file send sucessful. i have implemented step-1 : <int-jdbc:outbound-channel-adapter query="insert table_name(id, payload) values (:headers[filename], :payload)" channel="outputchannel" jdbc-operations="jdbctemplate"> <int:poller fixed-rate="1000" /> </int-jdbc:outbound-channel-adapter> while implementing step-2, if read entries together, payload in list spring-sftp doesn't back upwards it. if read each record , send sftp, performance problem. suggestion please? <int-jdbc:inbound-channel-adapter row-mapper="rowmapper" query="select * table_name" channel="sftpchannel" jdbc-operations="jdbc

ruby on rails - rspec not running before_save -

ruby on rails - rspec not running before_save - i have model before_save :autofill_country_code fill missing values. however, when run rspec test, doesn't seem run before_save. i pried test open , saving did not update attributes. how work around this? it "should autofill country code" empty_country_code = '' @store = factory.build(:store, :country_code => empty_country_code) expect{ @store.save }.to change{ @store.country_code }.from('').to(1) end the next autofill code: def autofill_country_code unless self.country_code.present? country = geocache.geocode(self.city).country_code country_code = isocountrycodes.find(country).calling self.country_code = country_code.tr('+', '') end end do have validation set country_code? hooks performed in order: before_validation after_validation before_save around_save before_create around_create after_create after_save so if model invalid

Is this an example of reference reassignment? C++11 -

Is this an example of reference reassignment? C++11 - as understand it, 1 cannot alter reference variable 1 time has been initialized. see, instance, this question. however, here minmal working illustration sort of reassign it. misunderstanding? why illustration print both 42 , 43? #include <iostream> class t { int x; public: t(int xx) : x(xx) {} friend std::ostream &operator<<(std::ostream &dst, t &t) { dst << t.x; homecoming dst; } }; int main() { auto t = t(42); auto q = t(43); auto &ref = t; std::cerr << ref << std::endl; ref = q; std::cerr << ref << std::endl; homecoming 0; } that not perform reference reassignment. instead, copy assigns object in variable q object referenced ref (which t in example). this justifies why got 42 output: default re-create assignment operator modified first object. c++11 reference

jquery - Items are overlapped in layout of category page in Joomla (due to container height attribute) -

jquery - Items are overlapped in layout of category page in Joomla (due to container height attribute) - i'm developing website using joomla 3.2.1, k2 , creativia template. i've done quite lot of customization , works fine. i've one, big problem. when select category have list of items, results in mess of overlapped images (meaning items displayed layout not work). if reload page (or open firebug check page properties), correctly place. you can check problem here: http://www.nicolamontera.it/newversion just open menu item architettura or grafica (it happens time time). edit: farther investigation found attribute height in container div changes quite randomly when loading page. if little value, messed up. seems related timing in evaluating value (which calculated dynamically). how can prepare that? use clearfix prepare problem having. please allow me know if works. so used class "group" , set div in html collapsing. if have container o

c# - Having selected items from listview, delete objects in list -

c# - Having selected items from listview, delete objects in list<> - this curiosity because couldn't find suited question. i made list<t> , used it's contents show them in listview. later tried deleting them listview , worked fine, whenever re-added item (through windows app) list<t> contents came up, means had remove items list<t> . i tried many index methods , nil seemed work. i'm trying find way connect selected items beingness "deleted" on listview actual content on list<> can remove it. can help out? it depends on relation between listview , list. what happening here listview display of list have. when delete stuff view, underlying list not updated. seek deleting straight list instead if you're using listviewitem can store item in .tag property , search in list when deleting c# windows-applications

Macro excel to replace cells -

Macro excel to replace cells - i've never done macro , i've create vb macro. macro must loop rows of sheet in other sheet if value of "b" cell found , if yes, i've replace value matched value in side column. as i've never done this, don't know how start. has done similar? this start. it should plenty going in right direction. excel excel-vba

JavaFX webview does not support filters? -

JavaFX webview does not support filters? - looking @ webview within javafx 8 (jre 1.8.0_25 precise), appear -webkit-filter broken. any effort apply -webkit-filter css rule html component causes underlying info disappear completely. you can see demonstration loading: http://html5-demos.appspot.com/static/css/filters/index.html webview. if set of filters on page, image disappears. is known bug? there known workaround? from testing, reply no, javafx 8 webview not back upwards -webkit-filter . the info shouldn't disappear if there -webkit property (the property should ignored , image rendered though property never existed), file bug study on in javafx issue tracker. i wouldn't term lack of back upwards draft w3c specification or -webkit css attributes bug. webview never officially back upwards -webkit properties, back upwards lot of non-draft w3c html/css specifications. if interested in discussing implementation of such features in more

Fail to connect to a remote SQL server with SQL Server 2008 Management Studio -

Fail to connect to a remote SQL server with SQL Server 2008 Management Studio - i'm trying connect remote database sql server 2008 management studio. got next error: a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name right , sql server configured allow remote connections. (provider: named pipes provider, error: 40 - not open connection sql server) (microsoft sql server, erreur : 53) i think have wrong config: can help me please ? steps find out reason is: does sql server allow remote connections? main settings sql server is tcp/ip enabled client connections , hear on right ip address / nic? does firewall on server allow incoming traffic sql server port (default 1433) it 1 of 3 points above. sql-server sql-server-2008 ssms

c# - Using a windows forms timer to trigger a method from in a different class -

c# - Using a windows forms timer to trigger a method from in a different class - apologies if there answers out there this, i've dug lot , found little. i'm trying implement watchdog scheme on c# .net 4.5 windows forms application. basically, have form various buttons, text displays, etc, connects external device. have timer on main form should check device changes every 250ms or so. i've lumped mainpage form code, including timer, 1 class, , code external device own class inherits mainpage. problem is, want able have timer's tick() function phone call method device class. here's simplified code: namespace myapplication { public partial class mainpage : form { public mainpage() { initializecomponent(); } public static void settextbox(string message) { textbox_status.text = message; } private void timer1_tick(object sender, eventargs e) { d

encryption - Decrypt Mega.co.nz file partially using aes 128 ctr for streaming range support -

encryption - Decrypt Mega.co.nz file partially using aes 128 ctr for streaming range support - how decrypt aes 128 ctr encrypted file middle http range support? here encrypted file: https://www.dropbox.com/s/8e9qembud6n3z7i/encrypted.txt?dl=0 the key base64 encrypted: e7vqwj3cv1jui5pklirtdq9srjt1dhiqygzpspiivp0 mega docs: https://mega.co.nz/#doc the iv calculated decrypting key gives array: array ( [0] => 330649690 [1] => 1037877074 [2] => 1418435172 [3] => 2519395597 [4] => 257049755 [5] => 1963858090 [6] => 1645006666 [7] => 2451723517 ) the iv obtained slicing array @ 4th offset length of 2 , lastly 2 elements of array filled 0: array ( [0] => 257049755 [1] => 1963858090 [2] => 0 [3] => 0 ) then key xor'd , made 128bit array converted string php function pack: $key = array($key[0] ^ $key[4], $key[1] ^ $key[5], $key[2] ^ $key[6], $key[3] ^ $key[7]); $key = base64_encod

java - Error in configuring object at org.apache.hadoop.util.ReflectionUtils.setJobConf -

java - Error in configuring object at org.apache.hadoop.util.ReflectionUtils.setJobConf - i went through many questions regarding error couldn't find solution solve problem. here implementing sentiment analysis on twitter info using hadoop. main class: public class sentimentanalysis extends configured implements tool{ private static file file; public static class map extends mapreducebase implements mapper<longwritable, text, text, intwritable> { private final static intwritable 1 = new intwritable(1); private text word = new text(); classify classify = new classify(); /** * mapper reads tweets text file store * <"positive",1> or <"negative",1> */ public void map(longwritable key, text value, outputcollector<text, intwritable> output, reporter reporter) throws ioexception { string line = value.tostring();//streaming each tweet text file if (line != null) {