Posts

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...