Posts

Showing posts from August, 2010

HTML / CSS: I'm Experiecing With Divs? -

code: http://pastebin.com/00nds6kn i seeking put of on 1 page, in there no scrollbar present on browser when on page. have attempted set heights of divs percentage via css unsuccessful. i unable remove small white gap between div "footer" , div "banner" containing image. body { width: 100%; margin: 0px; background-color: #f5f5f5; } #container { height: 100%; } #navigation{ color: white; background-color: #292526; width: 100%; position: fixed; top: 0px; padding: 0.5% 0.5%; } #navigationleft { width: 24.5%; display: inline-block; vertical-align: middle; font-size: 180%; } #navigationright { width: 74.5%; display: inline-block; vertical-align:

node.js - Strongloop error: Cannot find module 'options' -

i wanted deploy app on remote linux server. using loopback , wanted follow instruncions in docs. ive build app using arc, started proces manager on remote host , deployed using slc deploy http://my.host . deploy successful, process manager started throw error: module.js:340 throw err; ^ error: cannot find module 'options' @ function.module._resolvefilename (module.js:338:15) @ function.module._load (module.js:280:25) @ module.require (module.js:364:17) @ require (module.js:380:17) @ object.<anonymous> (/home/arthdesigns/.strong-pm/svc/2/work/d3a01b1e3e31ee5561e69ef7aa072531cc581fc2.1454877049098/node_modules/sse/lib/sse.js:1:77) @ module._compile (module.js:456:26) @ object.module._extensions..js (module.js:474:10) @ module.load (module.js:356:32) @ function.module._load (module.js:312:12) @ module.require (module.js:364:17) its strange, because on workspace works fine. know solution? okey, found solution. went sse.js , installed dependencies via np

I can't move any controls in designer -

all controls in lower panel of designer , can't move them or select them in upper panel. did , how put normal? screetshot so apparently, there difference between unused references , unneeded ones. caused problem removing unused references not thinking may unused still necessary. cost me 6 hours invent lots of new curse words , learn 1 lesson. thank anyway

gradle - Android annotations with Android studio 2.0 beta -

trying build project new android studio 2.0 beta, uses gradle 2.1 , new gradle 2.0.0 beta plugin. i can see annotated classed generated fine, getting "cannot find symbol" error compiler , project not compile. it seems new gradle plugin maybe cannot see generated classes or similar. any idea? so after giving on new gradle plugin, found answer! it seems problem use new instant run feature introduced in android studio 2.0, doing replacing application class new instrumented class, , aa 3 having problems that. the solution use new (pre-released) aa 4, , change small configurations. it explained in details in wiki: https://github.com/excilys/androidannotations/issues/1639#issuecomment-165477743

.htaccess - Codeigniter remove index.php on https -

i using godaddy server provider , bought ssl certificate. gave me headache index.php in codeigniter project. can not remove index.php url. researched around , tried found nothing works me, not consider double please. if: https://example.com/index.php/home - works fine if: https://example.com/home 404 error. not found requested document not found on server. far, have stoped @ these conditions in htaccess file: rewriteengine on rewritecond %{https} off rewritecond %{request_uri} (sale|success|cancel) [nc] rewriterule ^(.*)$ https://%{http_host}%{request_uri} [r=301,l] rewritecond %{https} on rewritecond %{request_uri} !(static|sale|success|cancel) [nc] rewriterule ^(.*)$ http://%{http_host}%{request_uri} [r=301,l] rewritecond $1 !^(index\.php|resources|robots\.txt|static) [nc] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php/$1 [l,qsa] any advice helpful. thank you! remove index.php $config['base_url']

scala - Extractor with pattern matching -

this scala code object twice { def apply(x: int): int = x * 2 def unapply(z: int): option[int] = if (z%2 == 0) some(z/2) else none } object twicetest extends app { val x = twice(5) println(x) x match { case twice(n) => println(n) } } prints 10 5 when twicetest run. question is: x integer , not function twice(n) , why pattern matching works? it's because of pattern matching expression. let's take @ it: x match { case twice(n) => println(n) } you matching using twice . in background, call twice.unapply() parameter x . if result some(foo) , substitute value of foo value of n . otherwise won't match. see this longer explanation.

javascript - What is wrong with this MODAL ? -

i work hard follow steps of this modal login, reason i'm getting nowhere! frustrating. so this webpage i'm working on. followed , it's suppose work. i briefly point out code snippets: right on top of page there's css styling: <style type="text/css"> /** modal window styles **/ #lean_overlay { position: fixed; z-index:100; top: 0px; left: 0px; height:100%; width:100%; background: #000; display: none; } #loginmodal { width: 300px; padding: 15px 20px; background: #f3f6fa; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); -moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); } #loginform { /* no default styles */ } #loginform label { display: block; font-size: 1.1em; font-weight: bold; color: #7c8291; margin-bottom: 3px; } .txtfield { displa

javascript - Add array of elements to dom -

i have 5 div's created in html, , want add of them div wrapper created in javascript. tried looping through 5 div's via for-in loop, append div child of wrapper . for reason, for loop changes 5 div's order , doesn't append of them in wrapper . how can add div's wrapper , keeping (html) order, using javascript? (please don't post jquery answers because isn't question. want javascript answers only .) jsfiddle var wrapper = document.createelement('div'), myclass = document.getelementsbyclassname('myclass'); myclass[0].parentelement.appendchild(wrapper); wrapper.id = 'wrapper'; (var key in myclass) { if (!myclass.hasownproperty(key)) continue; wrapper.appendchild(myclass[key]); } #wrapper { border: 2px solid green; color: brown; } <div class="myclass">first</div> <div class="myclass">second</div> <div class="myclass">third&l

c++ - How do I read data from a text file into an array of struct -

i'm trying read data text file called fields.txt holds members of struct fields . {1, 0, 7.4, 39.5, 5.33784}, {3, 1, 4.6, 27.9, 6.06522}, {5, 2, 2.2, 12.5, 5.68182}, {8, 0, 14.5, 86, 5.93103}, {11, 1, 8, 43.8, 5.475}, {16, 2, 5.9, 37.7, 6.38983}, {22, 0, 12.7, 72, 5.66929}, {24, 1, 10.5, 63.2, 6.01905} i want program read data array of struct called fields fielddata[8] = {}; able use data create display. #include<iostream> #include<fstream> using namespace std; std::ifstream infile("fields.txt"); int initialise(int field, int crop, float size, float yof, float yph); struct fields { int field; int crop; float size; float yof; float yph; int initialise(int field, int crop, float size, float yof, float yph) { field = field; crop = crop; size = size; yof = yof; yph = yph; }; }; int main() { fields fielddata[8]; ifstream file("fields.txt"); if(file.is_open()) { int a, b, = 0; float c, d, e;

android - Create custom X axis line in MPAndroidChart -

Image
i create custom x axis line.(marked red) to make this: is there override can used this? thanks update meant if design of x axis design can overriden not values. sorry not clear enough. gray line margin between bar , xaxis on second image. how can achieved? yes, can define own axis values: axis axisx = new axis(); axis axisy = new axis().sethaslines(true); list<axisvalue> axisvalues = new arraylist<>(); //put values in array axisvalues.add(new axisvalue(27)); axisvalues.add(new axisvalue(28)); axisvalues.add(new axisvalue(29)); //... axisx.setvalues(axisvalues);

Can I mix MySQL APIs in PHP? -

i have searched net , far have seen can use mysql_ , mysqli_ meaning: <?php $con=mysqli_connect("localhost", "root" ,"" ,"mysql"); if( mysqli_connect_errno( $con ) ) { echo "failed connect"; }else{ echo "connected"; } mysql_close($con); echo "done"; ?> or <?php $con=mysql_connect("localhost", "root" ,"" ,"mysql"); if( mysqli_connect_errno( $con ) ) { echo "failed connect"; }else{ echo "connected"; } mysqli_close($con); echo "done"; ?> are valid when use code is: connected warning: mysql_close() expects parameter 1 resource, object given in d:\************.php on line 9 done for first , same except mysqli_close() . second one. what problem? can't use mysql_ , mysqli together? or normal? way can check if connections valid @ all? (the if(mysq...) ) no, can't use mysql , mysqli toget

Azure Mobile Apps with ASP.NET Identity or Custom Authorisation -

i evaluating azure's mobile apps , want clarify findings. a generic mobile app on app store targets wide audience (100,000 customer or more) supports native registration/authorisation , additional one(s) such facebook and/or twitter. azure mobile apps not support asp.net identity or custom authorisation, support fb, twitter, microsoft, google , azure ad. is custom authorisation support or asp.net identity support coming or there recommended way of supporting above scenario (a native registration)? there workaround now? no, can use asp.net identity or other custom scheme. please refer documentation: https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-how-to-use-server-sdk/#custom-auth/

monitoring - Is it possible to use logmet service for Cloud Foundry app? -

for vm , containers (docker), can use logmet service (logging , metrics) described in bluemix documentation. wonder if can use service cloud foundry app or not using log drain ( https://docs.cloudfoundry.org/devguide/services/log-management.html ). ref: https://developer.ibm.com/bluemix/2015/12/11/sending-logs-to-bluemix-using-logstash-forwarder/ for cloud foundry applications monitoring & analytics service in catalog provides similar functionality.

Elif error occured while the python programming -

# input values. b1 = input('please enter base.') i1 = input('please enter index.') # define funciton parameter 'base' , 'index'. def square(base, index): if base == 0: print('can\'t calculate because base equal 0.') elif (not base == 0) , index == 0: print('the value 0, because base greater 1, , index equal 0.') elif (not base == 0) , index == 1: print('the answer equal base, because index equal 1. therefore, answer {ans}.'.format(ans=base)) elif (not base == 0) , index == 2: print('{b} squared {c}.'.format(b=base, c=(b ** 2)) elif (not base == 0) , (index > 2 or index < 0): print('{b} power of {i} equal {c}'.format(b=base, i=index, c=base**index)) # print function. print(square(b1, i1)) the error this: line 36, elif (not base == 0) , (index > 2 or index < 0): syntaxerror: invalid syntax i use python 3.5.1. how can fix error?

typescript - Angular2 tsd missing from github -

last 2 days i've tried install typescript definition file angular2 , results in empty result in terminal. link github project missing - https://github.com/definitelytyped/definitelytyped/blob/master/angular2/angular2.d.ts anyone know or have new link? angular 2 ships typescript definitions out of box. don't need external package manager bring in defs angular 2.

c++ - std::cin input with spaces? -

#include <string> string input; cin >> input; the user wants enter "hello world". cin fails @ space between 2 words. how can make cin take in whole of hello world ? i'm doing structs , cin.getline doesn't seem work. here's code: struct cd { string cdtitle[50]; string artist[50]; int number_of_songs[50]; }; cin.getline(library.number_of_songs[libnumber], 250); this yields error. ideas? you have use cin.getline() : char input[100]; cin.getline(input,sizeof(input));

java - Application Crashed when I tried to compare integers -

here codes public void onclick(view v) { if (v == buttonone) { textview output = (textview)findviewbyid(r.id.output); output.append("1"); } else if (v == buttontwo) { textview output = (textview)findviewbyid(r.id.output); output.append("2"); } else if (v == buttonthree) { textview output = (textview)findviewbyid(r.id.output); output.append("3"); } else if (v == buttonfour) { textview output = (textview)findviewbyid(r.id.output); output.append("4"); } else if (v == buttonfive) { textview output = (textview)findviewbyid(r.id.output); output.append("5"); } else if (v == buttonsix) { textview output = (textview)findviewbyid(r.id.output); output.append("6"); } else if (v == buttonseven) { textview output = (textview)findviewbyid(r.id.outpu

Http2 protocol in an nginx reverse proxy and docker container -

i have ubuntu 14.04 reverse proxy nginx 1.9.10 in front of 2 docker linux containers. 1 of containers has nginx server (1.9.10 too) serves static pages. since knew 'http2' protocol available starting nginx 1.9.5, use in infrastructure. question be, should have enable 'http2' protocol in reverse proxy in nginx docker container? or in 1 of them?

python - Getting value of specific key in a dictionary -

i have dictionary so: li = {'a': 'apple', 'b': 'benana', 'c': 'cherry'} so have: >>> key, value in li.items(): ... print key, value ... apple c cherry b benana >>> i want say: if param == 'a': print value # here want value of `a` key only! i want print apple only. you can use: li['a'] >>> li = {'a': 'apple', 'b': 'benana', 'c': 'cherry'} >>> li['a'] 'apple'

Laravel 5.2 : Adding Auth module in pingpong -

how add 'default laravel auth module' pingpong module folder? php artisan make:auth above commands create auth controller/module in default http folder. i'm using pingpong component create modules in project. so, want move auth controller pingpong module folder. there command pingpong install auth directly in pingpong module folder you can make controllers , blade-templates manually. use custom auth.php config 'defaults' => [ 'guard' => 'admin', 'passwords' => 'admins', ], 'guards' => [ 'admin' => [ 'driver' => 'session', 'provider' => 'admins', ], 'api' => [ 'driver' => 'token', 'provider' => 'users', ], ], 'providers' => [ 'admins' => [ 'driver' => 'eloquent', 'mode

firebase - how to persist data throughout all pages in the application? -

Image
hi developing cross platform application. have register page user details user email , password , other details. save data under particular user. create child unique email id given user , remaining details must stored under user need above product data , service data stored inside first user. path must user logged in application. should take data pages. how can please me? here code how create above structure inside database. $(".subscribe1").click(function(){ var t1 = document.getelementbyid("email").value; var t2 = document.getelementbyid("password").value; var t3 = document.getelementbyid("confirmpassword").value; var companyname = document.getelementbyid("companyname").value; var address = document.getelementbyid("address").value; var city = document.getelementbyid("city").value; var pincode = document.getelementbyid("pincode").value; var country =

html - How do I get rid of a margin in CSS so my sections fit -

heres put section { width: 40%; } i making website has 2 columns, column facts sections website on right side of page , sign sheet on left side of page next it. i put width: 40; make right side smaller makes margin on right side , can't rid of sign in sheet there. could post example on site https://jsfiddle.net/ or http://codepen.io/ ? but answer question, rid of margins this: margin: 0 , if doesn't work try margin: 0 !important . i like .sign-up-section, .facts-section { float: left; margin: 0; height: auto; } .sign-up-section { width: 60%; } .facts-section { width: 40%; }

Can variable type in Crystal lang be restricted to classes that inherit from one class -

i mean: class foo; end class bar < foo; end class cux < foo; end is possible restrict type of variable classes inheriting foo without unions, x : foo+ ? maybe using type restriction? @x : foo

build process - Git feature branch verification -

Image
is there way verify base of git branch? implement concurrent versions, using git tagging mechanism. developers should use specific version tag created bug fix branches like: git branch -b "uat bug fix" v3.0.0 git flow diagram: looking way capture bug fix branch not created using tag.

c++ - Why does my version of strcmp not work? -

i have own version of strcmp looks this int strcmp(char str1[], char str2[]) { int = 0; while ((str1[i] == str2[i]) && (str1[i] != '\0')) { i++; } if (str1[i] > str2[i]) return 1; if (str1[i] < str2[i]) return -1; return 0; } and test case char a[20]; char b[20]; b[0] = 'f'; a[0] = 'f'; cout << strcmp(b, a) << endl; however, output of 1, meaning not equal each other. if swap , b's position in function call -1. not sure why unable 0 return in comparison when char's both 'f'. feel basic , don't know why comparison off str1[i] > str2[i] you've left arrays uninitialized , changed first elements of each. means instead of comparing strings "f" , "f" against 1 another, you're comparing 2 blocks of 20 bytes each against 1 another, except each of blocks starts "f". (actually, since arrays aren't null-t

mysql - Access Two Different Table Data in a Single Android Class, from Azure Mobile Service Local Database Getting Error -

1.i using 2 different azure local database tables in android application sync azure database. 2.whenever i using 2 different local database table credentials using in single class, getting null pointer exception . error logcat: java.util.concurrent.executionexception: com.microsoft.windowsazure.mobileservices.table.sync.localstore.mobileservicelocalstoreexception: java.lang.nullpointerexception 02-08 11:23:38.666 4742-5196/com.knowledgeflex.task w/system.err: @ com.google.common.util.concurrent.abstractfuture$sync.getvalue(abstractfuture.java:299) 02-08 11:23:38.666 4742-5196/com.knowledgeflex.task w/system.err: @ com.google.common.util.concurrent.abstractfuture$sync.get(abstractfuture.java:286) 02-08 11:23:38.666 4742-5196/com.knowledgeflex.task w/system.err: @ com.google.common.util.concurrent.abstractfuture.get(abstractfuture.java:116) 02-08 11:23:38.666 4742-5196/com.knowledgeflex.task w/system.err: @ com.knowledgeflex.task.unit_activity$6.doinbackground(u

sparc - What's the proper way to update a value passed in assembly? -

i'm using sparc architecture. have update number of long passed argument without returning it, don't know how because input registers used both parameters , returning value. i've seen using instructions such as add %l0, %l1, %i1 that it's possible modify contents of register, far can tell changes "copy" of parameter rather parameter itself. i've experimented load command , store command in ways such as ld [%o1], %i1 and st %l1, [%fp-8] and don't seem change need changed. i figured out. save instruction makes argument available in in register (in case, %i1), , there it's just st %l1, [%i1 + 1] and have make sure number in place of 4 compatible number of bytes between elements of array. in case +1 works char array.

Unable to load SDK manager in android studio -

Image
when tried install android studio, encounter following problem i have installed haxm intel , enabled vt-x prblem still exist. android studio not show sdk manager. i have tried uninstalling , reinstalling android studio. set java_path environment variable install haxm intel enable vt-x what did wrong ? try this: add c:\windows\system32 path environment variable. should open control panel, go system -> environment variables , find path in system variables , add following entry @ beginning: %systemroot%\system32;

error:duplicate class: a.b.c.R in android studio -

i'm facing issue in android studio when compile project error throwing error:duplicate class: a.b.c.r i've included 5 third party libraries out of 1 included library project remaining 4 libraries included dependency urls thx in adv. update hi added build.gradle (app) thx in adv.

php - Prepare not defined -

i have tried setting sessions stored in database.i have achieved through implementing sessionhandlerinterface class.however havenot used prepared statements before want implement prepared statements in order make sql injection proof.however , when try prepare method shows me error method prepare not defined in class i tried extending mysqli_stmt class contains methods prepared statements. this full code of session class stores sessions inside database. http://codepad.org/kmlto9ym part of code make question more clear class syssession implements sessionhandlerinterface { private $link; public function open($savepath, $sessionname) { $link = new mysqli("localhost","root","","cakenbake"); if($link){ $this->link = $link; return true; }else{ return false; } } public function close() { mysqli_close($this->link); return true; } public function read($id) { $res

How do I find out if a integer variable in python has an out of scope hidden value? -

in code here how force static methods use local not global variables in python? i have variable being passed between methods besides 1 in question. variable current_line def line_tocsv(csv_dict={}, line={}, current_line=0): csv_line, current_line = linehandler.create_csv(current_line, kline) if current_line in csv_dict: csv_dict[current_line].update(csv_line) else: csv_dict[current_line] = csv_line return csv_dict when code run, produced output simmilar this >>> a={0:{"aa":1,"bb":"wasd"},1:{"aa":1,"bb":"wasd"}} >>> {0: {'aa': 1, 'bb': 'wasd'}, 1: {'aa': 1, 'bb': 'wasd'}} >>> a[1].update({"cc":"foo"}) >>> {0: {'aa': 1, 'cc': 'foo' 'bb': 'wasd'}, 1: {'aa': 1, 'cc': 'foo', 'bb': 'wasd'}} how make csv_l

PowerBi DAX equivalent for SUMIFS with current row value as filter -

in excel could, if in table called 'sales' had 4 columns sales month, customerid, productid, totalquantity jan,1, car, feb,1, car, i add formula: =sumifs(sales[quantity],sales[customerid],[@[customerid]]) that go sales table , sum customerid column filtered customerid of current row formula has been entered. i attempted replicate in powerbi calculated row can't @ working row reference. comes across like totalquantity = calculate(sum(sales[quantity]),sales[customerid] = sales[customerid])) any idea how equivalent @ working? i think key function missing earlier. not surprising because has misleading name - means "current row". need filter function in filter parameter of calculate, reset filter context entire table. so new column function might this: totalquantity = calculate(sum(sales[quantity]), filter(sales, sales[customerid] = earlier (sales[customerid]))) here's neat example, accessible source site dax formulas: http://

keystore - Keytool command to generate a .P12 from a .JKS file -

i trying generate .p12 k .jks file using keytool utility provided jdk. keytool -importkeystore -srckeystore mykeystore.jks -destkeystore mykeystore.p12 -srcstoretype jks -deststoretype pkcs12 however, command works java 1.6 , above. need execute command machine not have jdk 1.6 or higher one. have there jdk 1.5. what equivalent of command if have run jdk 1.5 installation. please provide here. thanks, maneesh sharma you cannot importkeystore on java 5, feature introduced java 6. you can refer documentation of java 5 , java 6 . if looking @ importing, can refer -import command (pre java 6).

android - Material Design build.gradle error -

Image
i have problem in build.gradle file, compilesdkversion , buildtoolsversion doesn't match. here build.gradle : apply plugin: 'com.android.application' android { compilesdkversion 22 buildtoolsversion '23.0.2' defaultconfig { applicationid "com.emergencyapp" minsdkversion 18 targetsdkversion 22 versioncode 1 versionname "1.0" multidexenabled true } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } dexoptions { predexlibraries = false } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.2.1' compile 'com.android.support:design:22.2.1' compile 'com.jakewharton:butterknife:6.1.0' com

C# P/Invoke 2 dimensional array -

i trying call c function c# code: typedef char iptriggernametype[256]; typedef unsigned long comm_handle; typedef byte guid_type[16]; typedef long longint; typedef struct { guid_type guid; iptriggernametype name; }ipcam_generic_event_id; typedef struct { ipcam_generic_event_id eventid; longint relatedtriggerid; longint obsoleteevent; }ipcam_generic_event_info; typedef struct { longint numofevents; ipcam_generic_event_info *genericeventslist; }vid_channel_generic_events_struct; int __stdcall getgenericevents( /* inputs: */ comm_handle handle, longint maxnumofchannelsintable, longint maxnumofeventsperchannel, /* outputs: */ longint *numofchannels, vid_channel_generic_events_struct *channelseventstable)

php - How do URLs work?

i have build urls of site stack overflow urls. urls below. http://www.example.com/1255544/this-is-the-url-text in url, 1255544 id , this-is-the-url-text url title text, both stored in database. have noticed stack overflow urls work on base of id. suppose here stack overflow url http://stackoverflow.com/questions/15679171/new-way-to-prevent-xss-attacks in url, 15679171 id of post. when changed id 15706581 without touching new-way-to-prevent-xss-attacks , pressed enter, url automatically changed following url: http://stackoverflow.com/questions/15706581/simplecursoradapter-does-not-load- external-sqlite-database-id-error and when tried remove of part of url title text below http://stackoverflow.com/questions/15679171/new-way-to-preve it automatically corrects url below: http://stackoverflow.com/questions/15679171/new-way-to-prevent-xss-attacks it means data being retrieved database on basis of id 15679171 , relevant url title text, new-way-to-prevent-xss-at

how to find repeated value and count in mysql -

i have table 3 columns, how find value if appears next 3 times i.e 1st trnas_value appears in next 3 consecutive times (repeaded 4 times) , 2nd , 6th rows repeated same.date column sorted a_z date tran_val name 23mar 22 mark 24mar 22 mark 25mar 22 mark 26mar 22 mark 27mar 22 mark 28jan 99 john 29jan 99 john 30jan 99 john 31jan 99 john output name trans_value consecutive_count mark 22 2 john 99 1 we have code not giving above output.. select name, tran_val, max(cnt - 3) consecutive_count ( select date, tran_val, name, @cnt:=if

Unable to connect R rhdfs APIs with Hadoop Cluster, which is running on different IP address -

add hadoop home sys.setenv("hadoop_home"="ssh://root@192.168.10.70/home/easy/hadoop") set hadoop cmd path sys.setenv("hadoop_cmd"="ssh://root@192.168.10.70/home/easy/hadoop/bin/hadoop" ) sys.setenv("java_home"="/usr/java/jdk1.7.0_67-cloudera") sys.setenv("hadoop_streaming"="ssh://root@192.168.10.70/home/easy/hadoop/share/hadoop/tools/lib/hadoop-streaming-2.6.0.jar") sys.setenv("hadoop_lib"="ssh://root@192.168.10.70/home/easy/hadoop/lib") load library rhdfs library(rhdfs) initialize hdfs hdfs.init()

javascript - getting undefined php value in angular js file -

i have php session variable set in index.php file. using ng-init assigning session value variable can use in angularjs controller file. index.php file <body ng-app="myapp"> <div ng-controller="restaurantcontroller" ng-init="total=0;something='<?php echo $_session['rname'] ?>'" class="container"> <div class="col l4 s4 container"> <label>search</label> <input type="text" ng-model="search.name"> </div> <div ng-repeat="item in items | filter:search" class="container"> <h3>{{item.name}}</h3> <p>category:{{item.category}}</p> <p>price:inr {{item.price}} /-</p> <br/> <button ng-hide="item.added" ng-click="process(item)">add</button> <button ng-show

linux - FBDEV(0): FBIOPUTCMAP: Invalid argument error in Xorg.0.log file -

my qt application plays video shows blank videowidget window. when remove xorg.conf file /etc/x11/ directory on debian jessie 8.2 , restart system, video starts play, there lack of colors on whole display. - kernel version is: 4.1.15-ti-rt-r40 - platform: beaglebone black i found error reported bug on this link , old thread. problem in graphic card drivers built bb under debian jessie 8.2?

ssas tabular - How to count orders with condition A and B in dax -

i have table order number , product code. 1 order can have multiple lines. count number of orders have both product code , product code b. my table looks this: ordernumber productcode order1 order1 b order2 b order3 order3 b order4 c so result set, answer 2, both order1 , order3 contains both , b. i create measure in dax. thank you. try this: sumx( calculatetable( values(mytable[ordernumber]), mytable[productcode] = "a" ), if(calculate(countrows(mytable),mytable[productcode] = "b") > 0,1) )

java - winrun4j - Unable to create service -

i have service created using winrun4j java application. getting following error while installing service. c:\logintester>service.exe --winrun4j:registerservice [info] module name: c:\logintester\service.exe [info] module ini: c:\logintester\service.ini [info] module dir: c:\logintester\ [info] ini dir: c:\logintester\ [info] registering service... [err] not create service: 1072 in case got resolved logging off other users on server , closing of service manager, task manager applications.

What is the best way to homogenize full datas between Magento or Prestashop and others platforms? -

administrators of several e-commerce sites based on magento , prestashop, wish automate broadcasting of information (products, customers, orders ...) other platforms (cdiscount, amazon, counted software, social networks. ..) there default magento module seems limited products , customers, there there other modules or other means link magento , prestashop other platforms? you can use lengow.com solution. there existing modules both magento , prestashop link shop many marketplaces.

php - Error while updating table value -

this question has answer here: how 3 table join in update query? 4 answers i have 2 tables: table1 , wp_posts . first 1 custom table, second 1 wordpress one. i want change post types in wp_posts match criteria post_title same headline in table1 , type_id key equals 41. i tried selecting kind of posts select * wp_posts left join table1 on table1.headline = wp_posts.post_title table1.type_id = 41 and correct posts (i'm doing in phpmyadmin). so tried with update wp_posts set wp_posts.post_type = 'jobs' wp_posts join table1 on table1.headline = wp_posts.post_title table1.type_id = 41 and error #1064 - have error in sql syntax; check manual corresponds mariadb server version right syntax use near 'from wp_posts join table1 on table1.headline = wp_posts.post_title w' @ line 1 the table (roughly) table1 headline | type_i

convert maven jar and copy resources plugin to gradle -

Image
i new gradle , trying convert pom gradle.build. have convert dependencies part , converting plugin part. have following in pom <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <version>${maven-dependency-plugin.version}</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <includegroupids> junit, org.apache.logging.log4j, org.springframework, aopalliance, org.springframework.data, javax.inject, org.hibernate, javax.el, com.microsoft.sqlserver, org.apache.commons, com.jcraft, com.sun.mail, org.apache.velocity, commons-lang, commons-logging,

jvm - Xtext and Xtend: Interfaces inside folder -

i saw classes generated inside separate folder/package. interface files generated in root folder instead of generating inside specific package. here code jvm inferrer: def dispatch void infer(repository repo, ijvmdeclaredtypeacceptor acceptor, boolean isprelinkingphase) { acceptor.accept(repo.tointerface(repo.name, [])) [ documentation = repo.documentation annotations += annotationref(repository); supertypes += jparepository.typeref(repo.type.clonewithproxies,long.typeref); ] } here model: import dsltest.models.plant import dsltest.models.customer package dsltest.repositories { repo plantrepository : plant {} repo customerrepository : customer {} } here generated files: screen shot of src-gen how make interface generate inside dsltest-> respositories -> customerrepository.java the first parameter of tointerface method should qualifiedname e.g. accept(entity.to

functional programming - Have to work with object which has Set of enties using Java 8? -

i have implement method following signature: public set<event> getfordaterange(calendar from, calendar to) my event class looks like: public class event { private integer id; private string name; private integer price; private rating rating; private set<calendar> eventdatetime; i can not find how datetimes event. here have far: public set<event> getfordaterange(calendar from, calendar to) { set<event> result = collections.emptyset(); set<event> allevents = getall(); (event event : allevents) { set<calendar> eventdatetime = event.geteventdatetime(); result.addall(eventdatetime.stream() .filter(date -> date.after(from) && date.before(to)) .map(date -> event) .collect(collectors.toset())); } return result; } i using mixture of iterative style functional. how write method using functional style only? your curr

android - RecyclerView not updating its views when updated with new data -

i have recyclerview recyclerview.adapter implementation, has list of objects plus header , footer view, , switching on viewtype show header position 0 , footer position getitemcount() (my "getitemcount()" implementation returns "data.size() + 2" accommodate header , footer). works great, header , foot shown @ correct places, when reach end of list , footer shown, load more data , add "data" list, , want footer view replaced next loaded data view, not happen. have tried alle different "notifyx" methods on adapter, seems not updated until scroll list (and works want). what missing here? how force recyclerview redraw last element in list? my adapter: private class transactionsadapter extends recyclerview.adapter { private list transactions; private static final int type_header = 0; private static final int type_item = 1; private static final int type_footer = 2; private transactionsadapter(list tra

scala - How to run Play with -feature? -

this how run play: activator ~run i'm getting following warnings: [warn] there 27 feature warnings; re-run -feature details but if run play command don't see warning details: activator ~run -feature how run play -feature? add scalacoptions ++= seq("-feature") in build.sbt file.

Use GIT and Gitlab -

we want use git , gitlab in our team. far worked git on local comuter. question: possible use normal git version in combination online repository gitlab? thank much it safe make work if git version must no earlier 1.7.10, explained in doc . also, note gitlab uses normal git in backend. merely web frontend of git.

mysql - If value already exists in array then issue an error in PHP -

Image
i have code wherein checks if value exists in array. basically, program first stores values in array. checked using count(array_keys) function. there 3 inputs. if in 3 inputs, value occurs twice or thrice, issue error. now, problem if input , input b same input c different, still add database, if input , c same input b different not add (which correct). here php code: <?php include 'config.php'; if(isset($_post['update_actual_lupong'])){ $id = isset($_get['id'])? $_get['id'] : ""; $id_hearing = $_post['hearing_lup']; $lupong = $_post['act_lupong']; $actual = array(); foreach($lupong $aaa) { $actual[] = $aaa; } if ((count(array_keys($actual, $aaa)) > 1)) { echo '<br><br>this array contains duplicate <br><br>'; } else { foreach ($lupong $lup) { $updatememo = mysqli_query($conn, "insert actuallupon