Posts

Showing posts from June, 2013

CSS for Making Email Opt-In Fit Mobile Devices -

i need making email opt-in bar under header @ same on mobile devices on desktop. here website. i not skilled in kind of coding appreciated! :) here css using: /* color , size of main bar */ #nsu-head { background-color: #ffcfde; padding: 34px; } /* basic text color , placement */ #nsu-head p { float: left; color: #000000; margin-top: -5px; padding-right: 10px; } /* placement of invitation text */ #nsu-head p.form_label { text-transform: uppercase; padding-left: 50px; padding-right: 30px; margin-top: 0; } #nsu-form-1 label { display: none; } /* hides input field labels */ /* input button styling going circle drop shadow */ input#nsu-submit-1 { /* remove if don't care ie8 */ } .type1 { width: 100px; height: 100px; background: yellow; border: 3px solid red; } /* controls background color during inactive , hover states */ input#nsu-submit-1.nsu-submit { background: no-repeat darkmagenta; border: 1px sol

php - Cant login: mysqli_query() expects at least 2 parameters, 1 given -

i have login script doesn't work anymore. has new mysqli. changed mysql query mysqli still errors: if (empty($errors)){ $query = "select id, username "; $query .= "from users "; $query .= "where username = '{$username}' "; $query .= "and hashed_password = '{$hashed_password}' "; $query .= "limit 1"; $result_set = mysqli_query($query); confirm_query($result_set); if (mysqli_num_rows($result_set) == 1){ $found_user = mysqli_fetch_array($result_set); $_session['user_id'] = $found_user['id']; $_session['username'] = $found_user['username']; redirect_to("faculty.php"); } else { $message = " username / password incorrect."; } that code, mysqli_query($query); problem. when change mysqli_query($connection , $query); , don't error anymore message: username / password incorrect.

python 2.7 - Pandas dataframe applying NA to part of the data -

let me preface new @ using pandas i'm sorry if question basic or answered before, looked online , couldn't find needed. i have dataframe consists of baseball teams schedule. of games have been played , result results game inputed in dataframe. however, games yet happen, there time played (eg 1:35 pm). so, convert of values of games yet happen na's. thank you as requested here results dataframe arizona diamondbacks contains print mlb['ari'] 0 0 1 0 2 0 3 1 4 0 5 0 6 0 7 0 8 1 9 0 10 1 ... 151 3:40 pm 152 8:40 pm 153 8:10 pm 154 4:10 pm 155 4:10 pm 156 8:10 pm 157 8:10 pm 158 1:10 pm 159 9:40 pm 160 8:10 pm 161 4:10 pm name: ari, length: 162, dtype: object couldn't figure out direct solution, iterative for in xrange(len(mlb)): if 'pm' in mlb.['ari'].iat[i] or 'am' in mlb.['ari'].iat[i]: mlb.['ari'].iat[i] = np.n

r - Moving table created by annotation_custom with geom_bar plot -

Image
i tried searching answers couldn't find anything. i have have plot , want add table within plot itself. can table ends being right in middle. it possible relocate table created annotation_custom if x-axis discrete? if so, how? thank you! for example, want relocate table. library(ggplot2) library(gridextra) my.summary <- summary(chickwts$weight) my.table <- data.frame(ids = names(my.summary), nums = as.numeric(my.summary)) ggplot(chickwts, aes(feed, weight)) + geom_bar(stat = "identity") + annotation_custom(tablegrob(my.table)) the custom annotation in ggplot2 can rearragned inside plotting area. @ least moves them out of center. maybe solution sufficient you. i'll try , tweak this. should possible put outside plotting area well. library(ggplot2) library(gridextra) my.summary <- summary(chickwts$weight) my.table <- data.frame(ids = names(my.summary), nums = as.numeric(my.summary)) ggplot(chickwts, aes(feed, wei

image shows result in VS2010 but not showing output in Android using OpenCV -

Image
my code works in visual studio using opencv. not showing output in android ndk application, , not showing error below code. void sow(mat& img1, mat& img2, mat& out) { mat result(img1.size(), cv_32fc4); img2 = mat(img1.size(), img1.type(), scalar(186, 44, 28, 0)); (int = 0; < img1.size().height; ++i){ (int j = 0; j < img1.size().width; ++j){ (int c = 0; c<img1.channels(); c++){ // iterate through colors //formula float target = (float)img1.at<uchar>(i, 4 * j + c) / 255.; float blend = (float)img2.at<uchar>(i, 4 * j + c) / 255.; if (blend > 0.5){ result.at<float>(i, 4 * j + c) = ((1 - (1 - target) * (1 - 2 * (blend - 0.5)))); } else{ result.at<float>(i, 4 * j + c) = (target * (2 * blend)); } }

jquery - How can I force browser to follow a div which is going to be shown? -

Image
a <div> or <pre> on bottom of page, going toggled/shown by: $(document).ready(function(){ $("#slice_img").click(function(){ $("#slice_pre").slidetoggle("slow"); }); }); and text appeared on bottom. how can automatically chase , follow text going shown browser user, himself, won't need scroll down see newly-appeared text? i don't want scroll down end of page! want browser follow exact text, while slide down in order appeared. you may (!) understand better picture. something along these lines should work (if understand correctly): demo $(document).ready(function(){ $("#slice_img").click(function(){ $("#slice_pre").slidetoggle("slow", function() { // add callback function slidetoggle $('html, body').animate({ scrolltop: $("#slice_pre").offset().top }, 1000); }); }); }); though should using classes instead of id&#

sql server - How To Shorten This SQL Query Without A Million AND/OR's? -

i have table 13 columns (one row id # , other 12 represent 1 each month of year). each column contain numbers , want write several queries check each row conditions , return id of rows match. so far i've been fine writing basic select queries i'm getting bit stuck on writing select queries check multiple conditions @ once without writing million lines of code each time. the current query i'm writing needs check each pair of consecutive months (e.g. jan/feb, feb/mar, etc) see how big difference between them , needs return rows 2 lots of consecutive months have > 20% difference between them , remaining pairs < 10% difference. for example, if january 1000 , february 1300, that's 30% difference that's 1 lot. if april 1500 , may 2100, that's 40% difference there's 2nd lot. long every other pair (feb/mar, mar/apr, ..., nov/dec) < 10% difference each, row needs returned. unfortunately, way can work manually checking every single possibility

search - Declare array into searchFields Worklight JSONStore -

i have json object collection jsonstore this: { name : 'name1', industry : ['banking', 'energy', 'insurance', 'media', 'retail', 'telco', 'travel'], buyer : ['cmo'], link : 'foo.com' } but, how possible declare industry field searchfields?, in order search pattern in array. cheers there's no array type search fields. can index values in objects string , boolean , number , integer . you change: { industry : ['banking', 'energy'] } to: { industry : [{name: 'banking'}, {name: 'energy'}] } and use following search field: {'industry.name' : 'string'} . enable wl.jsonstore.get('collection').find({'industry.name' : 'banking'}, {exact: true}) , object one: [{_id: ..., json: {name: ..., industry: [..., {name: banking}, ...], buyer: ..., link: ...}}] this documented under search field secti

Check which characters exist in string (Ruby) -

i'm attempting create function detects characters exist in string. function returns 26 character long string. string have 1 or 0 in character's position in string depending on whether character found or not. if b , z found function return 01000000000000000000000001 this have far. def convert(str) alpha = ("a".."z").to_a.join alpha.each_char |i| num = 0 (str.include? i) ? (alpha[num] = 1) : (alpha[num] = 0) num =+ 1 end print ans end convert("a 345 % b ^ xxz") however, keep getting error on 5th line: no implicit conversion of fixnum string (typeerror) not sure how around this. tips? you can't assign number string. replace 1 , 0 on line "1" , "0" . also, think mean num += 1 instead of num = +1 !

javascript - AngularJs. Problems with ng-repeat -

i'm having 2 tables witch renders data trough angularjs, coming 2 c#-methods. tables structured same. first 1 below used searchfield , other 1 used basiclly render names. problem first 1 works perfect, other 1 not. , don't see problem. appreciated. // thanks! here 2 tables. (the first 1 working) <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.18/angular.min.js"></script> <div ng-app="searchapp"> <div ng-controller="searchcontroller"> @*first table works*@ <span style="color: white">search:</span> <input data-ng-click="myfunction()" ng-model="searchtext"> <table style="color: white" id="searchtextresults"> <tr><th>name</th></tr> <tr ng-show="!!searchtext.length

python - django register user with django-facebook -

ok see saying use django-facebook, , says can want. have installed on app , example page works, how register user it? apart installation rest of docs seem autogenerated , have yet find step step guide how register user on site using django-facebook. here working example of facebook auth django. facebook uses oauth2 federate user logins. oauth2 authorization step-by-step consists of create authorization token calling request-token url consumer keys send user authorize url token created , callback url once authorized user redirected callback url auth-token convert auth-token access token @ request-token url save access token , use make authorized requests

SharePoint problema with fba usng LDAP -

i configured webapp use fba authentication using ldap connection. used instruction provided site http://davidmsterling.blogspot.com.br/2013/05/setting-up-forms-based-authentication.html when connect using windows authentication it's works well, when try connect using fba sharepoint show message sorry, site hasn't been shared you. any sugestion? tks

javascript - Ajax page reloading + Foundation -

i have issue website: http://td.lbmedia.pl after clicking on menu's link page smoothly reloads using ajax but... foundation javascripts going down. can suggest me problem? the issue event handlers being destroyed after ajax page load, 1 way solve issue (since couldn't find documentation plugin) using global ajax event handlers $( document ).ajaxcomplete(function() { $(document).foundation(); });

sails.js - sails lift fails when performing alter auto-migration strategy by trying to do select with IN() without ids in IN() -

when lifting sails, fatal error when trying perform alter auto-migration strategy. error message not helpful , traced find things sails lift performing caused error. these last queries executed (look @ last query). describe `class` show index `class`; select `class`.`name`, `class`.`schoolfk`, `class`.`id`, `class`.`createdat`, `class`.`updatedat` `class` drop table `class` describe `class` create table `class` (`name` varchar(50) , `schoolfk` int , `id` int not null auto_increment primary key, `createdat` datetime , `updatedat` datetime ) describe `class` show index `class`; insert `class` (`class`.`name`, `class`.`schoolfk`, `class`.`id`, `class`.`createdat`, `class`. `updatedat`) values ('9 n', 1, 7, '2014-08-16 22:35:07', '2014-08-16 22:35:07'); insert `class` (`class`.`name`, `class`.`schoolfk`, `class`.`id`, `class`.`createdat`, `class`. `updatedat`) values ('9m', 1, 9, '2014-08-16 23:07:53', '2014-08-16 23:07:53'); insert `cl

algorithm - a lot of decimal value storage in C++ -

i wanted write program returns how many months survive when we're given our monthly expenditure, amount of disposable income, , interest rate (all in integers). instance, if start disposable income = 1000, interest rate = 5%, monthly expenditure = 100, after first month: 1000*1.05 - 100 = 950, have 950 dollars left after second month: = 950*1.05 - 100 = 897.5 and on, , in end, can survive 14 months. i wrote following code in c++: int main(){ int i=0; int initialvalue; int interest; int monthly; double value=1.0*initialvalue; double r=1+1.0*interest/100; while(value > 0){ if(value < monthly){ break; } else { value=value*r-monthly; i++; } }; cout<<i; return 0; } but sufficiently large values of initialvalue , small values of monthly, program wrote runs degree it's unusable. there problem code makes run not (or slow)? any appreciated. double cannot store numbers precisely. 1 consequence of when subtra

android - ListView works in emulator, but not in phone -

i tried make simple application take api internet, rearrange them , show list. in emulator works. phone shows white screen. phone has android 2.3.7. when tried on tablet, app stopped working. tablet has android 4.1. mainactivity public class mainactivity extends listactivity implements onitemclicklistener{ private progressdialog pdialog; private string url = "http://www.cscpro.org/secura/market/"; //food-29-5.json; private string res; private string ql; jsonarray market; final static string resources = "res"; final static string quality = "q"; private static final string tag_offer = "offer"; private static final string tag_price = "price"; private static final string tag_saller = "seller"; private static final string tag_saller_name = "name"; arraylist<hashmap<string, string>> listsaller; public void oncreate(bundle savedinstancestate) {

mysql - SQL Query: How to filter for each set of value in the column? -

currently using sql fiddle insert below statment. create table table1 ( rn int, pc varchar(25), pc1 varchar(25), grp varchar(25), e_id varchar(25) ); insert table1 (rn, pc, pc1, grp, e_id) values(111, 'a1', 'a1', '175', '100'); insert table1 (rn, pc, pc1, grp, e_id) values(111, 'a1', 'a1', '100', '90'); insert table1 (rn, pc, pc1, grp, e_id) values(112, 'b1', 'b1', '101', '90'); insert table1 (rn, pc, pc1, grp, e_id) values(112, 'b1', 'b1', '100', '90'); insert table1 (rn, pc, pc1, grp, e_id) values(112, 'b1', 'b1', '100', '90'); insert table1 (rn, pc, pc1, grp, e_id) values(113, 'c1', 'c1', '100', '90'); **as can see there 2 distinct rn numbers.** select * table1 rn in(select rn table1 group rn having count(*)>1) , (pc = pc1) , grp in (select max(grp) table1)

php - Deleting Table Data Before Inserting New Data -

i have these 2 tables, table , table b. before updating table b want delete it's datas before inserting new one. i have query delete data in table , insert new 1 after succeeded in deleting old records. inserting values it's not deleting old one, ended duplicating of new id's inserted before. tried code: public function editdiscount(){ foreach ($this->searchfields $field => $value) : if($field == 'key'){ $key = $value; } else if($field == 'name'){ $discountname = $value; } else if($field == 'code'){ $discountcode = $value; } else if($field == 'desc'){ $discountdesc = $value; }else if($field == 'type'){ $discounttype = $value; }else if($field == 'trans'){ $discounttransaction = $value; }else if($field == 'exptype'){ $expiration = $value; }else if($fie

c++ - How to generate random numbers in a range? -

i'm studying arrays , can't figure out i'm doing wrong. i need output array 8 random generated numbers between 5 , 25. before down voting question : /, tried looking similar questions on stackoverflow of them contain use of algorithm's or different kinds of sort-techniques. cannot use technique's in answer. 'should' easier solve this. where problem in code , why doesn't random number generate new number while i'm looping trough array? int table[8]; int random_number= rand() % 25 + 5; (int i=0; i<8; i++) { table[i] = random_number; cout << table[i] << " "; } as compile , run it, gives me 8 times same number, i'm letting array loop through each single index, while putting random number in it? on paper should work normally, right? is there can explain did wrong , why loop not working correctly? in c++11, random facilities may do std::default_random_engine engine; // or other engine std::m

simple form - How do I set minimum length of my Simple_Form textarea? Ruby on Rails -

i curious how should change validation setting of simple_form allows me set minlength textarea. how shall manage that? thank you! no, simple form doesn't provide validation textarea . have use javascript, guess jquery-validation fits here. it worth mentioning can take advantage of html5 validation attribute i.e maxlength text area. and, in case if don't know generate required textarea wrapper... how <%= f.input :name , as: :text , :input_html => {:minlength => 10 , maxlength: 25} %>

bash - how to redirect stdout and stderr to a file while showing stderr to screen? -

the script should redirect output (stdout , stderr) log file, , display stderr screen (notifying user if error happens). command tee may don't know how write it. thanks. p.s., lihao , konsolebox answer, there way keep output in order. example: $ cat test.sh echo "to stdout..1" echo "to stderr..1" >&2 echo "to stdout..2" echo "to stderr..2" >&2 $ sh test.sh 2>&1 >test.log | tee -a test.log stderr..1 stderr..2 $ cat test.log stdout..1 stdout..2 stderr..1 stderr..2 command: { sh test.sh 2> >(tee /dev/fd/4); } 4>&1 >test.log has same output. how following: cmd args 2>&1 >logfile | tee -a logfile

sql - How can I update/delete data on my table in C# using OOP? -

i'm done adding of data on table , works fine. i'm done coding update , delete function on class, it's not updating table. no errors found on program. here's code: public void studentupdate(string id, string lastname, string firstname, string middlename, string suffix, string age, string gender, string paddress, datetime birthday) { result.query = "update tbl_student set lastname = '" + lastname + "', firstname = '" + firstname + "', middlename = '" + middlename + "', suffix = '" + suffix + "', age = '" + age + "', gender = '" + gender + "', pmt_address = '" + paddress + "', birthday = to_date('" + string.format("{0:mm/dd/yyyy}", birthday.toshortdatestring()) + "','mm/dd/yyyy') std_id = '" + id + "'"; result.transaction = true; result.executenonquery(); studen

ndef - Developing custom functions in NFC -

i watched youtube video: http://youtube.com/watch?v=td_o6m6zdlo it shows how nfc works device. opening app , etc. if want develop own nfc tag functions like, example, store user's facebook profile link , when tap on tag, particular page. based on understanding towards nfc, have write codes tag , reader reads codes in tag , perform actions or functions written in tag (correct me if wrong). i browsed through website http://www.buynfctags.com/bundles/gototags-nfc-encoder-starter-kit.html , http://www.identivenfc.com/en/nfc-software-development-kit-sdk/nfc-solutions-development-kit-sdk.htm my question can develop function mentioned above using software website if buy it? note that: won't andriod device. (i think) reader , tag. , writing codes tag (correct me if wrong). i assume refer nfc tags containing ndef messages (as specified nfc forum). a typical nfc tag scenario involve work on both sides, tag , reader. you create ndef message write on tag. ndef m

swift - How do you load a .dae file into an SCNNode in iOS SceneKit? -

i having trouble understanding how geometry .dae files should loaded ios scenekit scene graph. i know can load .dae files directly scnscene: // create new scene let scene = scnscene("test.scnassets/test.dae") i know can create empty scnscene , add built-in 3d objects child nodes: let scene = scnscene() var spherenode = scnnode() spherenode.geometry = scnsphere(radius: 1.0) scene.rootnode.addchildnode(spherenode) in second case, can load .dae file scnnode instead of using built in objects? or expected .dae files need loaded scnscene first? if latter true, how place scnnode objects right place in scene graph hierarchy under scnscene?edit #1: this working me now, modified version of @flippinfun suggested. let url = nsbundle.mainbundle().urlforresource("test.scnassets/test", withextension: "dae") let source = scnscenesource(url: url, options: nil) let block = source.entrywithidentifier("id10", withclass: scngeometry.self) scng

audio - How to handle failed AudioFocus requests in Android? -

i working on application has media playing features. i honor audiofocus . first request audifocus : audiomanager.requestaudiofocus(new customonaudiofocuschangelistener(), audiomanager.stream_music, audiomanager.audiofocus_gain); this call returns either audiofocus_request_failed or audiofocus_request_granted . guess shouldn't start playback if receive audiofocus_request_failed . do? will customonaudiofocuschangelistener notified when focus becomes available or when got autofocus_request_granted starts getting updates? should inform user , ask him try again later? or retry programmatically after time? thanks in advance what depends on how want app react. shouldn't start playing, may want message user. or if non-critical, may silently ignore failure , move on. i believe updates on listener on success. updates if you're lowered can choose duck output or pause until regain.

spring mvc - java.util.zip.ZipEntry and apache compress ZipEntry corrupt some image files -

i have been using spring's multipart uploader controllers upload , store entries zipped files, finding occaisional png file being corrupted, instead of begginning "png..." in byte[], starts "fþ»Ã€ÃƒgÞÉ" or similar. seems happen same files on each run. tried of using java.util.zipentry , tried apache compress , found apache compress corrupted different files java 7 utility, same files on subsequent runs. the code (firstly java.util.zip.zipentry): protected void processzipfile(string path, multipartfile file, string signature) throws ioexception { dateformat df = new simpledateformat("yyyymmddhhmmss"); file tempfile = new file(system.getproperty("user.dir") + "/" + file.getname() + df.format(new date())); file.transferto(tempfile); zipfile zipfile = null; try { zipfile = new zipfile(tempfile); log.debug("processing archive name={}, size={}.", file.getname(), file.getsize());

c - Why the nested 'for' loop is not working in the below program? -

#include<stdio.h> #include<conio.h> void main() { int m,a,i,b; printf("enter number upto prime number displayed:"); scanf("%d",&m); for(a=1;a<=m;a++) { for(i=1;i<=a;i++) { if(a%i==0) { b++; } } if(b==2) { printf("\t%d",a); } } getch(); } initialize b @ beginning of code, , inside loop: #include<stdio.h> #include<conio.h> void main() { int m,a,i,b=0; // initialize b printf("enter number upto prime number displayed:"); scanf("%d",&m); for(a=1;a<=m;a++) { for(i=1;i<=a;i++) { if(a%i==0) { b++; } } if(b==2) { printf("\t%d",a); } b=0; // re-initialize } getch(); }

mysql - How can i show dynamic row data into dynamic column -

hi have 1 table have 2 colums want show column 2 data in different column nothing fix every thing dynamic column creation based on rows table 1 id col1 col2 1 x aa 2 x bb 3 x cc 4 y ww 5 y ee 6 z hh 7 z tt 8 z uu 9 z pp 10 z oo i want table1 data in format id val1 val2 val3 val4 val5 val6 1 x aa bb cc null null 2 y ww ee null null null 3 z hh tt uu pp oo can 1 please me out how can in mysql this result: | id | val1 | val2 | val3 | val4 | val5 | val6 | |----|------|------|------|--------|--------|--------| | 1 | x | aa | bb | cc | (null) | (null) | | 4 | y | ww | ee | (null) | (null) | (null) | | 6 | z | hh | tt | uu | pp | oo | from query: select min(id) id , col1 val1 , max(case when colno = 1 col2 end) val2 , max(case when colno = 2 col2 end) val3 , max

c# - Changing sepecific text in a specific line in text file -

here text line in aspx file want change <center><body link=blue vlink=purple class=xl65 onload="processdata();"><form id="mainform" action="http://localhost/xlez/datahandler/submit.aspx" method="post" enctype="multipart/form- data"><input type="hidden" id="hid_extra" name="hid_extra" value="machine_inspection_20140807162226.xlsx||machine_inspection||excavator inspection||excavator inspection|forklift inspection|tractor inspection"/> my code finds line, want change action of form in line, here code changes whole line want change specific text string form_action ="http://\" + request.url.authority+\"/xlez/datahandler/submit.aspx\""; while ((line = sr.readline()) != null) { if (line.contains("form id=\"mainform\"")) {

Unit testing ReactiveUI view models and commands -

Image
i have working view implemented using reactiveui , i'm trying write unit tests view model, view model doesn't seem work when used test. specifically, executing commands not seem trigger subscribers. in test below, invoking addplayer command subscribed handler not run: public class newgameviewmodeltests { private newgameviewmodel viewmodel; public newgameviewmodeltests() { viewmodel = new newgameviewmodel(); } [fact] public void canadduptosevenplayers() { foreach(var in enumerable.range(1, 7)) { viewmodel.newplayername = "player" + i; viewmodel.addplayer.execute(null); assert.equal(i, viewmodel.players.count); } } } here's view model i'm testing: public class newgameviewmodel : reactiveobject { public reactivelist<string> players { get; private set; } public reactivecommand<object> addplayer { get; private set; }

javascript - How can I change page during mouse scrolling? -

i want chane website homepage (with url) during mouse scrolling. you can use jquery this.. try out.. jquery change content in div based on scroll position http://www.sitepoint.com/10-jquery-horizonal-scroll-demos-plugins/

php - How to retrieve the value of selected id from a table or "list" -

i'm new in php. need regarding getting value selected id . have list of data inserted database , selected of data database. meaning value of data display on page. what want when select "id=1" table or list direct page display value of "id=1" same "id=2" , onward. link page won't create page each id template value of selected id number table. the traditional , simplest approach is: make "list" database table. add new row table when want add product. put value of primary key column in url, in query string. http://example.com/products.php?product_id=123 read value $_get , use it in database query information needed generate page. output page data in it. prettier urls can achieved url rewriting. might want @ mvc frameworks implement routing , convenient methods define nicer uris.

atlassian - JIRA Reporting on PMI Trend -

we on jira 6.2.3, , tasked add report system default list of reports. the new report should per project , reports pmi (pondered maturity index) trend of project. severity of issue , it's status, able calculate index. it should run (1) on schedule plot trend of index on time; , (2) on-demand real-time index figure. how go creating report , adding list of reports? there suitable plugin that? (free best, of course!)

java - How to specify maven bin in eclipse maven plugin? -

i have eclipse maven plugin coming on centos. how can execute maven command on linx like: mvn clean package [abigail@localhost ~]$ mvn bash: mvn: command not found how should specify path executable of maven plugin in eclipse? or have install maven seperately? thanks. eclipse (m2e) have bundled central parts of maven inside eclipse plugin, why not detected, , not usable. investigation find correct way bootstrap it, have create launcher file manually. if want run maven outside of eclipse, far better off standalone version of maven. mvn command bootstrap maven runtime system correctly, , secondly, able use advice concerning use of maven. maven binaries quite stable, wouldn't need upgrade upgrade eclipse. you can subsequently switch eclipse use external installation if prefer.

command line - download video stream without playback on VLC -

i want keep streaming video stream server without playback. can use vlc so? i using windows vlc. tried following playback still pop up. vlc -i dummy --dummy-quiet http://www.nasa.gov/multimedia/nasatv/ntv-public-ips.m3u8 thank you -i dummy right idea, want direct output file --sout : vlc -i dummy --sout file/ts:output.ts http://www.nasa.gov/multimedia/nasatv/ntv-public-ips.m3u8

javascript - What't the best structure for two AngularJS app? -

i working on blog-style app on anguarjs. has 2 parts. 1 part admin pages editing post, other part view page showing post normal user (maybe apply page theme). now have finished amdin pages used edit post. facing design structure problem when planning post view page. my appcontroller in index page admin pages, page layout designed admin page. navigation bar , menus should not available normal user (if not logged in editor). i can put them , show/hide admin part layout checking login cookie or something. javascript files admin pages not needed "view" post. should separate them 2 app? or should put them use static page navigate them different configuration? what's best design structure in case? p.s. using angularjs , files static file now. involve express if necessary. update: reason want separate them 2 parts post viewed on mobile phone in of case. save data traffic user if admin code won't loaded in post view page. honestly doesn't matter

c# - why my HttpContext.Application variable cannot be access through different Actions in ASP.NET MVC -

i created aspnet mvc program, , want variables can shared every visitor. typed code global.asax: protected void application_start(){ smequeue[] smetime = new smequeue[10]; application["waittime"] = smetime; ... however, can't modify array in application. can read in every actions in contyoller this: smequeue[] arr = system.web.httpcontext.current.application["waittime"] smequeue[]; but after change values in array in action, in other actions still original array assigned in global.asax. modification cannot pass other actions. why , can do? found there many similar questions on stackoverflow, sadly answers not work mine. more codes: i edit variable in action: public actionresult create() { smequeue[] arr = system.web.httpcontext.current.application["waittime"] smequeue[]; arr[0] = new smequeue("hello");//elements of arr null before then access action: public actionresult tryconnect() {

javascript - Why can't console.log be called using .call() -

the below code returns pop-up window 'hello'. alert.call(this, 'hello'); but below code returns error "typeerror: illegal invocation". console.log.call(this, 'hello'); what difference in implements of alert , console.log? alert global method ( window.alert ). if call alert.call(this) , this window object. because log method in console object, expects this console object itself, still calling this ( window ), error. running console.log.call(console, 'test') work fine.

android - Three children on RelativeLayout does not get place to be shown -

hi trying show 4 direct children on relative layout first 1 editext (in 'gone' visibility) , second 1 linearlayout textview , imageview , third listview , fourth linearlayout. listview gets on children. posting below code. <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/scrollview" android:background="@drawable/bg" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.antoinecampbell.gcmdemo.gcmactivity$placeholderfragment"> <edittext android:id="@+id/recepient" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:hint="number"

ImageView inside LinearLayout does not show when "android:layout_weight" on LinearLayout -

Image
here code <linearlayout android:layout_width="wrap_content" android:orientation="horizontal" android:layout_weight="1" android:layout_height="wrap_content"> <radiobutton android:id="@+id/preference_question_optiontwo" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <linearlayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:orientation="vertical"> <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher" /> <textview android:layout_height="wrap_content" android:layout_width="wrap_content"/>