Posts

Showing posts from February, 2015

javascript - Node.js Which part i did wrong? server.js is running, but i cant see the html page -

this have far, running in putty, var http = require('http'); var fs = require('fs'); const post =8080 http.createserver(function(request, response) { var url = request.url; switch(url) { case '/': console.log('1'); getstaticfilecontent(response,'templates/assignment1.html','text/html'); break; case'/new': console.log('2'); getstaticfilecontent(response,'templates/new.html','text/html'); break; default: response.writehead(404,{'content-type':'text/plain'}); response.end('404 - page not found.'); } }).listen(post) console.log('server running'); function getstaticfilecontent(response, filepath, contenttype) { fs.readfile(filepath, function(error, data) { if (error) { response.writehead(500,{'content-type': 'text/plain'}); response.e

In java, do I always need a Main class? -

i know i'll need main method, can main method in different class other main class? not java applications require main method. java can used create web applications, instance, don't require main methods run. the answer question depends on mean. mean class name 'main'? then, no, there no requirement @ all. the requirement java has, signature of method correct. main method must: be public be main be static have returntype void accept array of strings (only) parameter it's easier add in public class in file, not mandatory. name of class in, entirely you, though many choose name 'main' or 'open', more find it. if want able run application, simple double-clicking .jar file, you'll need point class contains main method (to use: application might contain lot of main classes, used internal testing, 1 can used start actual application) in manifest file: manifest files prior java 7, possible run desktop application without

hadoop - Is there maximum size of string data type in Hive? -

google ton haven't found anywhere. or mean hive can support arbitrary large string data type long cluster allowed? if so, can find largest size of string data type cluster can support? thanks in advance! the current documentation hive lists string valid datatype, distinct varchar , char see official apache doc here: https://cwiki.apache.org/confluence/display/hive/languagemanual+types#languagemanualtypes-strings it wasn't apparent me string indeed it's own type, if scroll down you'll see several cases it's used distinctly others. while perhaps not authoritative, page indicates max length of string 2gb. http://www.folkstalk.com/2011/11/data-types-in-hive.html

c# - How to send Object data inside a event and how to get it back? -

i'm trying drag , drop data row values data grid list. have 2 events in order that. how can pass 2 values? this grid event private void dgv_mapper1_cellmousedown(object sender, datagridviewcellmouseeventargs e) { //this works //dgv_mapper1.dodragdrop(dgv_mapper1.selectedrows[0].cells[0].value, dragdropeffects.copy); //this want, send 2 values dgv_mapper1.dodragdrop(new { first = dgv_mapper1.selectedrows[0].cells[0].value, last = dgv_mapper1.selectedrows[0].cells[1].value }, dragdropeffects.copy); } and list event problem don't understand how access object , 2 values. private void list_head1_dragdrop(object sender, drageventargs e) { //this works 1 object //list_head1.items.add(e.data.getdata(dataformats.text.tostring().trim())); }

getting all spreadsheet values in one call - google apps script -

i'm trying spreadsheet values sheets in 1 call, 3 dimensional array. think way i'm using: function threed_spreadsheet(){ var ss = spreadsheetapp.getactivespreadsheet(); var sheets = ss.getsheets(); var threed =[]; (var = 0; < sheets.length;i++){ threed.push(sheets[i].getdatarange().getvalues()); } logger.log(threed); } is not effcient enough: [16-01-26 23:11:38:336 pst] starting execution [16-01-26 23:11:38:341 pst] spreadsheetapp.getactivespreadsheet() [0 seconds] [16-01-26 23:11:38:362 pst] spreadsheet.getsheets() [0.02 seconds] [16-01-26 23:11:38:363 pst] spreadsheet.getsheets() [0 seconds] [16-01-26 23:11:38:410 pst] sheet.getdatarange() [0.046 seconds] [16-01-26 23:11:38:434 pst] range.getvalues() [0.023 seconds] [16-01-26 23:11:38:477 pst] sheet.getdatarange() [0.043 seconds] [16-01-26 23:11:38:501 pst] range.getvalues() [0.023 seconds] [16-01-26 23:11:38:503 pst] logger.log([[[[a, 1.0], [b, 2.0], [v, 5.0], [c, 5.0], [s, 3.0]], [[a, 3.0], [

giving the host url dynamically in mobilefirst adapter -

hello need pass host name or url adapter dynamically client side.i.e when user login needs type url set ${domainname} in adapter.xml file.help needed pls.thnks in advance <?xml version="1.0" encoding="utf-8" standalone="no"?> <wl:adapter xmlns:wl="http://www.ibm.com/mfp/integration" xmlns:http="http://www.ibm.com/mfp/integration/http" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" name="soapadapter1"> <displayname>soapadapter1</displayname> <description></description> <connectivity> <connectionpolicy xsi:type="http:httpconnectionpolicytype"> <protocol>http</protocol> <domain>${domain}</domain> <port>8001</port> <connectiontimeoutinmilliseconds>30000</connectiontimeoutinmilliseconds> <sockettimeoutinmilliseconds>30000<

Error Connecting to a JMS Topic Broker via SSL using Net::STOMP::Client module in Perl -

i trying connect tibco jms topic broker of net::stomp::client package in perl. i using ssl approach while creating new net::stomp::client object , passing attributes 'uri' & 'sockopts' takes topic uri & ssl certificate files authentication. when try run script throws error saying : - cannot ssl connect mmx-nprd1-06:7222: io::socket::inet6 configuration failed code give below :- use net::stomp; use net::stomp::client; use moose; use strict; use warnings; use findbin qw($bin); print "\n$bin\n"; $stomp; $stomp = net::stomp::client->new( uri => "stomp+ssl://mmx-nprd1-06:7222", sockopts => { # path of directory containing trusted certificates ssl_ca_path => "$bin/jmscertificate/", # client certificate present ssl_cert_file => "$bin/jmscertificate/aix_jms_cert.pem", # # client private key ssl_key_file => "$bin/j

angularjs - Javascript Object attribute with '-' doesn't work properly -

this question has answer here: how access object properties containing special characters? 1 answer i have json response in following format. { "_meta" : { "next-person-id" : "1001", "totalpersons" : "1000" } } i using angular's $http service retrieve , trying access next-person-id attribute in javascript following, $http.get(url).then( function(response){ console.log(response._meta.next-person-id); } ); but next-person-id in response undefined always. i'm able access totalpersons attribute. there problem getting attributes '-' character in javascript? use bracket notation: console.log(response._meta['next-person-id']); a possible alternative change keys use underscores, _meta.next_person_id

Add more ListView inside one page layout Android -

Image
i dont know add more listview inside 1 page layout (attach picture) i want each listview not scrolling. page layout scrolling only. me!! build same home layout app: https://play.google.com/store/apps/details?id=com.google.android.youtube answer had resolve problem step1: make new file java: public class expandableheightlistview extends listview { boolean expanded = false; public expandableheightlistview(context context) { super(context); } public expandableheightlistview(context context, attributeset attrs) { super(context, attrs); } public expandableheightlistview(context context, attributeset attrs,int defstyle) { super(context, attrs, defstyle); } public boolean isexpanded() { return expanded; } @override public void onmeasure(int widthmeasurespec, int heightmeasurespec) { // hack! take android! if (isexpanded()) { // calculate entire he

c# - Exception in array assignment : Cannot implicitly convert type 'int' to 'string' And two times: -

i need assign result array, i'm facing problem when i'm using code: string[] result = null; result = new string[10]; int num = 0; int id = convert.toint32(textreader.getattribute("id")); foreach (string attr in attrs) { // line fails \/ result[id] = num { textreader.getattribute(attr) }; // can't put there correctly int - num num++; } errors are: cannot implicitly convert type 'int' 'string' , 2 times: ; expected can tell me how properly? i'm new c# , can't resolve problem. have nice day. edit i want create multi dimensional array (php style) result[1] = array(0 => firstattr, 1 => secondattr , on...) reading update turns different question. unlike php, c# serious types, can't stuff things variables or array slots. have explicitly declare want multi-dimensional array. in c# arrays not flexible in php. in php, can use key. in c#, have use different type entirely (which php doing b

amazon web services - AWS: Price Calculation with AWS Price List API using java -

i want calculate total price each instance types. step1) @ first getting ec2 reservation data: describereservedinstancesrequest describereservedinstancesrequest= new describereservedinstancesrequest().withfilters(new linkedlist<filter>()); describereservedinstancesrequest.getfilters().add(new filter().withname("state").withvalues("active")); describereservedinstancesresult describereservedinstancesresult = ec2.describereservedinstances(describereservedinstancesrequest); describereservedinstancesresult.getreservedinstances() gives me reserve instance. for(reservedinstances reservedinstances : describereservedinstancesresult.getreservedinstances()){ ec2resdata ec2resdata = new ec2resdata(); ec2resdata.setavailabilityzone(reservedinstances.getavailabilityzone()); ec2resdata.setinstancecount(reservedinstances.getinstancecount()); ec2resdata.setinstancetenancy(reservedinstances

How do I release ports which are being held by a notebook server after it has been stopped? -

i'm starting jupyter notebook server on aws instance (redhat linux server) connect on https. in config file have should on port 9999. when stop , restart process ctrl-c, port not being released, shown below. [user@ip-xxx-xx-xx-xxx notebook]$ [i 08:39:27.901 notebookapp] port 9999 in use, trying random port. [i 08:39:27.901 notebookapp] port 10000 in use, trying random port. [i 08:39:27.902 notebookapp] port 10001 in use, trying random port. [i 08:39:27.905 notebookapp] serving notebooks local directory: /home/user/docs/notebook [i 08:39:27.905 notebookapp] 0 active kernels [i 08:39:27.905 notebookapp] jupyter notebook running at: https://[all ip addresses on system]:10002/ [i 08:39:27.905 notebookapp] use control-c stop server , shut down kernels (twice skip confirmation). as aside, "random ports" don't random me. sometimes stop command of service doesn't return error , deletes pid file of process, not terminate process itself. you can check if

jquery - Issue with code to check for empty input field -

i found tutorial create email form send emails there seems error within java script code can found below: $('#sendfeedback').on("click", function() { var url = 'api/send.php'; var error = 0; var $contactpage = $(this).closest('.ui-page'); var $contactform = $(this).closest('.contact-form'); $('.required', $contactform).each(function (i) { if ($(this).val() === '') { error++; } }); // each if (error > 0) { alert('please fill in mandatory fields. mandatory fields marked asterisk *.'); } else {//some code} the click works fine if fields populated error shows how can stop happening? note when remove part of code works. below html code: <div class="contact-thankyou" style="display: none;"> thank you. message has been sent. can. </div> <div class="contact-form"> <p class="mand

javascript - Get parameter of GET request -

i make request: createxhrrequest( "get", fileurl, function( err, response ) { if( err ) { alert( "error get!" ); } alert(response); }); and full response: { "status" : "ok", "message" : "jvberi0xljqkjdduxdgkmy how can jvberi0xlj ? i try response.message , response["message"]. nothing works. just simple access this: var json = json.parse(response); json.message

java - put listView child in a hashmap -

i'm trying fetch values listview loop , put them in hashmap. logcat keeps throwing error. can't figure out why. please! list view has @android:id/list , have extended listactivity on activity here code fetch values liststudent=getlistview(); studentmarkslist=new arraylist<hashmap<string,string>>(); string student,obtained_value,max_value; (int i=0;i<liststudent.getcount();i++) { view view=liststudent.getchildat(i); studentidtxt=(textview) view.findviewbyid(r.id.student_id_ls); obtainedtxt=(edittext) view.findviewbyid(r.id.obtained); maxtxt=(textview) view.findviewbyid(r.id.max); student=studentidtxt.gettext().tostring(); obtained_value=obtainedtxt.gettext().tostring(); max_value=maxtxt.gettext().tostring(); //updating new mark list array hashmap<string,string>studentmark=new hashmap<string,string>(); studentmark.put(tag_student_id,student); studentmark.put(tag_marks_obtained,obtained_value); studen

angularjs - Using custom mapbox tiles with angular-leaflet-directive -

good examples hard (better yet, impossible) find on how use angular-leaflet-directive mapbox, though mapbox says can fallback it. no support, no documentation. anyway, plugin works when loading basic mapbox tiles when comes custom tiles, mapbox:// scheme won't load. a plunker mad appreciated. thanks!

c# - Load more items into LonListSelector when scrolled to bottom in windows phone 8 -

i new in windows phone development , try load more items lonlistselector when scrolled bottom in windows phone 8. i use code scrollviewer throw null value exception. scrollviewer scrollviewer; private void mylist_loaded(object sender, routedeventargs e) { //get scrollviewer listbox scrollviewer = getscrollviewer(this.mylonglistselector); //attach custom binding check if scrollviewer verticaloffset property has changed var binding = new binding("verticaloffset") { source = scrollviewer }; var offsetchangelistener = dependencyproperty.registerattached( "listeneroffset", typeof(object), typeof(usercontrol), new propertymetadata(onscrollchanged)); scrollviewer.setbinding(offsetchangelistener, binding); } // method pull out scrollviewer public static scrollviewer getscrollviewer(dependencyobject depobj) { if (depobj scrollviewer) return depobj scrollviewer; (int = 0; < visualtreehelper.getchildr

html - Displaying bootstrap custom modal -

problem description i have 2 views. first 1 contains link, when clicked, should display second view custom modal. both files in same folder called school. code firstview.html <html> <head>click link</head> <body> <div> <a data-toggle="modal" href="secondview.html" data-target="#secondview" >additional details</a> </div> </body> </html> secondview.html <!-- modal --> <div id="secondview" class="modal hide fade" tabindex="-1" role="dialog" aria- labelledby="mymodallabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="mymodallabel">modal header</h3> </div> <div class="modal-body">

c# - Awesomium javascript error: SECURITY_ERR: DOM Exception 18 -

i executing javascript awesomium webcontrol function getimage(img) { var canvas = document.createelement(\"canvas\"); canvas.width = img.width; canvas.height = img.height; var ctx = canvas.getcontext(\"2d\"); ctx.drawimage(img, 0,0); try{ var imgdata=ctx.getimagedata(10,10,50,50); alert(imgdata); }catch(err){" + alert(err);" + } } now code giving alert : error: security_err: dom exception 18 now common code javascript. told me if can set right flag can turned off. code should this: webcore.initialize(new webconfig { additionaloptions = new[] { "--allow-file-access-from-files" } }); this "--allow-file-access-fr

php - How to check if a woocommerce product has any category assigned to it? -

i creating custom plugin related products fetched per tags assigned product. facing issue. when run loop gives me warning message. want check if particular product has category assigned it. how can check if category has been assigned woocommerce product. please me. in advance. my custom code while ( $loop->have_posts() ) : $loop->the_post(); global $product; global $post; $feat_image = wp_get_attachment_url( get_post_thumbnail_id($loop->post->id) ); $terms200 = get_the_terms( $loop->post->id, 'product_cat' ); // if(!empty($terms200) || $terms200!='' || $terms200!=null){ if (get_category($loop->post->id)->category_count != 0){ $content.='<li class="product-small grid1 grid-normal">'; $content.='<div class="inner-wrap">'; $content.='<a href="'.get_the_permalink($loop->post->id).'"

Do I need an api key to get last known location in Android with Google Play Services? -

i started learning android , working on small projects learn essentials need work on larger project have coming up. need users last know location. went through this tutorial, , wouldn't connect play services. need api key last known location? , easiest way implement location awareness in android? you need not give api key fetch last known location. api key needed when integrating google maps in android app. android location api using google play services

javascript - Mapping a list of items in an array to a function parameter -

i have angular controller , service. the controllers calls service, , passes data , endpoint. my service performs http request, trying refactor code pass in endpoint controller, , service tries match endpoint list of array. controller: app.controller('mycontroller', function($scope, myservice) { $scope.buttonclick = function(endpoint) { myservice.postaction(endpoint, $scope.postdata) .success(function (data, status, headers, config) { console.log("success"); }) .error(function (data, status, headers, config) { console.log("error"); }); } myservice: app.factory('myservice', function ($http) { var endpoints = [ 'cart/cartdetails', 'customer/addressinfo', 'payment/shippinginfo', ] return { postaction: function(endpoint, postdata) {

python - 'module' object has no attribute 'Dot' -

i'm beginner in python, , i'm trying draw graph using: `nx.write_dot(g, "%s.dot"%(image))` in defined function. when excute program, i'm getting error: file "sim.py", line 31, in main() file "sim.py", line 30, in main sol.run() file "c:\python27\my sim\solution.py", line 221, in run self.drawgraph(g, "solution1") file "c:\python27\my sim\solution.py", line 227, in drawgraph nx.write_dot(g, "%s.dot"%(image)) file "", line 2, in write_dot file "c:\python27\lib\site-packages\networkx\utils\decorators.py", line 220, in _open_file result = func(*new_args, **kwargs) file "c:\python27\lib\site-packages\networkx\drawing\nx_pydot.py", line 58, in write_dot p=to_pydot(g) file "c:\python27\lib\site-packages\networkx\drawing\nx_pydot.py", line 197, in to_pydot p = pydot.dot(graph_type=graph_type,strict=strict,**graph_defaults) attr

ios - Zebra imz320 zpl bluetooth printer "ZSDK_API_ERROR_DOMAIN" - code: 1 error -

i trying make extension on ios app zebra imz320 printer. followed developers guide of zebra. ı got error sdk. here code: - (ibaction)buttonpressed:(id)sender { nsstring *serialnumber = @""; //find zebra bluetooth accessory eaaccessorymanager *sam = [eaaccessorymanager sharedaccessorymanager]; nsarray * connectedaccessories = [sam connectedaccessories]; (eaaccessory *accessory in connectedaccessories) { if([accessory.protocolstrings indexofobject:@"com.zebra.rawport"] != nsnotfound){ serialnumber = accessory.serialnumber; break; //note: find first printer connected! if have multiple zebra printers connected, should display list user , have him select 1 wish use } } // instantiate connection zebra bluetooth accessory id<zebraprinterconnection, nsobject> theprinterconn = [[mfibtprinterconnection alloc] initwithserialnumber:serialnumber]; // open connection - physical connection established here. bool success = [theprinterc

mysql - I am having issues with parsing a variable from an SQL into another SQL statement with PHP -

<?php if(isset($_post['submitted'])){ //connecting database include('includes/connection.php'); // creating variables post selected input item database $meeting_type = explode('|', $_post['meeting_type']); $date_picker = $_post['date_picker']; //$query = "select * meeting_tb meeting_type = '$meeting_type[1]'"; $query = "select meeting_id, meeting_type, date meeting_tb date in (select max(date) mindate meeting_tb meeting_type = '$meeting_type[1]')"; $query_result = mysqli_query($db_con, $query) or die("error retrieving data"); $row_meeting = mysqli_fetch_array($query_result, mysqli_assoc) or die("not able retrieve information"); $query_item = "select join_tb.item_id, item_name, item_description join_tb inner join meeting_item_tb on join_tb.item_id = meeting_item_tb.item_id join_tb.meeting_id = '$row_meeting[meeting_id]'"; $result = mysqli_que

r - create a matrix from data frame -

i have data frame categorical values names dis del 0-2 0-2 2-4 0-2 6-8 6-8 b 8-10 8-10 c 10+ 10+ what want output in number of count per data 0-2 2-4 6-8 8-10 10+ 0-2 1 2-4 1 6-8 1 8-10 1 10+ 1 i want export data created out of data frame. from comments of @mtoto & @jogo: table(mydf[-1]) or: xtabs(data=mydf, ~ dis+del) both give: del dis 0-2 10+ 6-8 8-10 0-2 1 0 0 0 10+ 0 1 0 0 2-4 1 0 0 0 6-8 0 0 1 0 8-10 0 0 0 1 if want levels in correct order ( 10+ last one): mydf$dis <- factor(mydf$dis, levels = c("0-2","2-4","6-8","8-10","10+")) mydf$del <- factor(mydf$del, levels = c("0-2","6-8","8-10","10+"

sockets - select blocks forever in helloworld type program -

#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <netdb.h> #include <netinet/in.h> #include <string.h> int main(int argc, char *argv[]) { int sock, portno, n; struct sockaddr_in serv_addr; struct hostent *server; const char* host = "www.google.com"; portno = 80; sock = socket(af_inet, sock_stream, 0); if (sock < 0) { perror("error opening socket"); exit(1); } server = gethostbyname(host); if (server == null) { fprintf(stderr,"error, no such host\n"); exit(0); } bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = af_inet; bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_port = htons(portno); if (connect(sock, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) { perror("error connecting")

output - How do I display a row of random numbers in C# instead of a column? -

here program: using system; using system.collections.generic; using system.linq; using system.text; namespace consoleapplicationlotto { class program { const int limit = 7; static void main(string[] args) { int[] lotto = new int[limit]; int lotdigits; random rnd = new random(); foreach (int sub in lotto) { lotdigits = rnd.next(0, 8); console.writeline(lotdigits); } } } } i want display 7 random digits in row forming 7 digit "lotto number", "5902228" instead of: 5 9 0 2 2 2 8 i tried using "0:d7" , gives me bunch of zeroes last few digits being other numbers. use console.write instead of console.writeline

php - Using "terms" and "range" filters together in Elasticsearch -

i searched everywhere, none of answers met requirements. code goes this: file 1 <?php if($year != 0) { $temp = strval($year); $term =[ "range" => [ "decidedon" => [ "gte" => $temp."-01-01", "lte" => $temp."-12-31" ] ] ]; array_push($params['body']['query']['filtered']['filter']['bool']['must'], $term); } file 2 <?php $dummy = explode(" ",$cor); $params['body']['query']['filtered']['filter']['bool']['must'] = ['terms'=> ['court' => $dummy] ]; i include them in index page @ different instances, follows if(isset($_get['cor'])){ $cor = $_get['cor']; if(strcasecmp($cor,"all")!=0){ include 'courtfilter.php'; } } if(isset($_

concat - is there a bug in java new String -

i try code: byte[] data = new byte[66000]; int count = is.read(data); string srequest = new string(data); //will received byte array hello string = srequest; = all.concat("world"); system.out.println(all); it print console: hello concat funtion of java have bug? used + operator instead concat function result same :( how can concat string new string byte array? instead of string srequest = new string(data); //will received byte array hello use string srequest = new string(data, 0, count); //will received byte array hello you notice difference when additionally print length of result string: system.err.println(all + "/" + all.length()); gives helloworld/66005 in first case , helloworld/10 in second case. reason see "hello" might issue of console - in eclipse, see "helloworld" when copy&paste editor 1 of words taken. 0 values initial array part of result (since had been added first string

apache - SVN - Redirect the request from one repos to another repos -

i need redirect request of 1 file present in 1 repository file present in repository. how in svn using apache rewrite module ? thanks in advance... you should not use mod_rewrite this. use svn:externals (externals definitions) .

diskspace - Disable Jenkins Log File Usage -

jenkins has cool perk of logging happens during build process. right logged in /var/log/jenkins/jenkins.log. after regular periods, file grow more 400 gb in space. is there way disable "feature"? system system used company internally, would'nt mind, disabling logging @ all. thanks help! jenkins logging highly configurable, can turn off logging packages you;re not interested in. configuration done @ $jenkins_url/log/ - documentation @ https://wiki.jenkins-ci.org/display/jenkins/logging

javascript - How to execute the callback at the end of the function calling it? -

in node js application have function reads line line file, stores contents of file in array , calls callback function array passed callback. function readfile(callback) { var fs = require('fs'), readline = require('readline'); var rd = readline.createinterface({ input: fs.createreadstream('./file.txt'), output: process.stdout, terminal: false }); var data = []; rd.on('line', function(line) { data.push(line); }); callback(data); } the problem i'm facing readfile running callback before file read , data array filled. callback running empty array. how can make run once array filled? thanks. readline has close event fired on "end" so, code should be function readfile(callback) { var fs = require('fs'), readline = require('readline'); var rd = readline.createinterface({ input: fs.createreadstream('./file.txt'),

entity framework - Sql Azure Connection String error -

i trying connect sql azure use ado.net connection still provided portal. of format var connectionstring = "server=tcp:abcdefghij.database.windows.net,1433;database=[mydatabase];user id=[myname]@abcdefghij;password=[]mypassword;trusted_connection=false;encrypt=true;connection timeout=30;" when pass connection string dbcontext constructor falls over. error message is "the type initializer 'system.data.entity.modelconfiguration.utilities.typeextensions' threw exception." any ideas problem can be? thanks martin

c++ - Undefined symbols for architecture arm64: "cv::String::deallocate()" -

Image
when add ".a" file includes opencv.framework,xcode encountered such compile errors: i pretty sure opencv.framework there,and using opencv 3.1,it should support arm64. why keep complaining this? how can fix it? lot. lipo - info shows following information: architectures in fat file: /users/fumin/libvisagewrapper.a are: armv7 i386 x86_64 arm64 you should verify library correctly supporting arm64 using command: lipo -info libyourlib.a the output of command should show this: architectures in fat file: libyourlib.a are: armv7 arm64 a fat file means file holds binary elements possibly more 1 architecture. if arm64 missing, can't build target arm64 devices. might need ask supplier of library build fat version includes arm64 architecture.

html - Weird OSX retina Chrome scrollbar behaviour with box-shadow and relative content -

Image
when outer element has box-shadow , inner element has relative position scrollbar on osx el capitan chrome follows outline of box-shadow. take @ example better understand this. is bug osx/chrome or doing wrong? http://jsbin.com/jekawikaci/edit?html,css,output can reproduce on mavericks chrome 49. had same problem , took me hours figure out box-shadow. firefox, safari worked fine.

flash - The button is still active even when I remove the cursor from it, ActionScript 3 -

ok have game have issue whenever press button, while button still being pressed if remove cursor without releasing mouse button button still active. how can resolve make whenever mouse not in button's hit zone not active----to explain better , simple..if press button adn dont let go of , if drag mouse off buttons zone , let go button still active, how can resolve that?. here code make player walk. var leftpressed:boolean = false; var rightpressed:boolean = false; var uppressed:boolean = false; var shootdown:boolean = false; var onground:boolean = true; var level:number = 1; var bullets:array = new array(); var container_mc:movieclip; var enemies:array = new array(); var score:number = 0; var tempenemy:movieclip; var templaser:movieclip; var timeshit:uint = 0; // button events either clicked or not left_btn.addeventlistener(mouseevent.mouse_down, moveleft); right_btn.addeventlistener(mouseevent.mouse_down, moveright); up_btn.addeventlistener(mouseevent.mouse_do

php - Fatal error: session_start() after upgrading to Codeigniter 3 -

i upgraded codeigniter 2 3 , error cas library : a php error encountered severity: error message: session_start() [function.session-start]: failed initialize storage module: user (path: c:\windows\temp) filename: cas/client.php line number: 3588 backtrace: it has session, guess ci3.0 handles differently ci2.0. i have following in config.php $config['sess_driver'] = 'files'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_save_path'] = null; $config['sess_match_ip'] = false; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = false ; any highly appreciated. thanks. new: i did clean ci3.0.4 install , seems problem cas authentication library: https://github.com/eliasdorneles/code-igniter-cas-library it worked ci 2.x, not ci3.0. if not load cas module, works fine regard session (i have no problem setting sessions, etc). once

javascript - Upload File Using Ajax in Codeigniter -

i trying upload file other data. thing i'm getting error you did not select file upload. can't understand i'm doing wrong. glad if can point out doing wrong. html file <div class="modal-body"> <form id="add_message" enctype="multipart/form-data" method="post" action="<?php echo base_url() ?>apps/messages/composemessage"> <div class="form-group"> <select id="messageto" class="form-control" data-plugin="select2" multiple="multiple" data-placeholder="to:" name="messageto"> </select> </div> <div class="form-group"> <input class="form-control" placeholder="subject" id="messagesubject" name="messagesubject"></input> </div> &

.htaccess - Rewrite all subdomain data to a new domain -

i have video on site vimeo using i write: i can not find .htaccess rewrite code convert player.mydomain.com player.vimeo.com nothing works. maybe not possible? thanks guys. if understand problem, try in .htaccess file: rewritecond %{http_host} ^player.mydomain.com$ rewriterule ^(.*)$ http://player.vimeo.com/$1 [r=permanent] that throw filename , query-string requested player.vimeo.com.

css - Gmail changing max-width in % to px? -

i'm working on html email various clients, , having strange issues using gmail (yay) - specifically, when viewing email through browser. (no issues in app) the issue comes when using browser on small screen (eg mobile) - images displaying wide, despite max-width, meaning layout stretched , requires horizontal scrolling. whilst causes no issues on desktop, same thing happens code on images, i've set style="max-width:100% !important;" inline on each image. have <style> block in head with img {max-width: 100% !important;} when inspecting image element (both on phone , pc), i'm seeing no sign of max-width head, not totally unexpected. what's weird each image still has max-width set inline- no longer in %, in px. inspected in pc browser, inline max-width says max-width: 1920px; viewed on phone (android, inline max-width is max-width: 767px; in case, image way wide , breaking layout. same thing happens on images, reg

css - Add extra margin to the 960.gs framework without breaking it's purpose -

Image
i have design want accomplish , found 2 ways achieve using 960gs framework. although don't know 1 better , there's not information best practices in css there in, say, php. applied learned vanilla html/css , php oo find out none of them "good". this [the important part of] design: the 2 ways of obtaining based on 960gs framework , disadvantages find are: modify css add margins text. then, inside div, apply pure 960gs system 12 columns. works, makes whole width wider optimal (1000 px, not 1024x768, 9% of browsers ). use 24 column model , leave first , last column empty, become margin. problem i'm using structure elements purely visuals, plus having write them in every single part of every page (not dry). example second: <div class='grid_22 prefix_1'> <p> theory of relativity transformed theoretical <a href="http://en.wikipedia.org/wiki/physics" title="physics">physics</a> , <a href=

AngularJS single page app - load default template and navigate to another page on login success -

here have 3 pages index.html,login.aspx,mainpage.html when run application shows login.aspx , when enter credentials renders mainpage.here snippet index.html <!doctype html> <html data-ng-app="myapp"> <head > <script src="scripts/angular.min.js"></script> <script src="scripts/angular-route.min.js"></script> <script src="basecontroller.js"></script> <title></title> </head> <body> <div data-ng-view=""> </div> </body> </html> and login.aspx <!doctype html data-ng-app="myapp"> <html > <head> <script src="scripts/angular.min.js"></script> <script src="scripts/angular-route.min.js"></script> <script src="basecontroller.js"></script> <title></title> </head> <body &g

java - WaterTank ProducerConsumer Pattern -

this exercise have 1 producer , n consumer ( fill , remove water watertank ) implemented in shown code. now text of exercise says: filling additional tank: this way u can sure water won't put in , taken away @ same time. or water can taken away if there putoperation. i don't understand it. have synchronized on private final object first part ( won't put , taken away @ same time ) doesn't happen anyway. there no need additional watertank way. the second part taken @ same time put quite don't understand. need semaphores or reeantrantlock or anything? i know have put watertank object existing watertank far understand. thy :) public class watertank { private final int capacity; private int water; private final object synchobj = new object(); public watertank(int capacit, int wate) { this.capacity = capacit; this.water = wate; } public void fillwater(int wata) { synchronized (synchobj) { if (water + wata > capacity) {

How can my node.js code see if it's running under official nodejs, iojs, jxcore, or node-chakracore? -

there several forks of nodejs various reasons. for node code see fork running under, best way? the forks aware of are: the official nodejs release iojs - guess it's deprecated since it's rejoined official nodejs, it's still of interest jxcore - fork supports multiple cpus/core; multiple js engines including v8, mozilla's spidermonkey, , microsoft's chakracore; , packaging of js apps npm doesn't need used users of apps microsoft's fork of nodejs using edge browser's chakracore js engine via v8-compatibility shim ( i've asked companion question detecting js engine being used. question detecting fork being used.) nodejs , iojs can checked process.release : name: string value 'node' node.js. legacy io.js releases, 'io.js'. as jxcore can use either process.jxversion or typeof jxcore !== 'undefined'