Posts

Showing posts from September, 2012

if statement - Can't put a certain expression in IF clause in batch file -

the following works fine: @echo off youtube-dl --output d:\path\%%(title)s.%%(ext)s -f bestaudio https://www.youtube.com/watch?v=j9bjjejk2dq i can add if clause (and expected 'hi'): @echo off if 1==1 ( echo hi ) youtube-dl --output d:\path\%%(title)s.%%(ext)s -f bestaudio https://www.youtube.com/watch?v=j9bjjejk2dq but when put youtube-dl in if clause, doesn't work. s.%(ext)s unexpected @ time. , without hi . @echo off if 1==1 ( echo hi youtube-dl --output d:\path\%%(title)s.%%(ext)s -f bestaudio https://www.youtube.com/watch?v=j9bjjejk2dq ) same thing if put output path in variable: @echo off set output=d:\path\%%(title)s.%%(ext)s if 1==1 ( echo hi youtube-dl --output %output% -f bestaudio https://www.youtube.com/watch?v=j9bjjejk2dq ) the variable not problem, following works fine: @echo off set output=d:\path\%%(title)s.%%(ext)s if 1==1 ( echo hi ) youtube-dl --output %output% -f bestaudio https://www.youtube.com/watch?v=j9

arrays - Remove duplicate characters in a string in Java -

i started read famous "cracking coding interview" book. design algorithm , write code remove duplicate characters in string without using additional buffer. note: 1 or 2 additional variables fine. copy of array not. i found similar topic here : remove duplicate characters in string the solution given author : public static void removeduplicates(char[] str) { if (str == null) return; int len = str.length; if (len < 2) return; int tail = 1; (int = 1; < len; ++i) { int j; (j = 0; j < tail; ++j) { if (str[i] == str[j]) break; } if (j == tail) { str[tail] = str[i]; ++tail; } } str[tail] = 0; } the problem here author used array argument function. question : how can write algorithms string argument? because felt it's easier use array here , it's "avoid difficulty" of exercice (in opinion, i'm newly java developer). how can write such algorithm?

add columns to a data frame calculated by for loops in python -

import re #creating several new colums loop , adding them original df. #creating permutations second level of binary variables df in list_ib: j in list_ib: if == j: break else: bina = df[i]*df[j] print(i,j) i binary columns belong data frame (df) , j same columns. have calculated multiplications each column each column. question now, how add new binary product columns original df? i have tried: df = df + df[i,j,bina] but not getting results need. suggestions? as understand, i,j,bina not part of df. build arrays each 1 of those, each array element representing 'row' , once have rows i,j,bina ready, can concatenate this: >>> new_df = pd.dataframe(data={'i':i, 'j':j, 'bina':bina}, columns=['i','j','bina']) >>> pd.concat([df, new_df], axis=1) alternatively, once have data 'i', 'j' , 'bina' collected

assembly - Why are disassembled data becoming instructions? -

Image
i need understand happens in moment when fragment of code "happens": "jmp begin". understand .com file can 64kb want put in 1 segment. need jmp if want put variables. when search it, many guides in comment jmp begin skip data , nothing else. , here question: happens in moment: it appears runs this mov al, mov bl, b sub al, bl but can't understand why looks in turbo debugger. when change starting value of result ? greater 0 changes else , when change example 90 looks normal. new assembly , can't seem grasp @ all. here whole code: .model tiny code segment org 100h assume cs:code, ds:code start: jmp begin equ 20 b equ 10 c equ 100 d equ 5 result db ? begin: mov al, mov bl, b sub al, bl mov bl,

How to use poller trigger in spring integration int-jpa:inbound-channel-adapter such that trigger persist in DB -

i have spring integration inbound adapter works fine, below. , have setup quartz in cluster mode (hence persist trigger/scheduler) in db. works fine well, job extends org.quartz.job class. trying make the poller in int-jpa:inbound-channel-adapter in cluster mode, when deployed in multiple nodes 1 of running. got idea of doing serviceactivator not sure how scenario mine using int-jpa:inbound-channel-adapter . using spring 4 , quartz 2. <int-jpa:inbound-channel-adapter id="inboundchanneladapteriiddatajpa" channel="inboundchanneladapterone" entity-manager="entitymanager" jpa-query="select g house g" expect-single-result="false" delete-after-poll="false"> <int:poller fixed-rate="50000"> <int:transactional propagation="required" transaction-manager="transactionmanager" /> </int:poller> </int-jpa:inbound-channel-ad

javascript - How to get push id uniquely -

i'm building forum, , i'm in step of views. have (simplified) code: //setting views //adding them.. $scope.views = $firebaseobject(refservice.ref().child("topics")) refservice.ref().child("topics").once("value", function(snapshot) { snapshot.foreach(function(childsnapshot) { var key = childsnapshot.key(); var childdata = childsnapshot.val(); if(childdata.datecreated == $stateparams.date && childdata.email == $stateparams.email){ refservice.ref().child("topics").child(childdata.pushkey).child("views").child(currentauth.uid).set({ views : true }) } }) }) //viewing them $scope.viewableview = $firebaseobject(refservice.ref().child("topics")) as can see adding views pretty easy job. , did correctly. problem displaying number of views, , have using angularfire's $firebaseobject , or $firebasearray ... here structure in database

python - Why does this after statement not work? -

this question has answer here: tkinter: how use after method 1 answer i have after statement in move_r function. when hit space bar says typeerror: move_r() missing 1 required positional argument: 'event' i relatively know means can't figure out change program supposed draw rocket, , when click space rocket moves up. unfortunately program goes 100 everytime click space instead of going once hit space goal. code is: from tkinter import * import random, time tk = tk() tk.wm_attributes('-topmost', 1) canvas = canvas(tk, width=1000, height=1000, bd=0) canvas.pack() def rocket(): #draws rocket rocketbase=canvas.create_rectangle(x2+50, y2-50, x3-50, y3-90, fill ='blue') rrocketfin=canvas.create_rectangle(x2+60, y2-50, x3-40, y3-20, fill ='#e69100') lrocketfin=canvas.create_rectangle(x2+40, y2-50, x3-60, y

javascript - CodeMirror issue: Error parsing forward channel Error: Invalid maps at transformData -

trying simple version of codemirror , running when go document on 2 diff browsers (or 1 in incog), error in console: error parsing forward channel error: invalid maps @ transformdata these 2 diff users logged in , accessing same doc. worked fine when no 1 logged in , 2 diff browsers accessing doc. set settings.json file instructed in root , running meteor 1.2.1 that's version still works sharejs. i'm running with: meteor --release 1.2.1 --settings settings.json. { "sharejs": { "options": { "accounts_auth": { "authorize": { "collection": "documents", "token_validations": { "or": { "invitedusers": "is_in_array", "userid": "is_equal" } }, "apply_on": [ "read", "update",

How to set npm not to install packages that had been installed globally? -

my project references mocha , phantomjs , etc, takes lot of time download during npm install . not problem in local machine because download them once , can use them forever unless decide manually upgrade them. however, in ci machine, jenkins server need download them every time did git commit , git push testing , deploy. so can speed process set npm not download these slow packages remote server? rather, install them local cache or not install them if installed them globally? anyone knows how configure that? i found packages might helpful npm-install-changed run npm install if contents of package.json 's devdependencies , dependencies changed, note assumes node_modules persists across different builds might not helpful if ci server start scratch npm-install-cache runs npm install , copies current node_modules folder (to somewhere in \tmp ), if call script again verify any changes package.json (instead of changes done on devdependencies or depe

How to make broadcast receiver to listen event for particular app in android? -

i developing app contain list of app, when user click of particular app list shown him directed website can download app listen app download add broadcast receiver in android menifest.xml.the problem broadcast receiver listen if app downloaded in system app also.what want broadcast receiver should listen events app when app open closed. here java code:- public class receiver extends broadcastreceiver { @override public void onreceive(context context, intent intent) { // check if application install or uninstall , display message accordingly if (intent.getaction().equals("android.intent.action.package_added")) { // application install log.e("package added:-", intent.getdata().tostring()); } else if (intent.getaction().equals("android.intent.action.package_removed")) { log.e("package removed:-", intent.getdata().tostring()); } else if (intent.getaction().equals("android.intent.action.package_re

Info not sending through ajax to php file -

i trying have submit button send php file , give popup notification been completed. when run following, gives me notification no info posted. redirects empty search.php no post data. need give popup, submit info, , stay on same page. cant seem figure out what's wrong form html: <div class="panel-body"> <div class="row"> <form class="request" action="search.php" method="post"> <div class="col-lg-12"> <form role="form"> <div class="form-group"> <p>wo notations appear @ top of work order screen. submit useful information can provided builders/centerpoint. other importation information may include bricks, scaffles, dogs, or home owners preventing installation. sure include phone numbers if

node.js - Node JS : Can't set headers after they are sent -

i have looked @ various answers on site, don't seem able find solution. making 2 identical requests 1 page, 1 of them made every 15 minutes , other 1 done on click. 1 called periodically first 1 called , code follows: periodic.js var express = require('express'); var router = express.router(); var mongodb = require('mongodb'); var assert = require('assert'); router.get('/', function(req, res, next) { var mongoclient = mongodb.mongoclient; var url = 'mongodb://localhost:27017/test'; mongoclient.connect(url, function (err, db) { if (err) { console.log('unable connect mongodb server. error:', err); } else { get_number(db,function(user_res){ return res.json(user_res); db.close(); }) } }); }); function get_number(db,cb) { var collection = db.collection('result'); collection.aggregate( { $group: { _id: {'number':'$number','name':'$name'

ANDROID | send email attachment only with email clients -

Image
please read question before marking duplicate. :) i want send email attachment. have used action_sendto code: intent intent = new intent(intent.action_sendto); intent.setdata(uri.parse("mailto:")); intent.putextra(intent.extra_email, new string[]{ wrapper.instance.getsupportemail()}); intent.putextra(intent.extra_subject, getresources().getstring(resourcetitleid)); intent.putextra(intent.extra_stream, uri.parse("file://" + filepath)); try { ctx.startactivity(intent.createchooser(intent, "send mail...")); } catch (android.content.activitynotfoundexception ex) { toast.maketext(ctx, "there no email clients installed.", toast.length_short).show(); } it shows email clients, see picture below: but attachment not working except gmail. i have tried achieve action_send code: intent intent = new intent(intent.action_send); intent.putextra(intent.extra_email, new string[]

ios - Can I keep UI elements accessable while changing background color in Xcode? -

i have game in xcode several uibuttons on white background. when user clicks correct buttons, i'm changing background white blue-green (animated). i'd allow user keep clicking, while background colors change, looks buttons not accessible until bg color animation done running. there way resolve , keep focus on buttons? can background animation happen in background, independent of rest of game? thanks in advance understanding this. here code: [uiview animatewithduration:0.3f animations:^{ self.view.backgroundcolor = [uicolor colorwithred:0.1f green:0.15f blue:0.05f alpha:1.0f]; } completion:^(bool finished){ [uiview animatewithduration:0.3f animations:^{ self.view.backgroundcolor = [uicolor colorwithred:1.0f green:1.0 blue:1.0 alpha:1.0f]; } ]; } ]; all uibuttons added in separate method earlier uibutton *btni; [self.view addsubview:btni]; you can use animation method options : + animatewithduration:delay:options:animations:completion: with uiviewanimat

ruby - Need to render as a UMD module - rails-babel-transpiler gem -

i using rails-babel-transpiler gem mentioned in official babel site language api - ruby , converting es6 code es5. the way transpiling, below erb file <% require 'babel/transpiler' transfromed = babel::transpiler.transform("import hellowrapper '../assets/javascripts/components/hellowrapper'; reactdom.render(<hellowrapper />, document.getelementbyid('app'));") %> <%= javascript_tag %> <%= transfromed["code"].html_safe %> <% end %> it getting rendered //<![cdata[ 'use strict'; function _interoprequiredefault(obj) { return obj && obj.__esmodule ? obj : { 'default': obj }; } var _assetsjavascriptscomponentshellowrapper = require('../assets/javascripts/components/hellowrapper'); var _assetsjavascriptscomponentshellowrapper2 = _interoprequiredefault(_assetsjavascriptscomponentshellowrapper); reactdom.render(react.createelement(_assetsjavascriptscomponentshellowrappe

python - 500 internal server error while uploading images django -

i have form divided 2 parts. mean form has rental information fields , multiple image upload.i have used reactjs in frontend , django in backend.rentals information saved database images not.it throws 500 internal server error.i have app deployed on digital ocean(nginx, gunicorn used).link app commonrentspace.me here code addrent.js(upload image code focused more shortening code line) let image = []; class renderphotos extends react.component { constructor(props, context) { super(props, context); this.state = { files: [] }; } ondrop(files) { console.log('received files: ', files); this.setstate({ files: files }); function getcookie(name) { var cookievalue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); (var = 0; < cookies.length; i++) {

random - Permutations of several lists in python efficiently -

i'm trying write python script generate random permutations of several lists without repeating i.e. [a,b] [c,d] a, c b,c, a,d b,d i can generate every permutation using following, result non random: for r in itertools.product(list1, list2): target.write("%s,%s" % (r[0], r[1]) does know way can implement such can extract 2 permutations, , random ensure never repeated? you can use random.choice() : >>> itertools import product >>> import random >>> l1 = ['a', 'b', 'c'] >>> l2 = ['d', 'e', 'f'] >>> prod = tuple(product(l1, l2)) >>> >>> random.choice(prod) ('c', 'e') >>> random.choice(prod) ('a', 'f') >>> random.choice(prod) ('c', 'd') or use nested list comprehension creating products: >>> lst = [(i, j) j in l2 in l1] if don't want produce duplicate i

xaml - Custom CommandBar to PickerFlyout -

Image
by default pickerflyout has commandbar has done , cancel buttons. possible disable done button programmatically? if not there way add custom command bar , replace default one? with of answer given tried write custom picker pickerflyoutbase. i'm not able add content flyout in xaml. giving me error saying custompicker doesnt support direct content <button> <button.flyout> <local:custompicker> <textblock margin="20" fontsize="30" text="mypickerflyout test" /> </local:custompicker> </button.flyout> </button public class custompicker:pickerflyoutbase { private appbar originalappbar; private commandbar mycommandbar; private page currentpage; public custompicker() { var cancelbutton = new appbarbutton(); cancelbutton.icon

github - How to pull changes back to Git repository after some changes have been done on live server -

Image
now have standard workflow work localy, push git repo , deployment git repo ftp, our clients use website, still find difficult additions or changes on website after time. for example after year, when client wants add new things. what - download files ftp run date website locally, push them git repo, needed, push again git , deployment live. what want know - there way pull changes git repo live server have date website without need of downloading files again , uploading them all? example: after year client wants new page - i'd pull live git, pull local environment. can edit website localy, push , deploy live server. thank advice , ideas! use git format-patch generate diff files (patches) , upload/download them. git format-patch head~x // x number of commits need here demo on how create patches , they.

java - How to retrieve class of generic argument in a CDI producer? -

i have java class generic type. in business logic of class, need refer class object of generic type. therefore, constructor class object passed argument: public class myclass<generic_type>{ private class<generic_type> generictypeclass; public myclass(class<generic_type> generictypeclass){ this.generictypeclass=generictypeclass; } } i create instance(s) of class using cdi producer, squeleton looks like public class myclassproducer{ @produces myclass<generic_type> createmyclass(injectionpoint injectionpoint){ class<generic_type> generictypeclass = ???? return new myclass(generictypeclass); } } how retrieve generictypeclass ? solution 2 liner: public class myclassproducer { @produces <generic_type> myclass<generic_type> createmyclass(injectionpoint injectionpoint){ final parameterizedtype parameterizedtype = (parameterizedtype) injectionpoint.gettype();

image - Create thumbnail using Java running on headless mode -

how create thumbnail image using java application x11 not available . tried using javascalr,im4java working if x11 present. i believe easiest install dummy display driver. place start: http://cosmolinux.no-ip.org/raconetlinux2/dummy_radeon_nvidia.html

coldfusion - Websocket not working on Chrome or IE -

i have coldfusion websockets channel streams data every 2 seconds. has worked time, have approximately doubled amount of data being sent , have problems when comes chrome , internet explorer – both come following errors - websocket connecttion 'ws://mywebsite.com' failed: invalid frame header uncaught typeerror: cannot set property 'readystate' of undefined everything works on firefox. i assuming errors relate size of packets , not correctly specified in header, since if reduce amount of data works fine. have increased “max data size” websockets in coldfusion administrator not fix problem. any how working appreciated.

Android support library error after updating to 23.3.0 -

hi have been using android support v4 23.1.1 , tried update 23.3.0 ( latest 1 when asked) got following error: error:conflict dependency 'com.android.support:support-annotations'. resolved versions app (23.3.0) , test app (23.1.1) differ. see http://g.co/androidstudio/app-test-app-conflict details. so far have found https://code.google.com/p/android/issues/detail?id=206137 i went both links not fix issue, how fix issue? edit: i have these in dependencies compile 'com.android.support:support-v4:23.3.0' compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.android.support:recyclerview-v7:23.3.0' compile 'com.android.support:cardview-v7:23.3.0' compile 'com.android.support:design:23.3.0' previouly versions 23.1.1 , worked fine error occurred after updating edit: gradle version 2.10 gradle plugin version 2.0.0 buildtoolsversion "23.0.3" for people still facing problem add line dependencies.

c# - asp net error the process cannot access the file because it is being used -

i have error regards subject above, downloading file path. download code this: string sfile = request.querystring["rfbnumber"].tostring(); string sfile2 = request.querystring["foldername"].tostring(); string sflag = request.querystring["flag"].tostring(); //createrfbreport(sfile, sfile2); //createsinglefile(sfile2, sfile); if (sflag == "1") { sfilename = "rfb_" + sfile + "_collated.pdf"; sglobalfoldername = sfile2; sfilepath = @ "" + sglobalfoldername + "\\" + sfilename; webclient client = new webclient(); byte[] buff = client.downloaddata(sfilepath); response.contenttype = "application/pdf"; response.addheader("content-length", buff.length.tostring()); response.binarywrite(buff); } if (sflag == "2") { sfilename = "sop_" + sfile + "_collated.pdf"; sglobalfoldername = sfile2; sfilepath = @ "" + sgl

docusignapi - Can the DocuSign Connect (webhook) module send updates to non public URLs? -

i know docusign can send signed pdf , other stuff public url using docusign connect module. i want know whether send our own server listner page. docusign send signed information non-public url docusign connect , eventnotifications (same notification mechanism, different subscription process), send notifications url available via public internet. there different meanings "non-public url." server/listener's url not have linked other page, not have in google database, can use long, obscure strings in url, etc. has reachable via public internet. so if listener accessible via public internet, you're golden. other options: put listener on company's dmz accessible internet , have access internal systems. put listener behind firewall , open "pinhole" in firewall enable incoming connection requests. docusign publishes ip ranges uses can limit size of opening in firewall create server/listener "gateway" on public internet i

visual c++ - Insertion sort not swapping -

i have implement insertion sort algorithm in x86 , code doesn't change output of array @ all. think problem lies trying swap in inner loop whenever change how array elements assigned nothing happens. no change in program outputs. why happening, , how can fix it? my code is: void asmsort(int *list, int arraylen, int halfpoint) { /* * list = address of list of integer array * arraylen = number of element in list list.length in java * halfpoint use flag * halpfpoint = 1 when sort routine reach half point return, otherwise finished sort , return */ /* * * insertion_sort(list,arraylen,halfpoint); return; selection_sort(list,arraylen,halfpoint); return; * * */ // variable can declare here before _asm /* int tmp = 0; int = 0; int j = 0; */ _asm { mov ecx, arraylen mov esi, list mov ebx, halfpoint mov eax, 99 push eax push ebp mov ebp, 4 //this shl ecx, 2 outerloop: cmp ebp, ecx jg exitouter add esi,ebp

How to keep running a program in Java -

i have written java code keep getting value in other website every 10sec. , keep writing result append txt file. how can keep running code. should run in cloud server? if so, how can it. know in eclipse, click "run application". how can run in other ways(linux, or without eclipse)? here can do, using loop, shell script , cron job achieve need: make sure program has logic infinite loop run always. then write shell script invoke java program necessary arguments. make sure classpath argument points jars need. make sure shell script has necessary linux permissions. schedule script invoked setting cron job. can set cron condition per need.

asynchronous - Trying to implement CFTHREAD...unsuccessfully :( -

i made post cfhttp in cfloop limit? use cfthread regarding making multiple cfhttp requests implemented solution of making xmlhttprequest in js function call cfhttp request file. i've amended runs on intertval timer seem have issue in i'm allowed host make 3 requests per second although may set interval time every 7 seconds still end timing out because cfhttp requests seem pend , make request @ same time (which means it's taking me through threshold). i've read ben nadel's posts on using cfthread having absolutely no joy implementing them @ all. my basic process @ moment is:- index.cfm contains js function uses xmlhttprequest calls playersearch.cfm playersearch.cfm makes cfhttp request. playersearch.cfm loops round response , display current item loop submitting cfhttp request make bid on current item in loop if meets of if conditions. index.cfm keeps making requests every x amount of seconds. is there way can set cfhttp request make request every

What database should I use that does not need an application to be installed -

is there database not required installed application @ client side. no. database server requires specialized client connect it. it might simple command-line client (e.g. mysql ) or gui (e.g. phpmyadmin), it's needed.

python - How to switch entirely from pip to brew -

i have read elsewhere brew better option pip install packages (and indeed had less problems installing python packages brew pip). problem when run brew update && brew outdated && brew upgrade --all and then pip-review -a it seems same packages installed twice (for example matplotlib , scipy , , like). how can rid of pip , switch entirely brew, avoid double installations , potential conflicts? you can't that. cannot expect python packages available via brew. pip python package manager, having understanding of how python packages should installed querying remote server of python packages called pypi . brew, on other hand, general software installation system mac. project existence because apple lazy provide package manager , package management system installing unix/ mac software on apple. there many python packages exist on brew volunteers took pain convert brew formulae . not guarantee of 100% 1-1 mapping of brew package pip installable pack

Error while calling secured webservice from Mule Project -

need call secured web service 1 of mule projects. have created self signed certificate , configured project follows: 1)keep keystore.jks inside resource folder of project 2)defined https connector in globals.xml file <https:connector name="movilcashhttpsconnector" doc:name="http-https" clientsotimeout="10000" cookiespec="netscape" receivebacklog="0" receivebuffersize="0" sendbuffersize="0" serversotimeout="10000" socketsolinger="0" validateconnections="true"> <https:tls-key-store path="keystore.jks" keypassword="changeit" storepassword="changeit" /> <https:tls-server path="keystore.jks" storepassword="changeit" /> </https:connector> 3) while calling https endpoint have used following configuration <https:outbound-endpoint method="post" doc:name="http" ex

Datatables.net date display format -

i'm using datatables.net jquery plugin , populating data through asp.net mvc4. one of columns date format. i'm interested in changing format of how displayed not changing type of column date string. i'm using default initialization: $('#data-table').datatable(); my 4th column date "created date" , displayed "7/07/2013 9:38:11 p.m." displayed either "7/07/2013" or "7 jul 2013". i thought relatively easy task haven't been able find answer i'm after. i'd avoid additional plugins if possible. there simple way i'm missing? here came with. using how renders can manipulate way date displayed anyway want. $('#data-table').datatable({ "aocolumndefs": [ { "atargets": [0], "bsearchable": false, "stype": 'date', "fnrender": function ( oobj ) { var javasc

html5 - email Template design -

i working email template design. issue if see design there element "p" , there vertical black line above , below "p", issue line doesn't join other "p" line. content in white background part dynamic, can't fix height. my question how can overcome issue. please me. in advance. <table width="600" cellspacing="0" cellpadding="0" border="0" align="center" class="container" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;"> <tbody> <tr> <td align="center" style="color:#fff;"> <h1 style="background-color:#2c3840; padding:12px; font-family:arial, helvetica, sans-serif; text-transform:uppercase; font-size:22px;margin:0px; font-weight:normal;">september 23</h1> </td> </tr> </tbody> </table> <!--time--> <table width="600" cellspacing="0&qu

python - Read and return values from array with conditions -

i trying read array created , return value inside array column , row found in.this have @ moment. import pandas pd import os import re dir = os.getcwd() blks = [] files in dir: f in os.listdir(dir): if re.search('txt', f): blks = [each each in os.listdir(dir) if each.endswith('.txt')] print (blks) z in blks: df = pd.read_csv(z, sep=r'\s+', names=['x','y','z']) = [] = df.pivot('y','x','z') print (a) outputs: x 300.00 300.25 300.50 300.75 301.00 301.25 301.50 301.75 y 200.00 100 100 100 100 100 100 100 100 200.25 100 100 100 100 110 100 100 100 200.50 100 100 100 100 100 100 100 100 x columns , y rows, inside array values corresponding there adjacent column , row. can see a

PHP - GetText not working -

i'm trying add translations webpage. unfortunately translation isn't being read. however, 1 translation read (even though ask different one). my php code looks this: $language = "en_us"; //hardcoded debugging purposes define("folder_specification", "./locale/"); define("domain", "messages"); define("code_set", "utf-8"); putenv("lang=" . $language); setlocale(lc_all, $language); bindtextdomain(domain, folder_specification); bind_textdomain_codeset(domain, code_set); textdomain(domain); my folder structure looks this: root > locale > en_us > lc_messages > messages.mo messages.po nl_nl > lc_messages > messages.mo messages.po if change $language variable en_us or nl_nl still grabs translation nl_nl , if remove nl_nl folder doesnt translate @ all, means 1 thing: en_us tra

org.apache.thrift.transport.TTransportException error while Reading large JSON file in zeppelin scala -

i trying read large json file (1.5 gb) using zeppelin , scala. zeppelin working on spark in local mode installed on ubuntu os on vm 10 gb ram. have alloted 8gb spark.executor.memory my code below val inputfileweather="/home/shashi/incubator-zeppelin-master/data/ai/weather.json" val temp=sqlcontext.read.json(inputfileweather) i getting following error org.apache.thrift.transport.ttransportexception @ org.apache.thrift.transport.tiostreamtransport.read(tiostreamtransport.java:132) @ org.apache.thrift.transport.ttransport.readall(ttransport.java:86) @ org.apache.thrift.protocol.tbinaryprotocol.readall(tbinaryprotocol.java:429) @ org.apache.thrift.protocol.tbinaryprotocol.readi32(tbinaryprotocol.java:318) @ org.apache.thrift.protocol.tbinaryprotocol.readmessagebegin(tbinaryprotocol.java:219) @ org.apache.thrift.tserviceclient.receivebase(tserviceclient.java:69) @ org.apache.zeppelin.interpreter.thrift.remoteinterpreterservice$client.recv_