Posts

Showing posts from February, 2013

coldfusion 10 - Mura 6 and jquery validations 1.13.1 - Invalid form gets submitted -

i using jquery 1.8.3 , jquery validation plugin 1.13.1 latest validation version. form looks this, <form method="post" class="contact-form" id="frmb5b976ffd59e885191da4d572f6f773a" action="?nocache=1#frmb5b976ffd59e885191da4d572f6f773a" novalidate="novalidate"><input type="hidden" value="true" name="useprotect"> <input type="hidden" value="0" class="cffp_mm" name="formfield1234567891" id="fp6939f8d3-f46a-c008-37330d6aa1b0bed2"> <input type="hidden" value="" class="cffp_kp" name="formfield1234567892" id="fp6939f8d4-fe37-ff6d-ad27dc356205a886"> <input type="hidden" value="39890522,19894825" name="formfield1234567893" id="fp6939f8d6-f82f-92b8-a4b0ba6a966190fa"> <label style="display:none">leave field empty <inp...

javascript - Function shows `undefined` in console -

this question has answer here: how return response asynchronous call? 24 answers my code: function geocodeaddress(address){ var geocoder = new google.maps.geocoder(); geocoder.geocode( { 'address':address }, function(results,status){ if(status===google.maps.geocoderstatus.ok){ var resultsobj = results[0].geometry; var resultslocationobj = resultsobj['location']; var lat = resultslocationobj['k']; var lon = resultslocationobj['d']; var coordinatesobj = { address : address, latitude : lat, longitude : lon }; return coordinatesobj; ...

r - Insert a comma to separate in paste function -

i want display vector this: (using paste function) ("label 1", "label 2", ..., "label 7") however, when use paste function paste("label", 1:7) it cames this: [1] "label 1" "label 2" "label 3" "label 4" "label 5" "label 6" "label 7" #without "comma" between characters. or, trying way paste("label", 1:7, ",") [1] "label 1 ," "label 2 ," "label 3 ," "label 4 ," "label 5 ," "label 6 ," [7] "label 7 ," # "comma" came inside quotation marks what missing in paste function? dput(paste("label", 1:7)) gives c("label 1", "label 2", "label 3", "label 4", "label 5", "label 6", "label 7")

alignment - IPython/Jupyter Align Widgets -

i've been woking jupyter widgets , i'm having problems alignment, example, have next widgets: from ipython.html import widgets wdg #two sliders s1 = wdg.intslider(min=0,max=100,value=25,description='xo') s2 = wdg.intslider(min=0,max=100,value=25,description='yo') #three float text c1 = wdg.boundedfloattext(min=0,max=100,value=5,description='c1 ') c2 = wdg.boundedfloattext(min=0,max=100,value=5,description='c2 ') c3 = wdg.boundedfloattext(min=0,max=100,value=5,description='c3 ') #two checkbox ch1 = wdg.checkbox(description='check me 1') ch2 = wdg.checkbox(description='check me 2') #containers con1 = wdg.hbox(children=[s1,s2]) con2 = wdg.hbox(children=[c1,c2,c3]) con3 = wdg.hbox(children=[ch1,ch2]) con5 = wdg.box(children=[con1,con2,con3]) in output of con5 , c1 , c2 , c3 no space between float boxes descriptions overlaped, how can center them, or @ least increase space between them? i confirmed '...

Docker Compose to CoreOS -

i'm learning docker, , have made nice , simple docker compose setup. 3 containers, own dockerfile setup. how go converting work on coreos can setup cluster later on? web: build: ./app ports: - "3030:3000" links: - "redis" newrelic: build: ./newrelic links: - "redis" redis: build: ./redis ports: - "6379:6379" volumes: - /data/redis:/data taken https://docs.docker.com/compose/install/ the thing /usr read only, /opt/bin writable , in path, so: sd-xx~ # mkdir /opt/ sd-xx~ # mkdir /opt/bin sd-xx~ # curl -l https://github.com/docker/compose/releases/download/1.3.3/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose % total % received % xferd average speed time time time current dload upload total spent left speed 100 403 0 403 0 0 1076 0 --:--:-- --:--:-- --:--:-- 1080 100 7990k 100 7990k 0 0...

sql server - How to create hierarchical table in SQL? -

Image
if there 3 managers , employees shown in photo, how design hierarchical in sql. i add managerid field not required. if field not set person 1 of highest managers else works employee person specific id.

c# - Requests POI from a location using Xamarin (Android) -

im trying create android app xamarin.i want user able input address/location , receive poi (points of interest) near (within radius). i know google places api can this, xamarin have built in capability this? can somehow interface google places api? or there don't know about? help! use httpwebrequest class create request google api, code snippet: private void button1_click(object sender, eventargs e) { httpwebrequest webrequest = webrequest.create(@"https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=7500&types=library&sensor=false&key=aizasyd3jfemzk1swfrfdgmfxn_zrgrsje7s8vg") httpwebrequest; webrequest.timeout = 20000; webrequest.method = "get"; webrequest.begingetresponse(new asynccallback(requestcompleted), webrequest); } private void requestcompleted(iasyncresult result) { var request = (httpwebrequest)result.asyncstate; var response = (httpwebresponse)request.endgetre...

First javascript project with Durandal. Trying to get data from 3rd party API -

so i'm working on project players of game able compare performance of peers @ same skill level. can prototype of code work outside of durandal structure, when try follow along other examples while supplying own sources data, can't together. here code: define(function (require) { var http = require('plugins/http'), ko = require('knockout'); var url = 'https://na.api.pvp.net/api/lol/na/v1.4/summoner/by-name/', key = '?api_key=#################################'; return { name: ko.observable, getsummoner: function() { var = this; if (this.name.length > 0) { return; } return http.jsonp(url + name + key, 'jsoncallback').then(function(response){ that.name(response.items); }); } }; }); replace #'s personal api key host recommends don't share. i'll supply 1 if necessary , change later. i have 2 specific questions here: i got function...

c# - how to build html navigation bar dynamically using data from database -

i have data database self relation parent_id name child_id 1 cities null 2 egypt 1 3 saudi 1 4 technology null 5 vb.net 4 6 c# 4 now want build html navigation bar using data to following <ul> <li><a href="#">cities</a> <ul> <li><a href="#">egypt</a></li> <li><a href="#">saudi</a></li> </ul> </li> <li><a href="#">technology</a> <ul> <li><a href="#">vb.net</a></li> <li><a href="#">c#</a></li> </ul> </li> </ul> i don't know best way da xml node or using linqu ... whatever best way me please. you can use asp:reapeater control provide dat...

javascript - If it possible with jQuery onLoad function to load specific page? -

i have been wondering if possible, instead of building responsive website. build 2 different websites, 1 phones (only small screens) , other tablets , desktops. now in mobile version of website exclude large files , videos , on. i wondering possible? $(document).onload(function(){ if(screen){ \\ load mobile.html }else{ \\ load desktop.html } }); or maybe if there better way, interested in excluding elements dom on mobile devices instead of hiding them css. thanks you can change document location. more location object here . i wouldn't wait document load in code, instead run straight away. if (window.matchmedia("(min-width: 600px)").matches) { document.location.pathname = "desktop.html"; } else { document.location.pathname = "mobile.html"; }

arrays - Dynamic Memory Management for a pointer to a pointer (c++) -

need help. have array of pointers: int *ptr = new int[n]; want 2 dimensional array of pointers, points 1 dimensional array. know how allocate memory 2 dimensional pointer: int (*nn)[4] = new int [n][4]; but: how allocate memory 2 dimensional pointer pointer? possible anyway? need define neighbors on grid. connection should this: for (int vertex = 0; vertex < n; ++vertex) { nn[vertex][0] = ptr[(vertex + 1) % n]; nn[vertex][1] = ptr[(vertex + n - 1)% n]; nn[vertex][2] = ptr[(vertex + l) % n]; nn[vertex][3] = ptr[(vertex + n - l) % n]; if (vertex % l == 0) { nn[vertex][1] = ptr[vertex + l - 1]; } if((vertex + 1)%l == 0){ nn[vertex][0] = ptr[vertex - l + 1]; } } i got stuck in allocating memory... if want 2 dimensional array of pointers int, need pointer pointer pointer int, , need allocate memory in for-loop, this: int *** nn = new int**[n]; for(int i=0; i<n; i++) nn[i] = new int*[4]; now nn[x][y] pointer in...

javascript - Square Line Chart / Step Chart jqplot -

Image
i need plot 3 series of data, first line , other 2 dots. line should step chart (instead of line drawing point point, should draw line horizontal , value i stuck how jqplot. $(document).ready(function(){ var plot1 = $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]); }); the above code produce blue line on below graph, instead need green line. unfortunately, not allowed make comments. therefore have write new answer. the given answer suggests subtract small amount x value (0.001 in example) prevent triangle effect. not quite accurate , can seen workaround. the triangle effect caused sorting performed jqplot. sorting required chart types, including line charts. if data sorted before feeding jqplot, sorting can disabled jqplot setting sortdata attribute false, see jqplot.sortdata this prevent sorting issues , therefore no triangle effect occurs! you may want hide point markers jqplot doesn't know difference between real points , our injected artifici...

Execute AJAX call in PHP MVC? -

i using php framework "kissmvc", @ kissmvc.com. but there aren't examples of how execute ajax call in 'view'-page. know how that? this code placed in view: jquery.ajax( { type: "post", url: '<?php echo myurl(controller_path); ?>' + "register", data: { user_name: reg_username, } });

c - Allocate Pointer and pointee at once -

if want reduce malloc() s (espacially if data small , allocated often) allocate pointer , pointee @ once. if assume following: struct entry { size_t buf_len; char *buf; int something; }; i allocate memory in following way (don't care error checking here): size_t buf_len = 4; // size of buffer struct entry *e = null; e = malloc( sizeof(*e) + buf_len ); // allocate struct , buffer e->buf_len = buf_len; // set buffer size e->buf = e + 1; // buffer lies behind struct this extende, whole array allocated @ once. how assess such technuique regard to: portability maintainability / extendability performance readability is reasonable? if ok use, there ideas on how design possible interface that? you use flexible array member instead of pointer: struct entry { size_t buf_len; int something; char buf[]; }; // ... struct entry *e = malloc(sizeof *e...

html - can't change link color in chrome -

i can't change color of links. have checked other posts , w3schools, it's not working. entire css looks far div.nav{ text-align: center; } a{ text-decoration: none; color: black; } but links flash black (or red or w/e) when page loads , turn blue. hmtl: <div class="container-fluid"> <div class="nav"> <nav> <a href="#">stuff</a> <a href="#">stuff</a> <a href="#">stuff-stuff</a> <a href="#">stuff</a> <a href="#">stuff</a> <a href="#">stuff</a> <a href="#">stuffstuff</a> <a href="#">stuff</a> <a href="#">stuff</a> </nav...

api - How do I change the language of the checkout form in Stripe? -

i have noticed stripe checkout form, language seems fixed in english. is there way me change language to, example, spanish, japanese or chinese? i using default form code on stripe documentation: <form action="/charge" method="post"> <script src="https://checkout.stripe.com/checkout.js" class="stripe-button" data-key="pk_test_variable_here" data-image="/img/documentation/checkout/marketplace.png" data-name="my company pty ltd" data-description="2 widgets" data-currency="aud" data-amount="2000"> </script> </form> edit : updating answer since it's accepted 1 make sure it's visible. stripe released feature allows have stripe checkout display in other languages automatically. the easiest solution pass data-locale="auto" to display checkout in user's preferred language, if available . english...

windows 7 - Loss of Resolution using Display Port Adapter -

i have laptop running windows 7, set connect 2 asus monitors. laptop (lenovo) has 1 vga , 1 display port. when hooking these monitors must use display port vga adapter. both monitors go different kvm switches connect monitors. monitor a. appears monitor connected through display port adapter shows generic name lcd_vga , has (recommended) resolution max of 1280x1024 monitor b. other monitor shows correct name asus vs238 , real (recommended) resolution of 1920x1080 when switch cables = display port adapter , b = direct vga resolutions switch. = 1920x1080 max , b = 1280x1024 max. i have tried detect under screen resolution, computer reload, kvm context switches, installing new 1920x1080 driver monitors, , using custom resolution via nvidia control panel. none seem work. is possible display port breaks device information communications somehow? other hints? you need disclose kvm switch(es) setup. looks kvm switch(es) did not edid emulation via ddc communication betwee...

java - Utilizing GridLayout, JPanel, BorderLayout -

new gui, trying create simple jframe 2 jtextarea instances positioned right next each other , jpanel @ bottom. import java.awt.*; import java.awt.event.actionlistener; import javax.swing.*; public class demo extends jframe { private jpanel panel; private jtextarea jtextarea1; private jtextarea jtextarea2; private decisionpanel decisionpanel; private gridlayout gridlayout; private container container; public demo() { super( "demo" ); container mycontainer = new container(); jtextarea1 = new jtextarea(); jtextarea2 = new jtextarea(); gridlayout gridlayout = new gridlayout( 1, 2 ); mycontainer.setlayout( gridlayout ); mycontainer.add( new jscrollpane( jtextarea1 ) ); mycontainer.add( new jscrollpane( jtextarea2 ) ); jframe f = new jframe(); f.add( mycontainer, borderlayout.center); f.add( decisionpanel, borderlayout.page_end ); f.setsize( 400, 400 ); f.setdefaultcloseoperation( jframe.exit_on_...

ruby - Import CSV into a table with rake file -

i'm trying write rake file imports csv file table, code is. csv.foreach("#{pathtocsv}",:col_sep => ";", :headers => true) |row| "#{setnamemodel}".create! (row.to_hash) end but undefined method `create!' when thy add record manually in rails console create! method, works fine. have fix make parse csv , add table? you're calling create! on string. instead, want call on class has name of string. try this: object.const_get(setnamemodel).create!

php - How do I install and get HAML working with Yii? -

Image
there many php haml projects , yii. generic ones have no idea how install yii framework , make yii aware of them. ones yii old yii , not yii2 make reference protected/extensions doesn't exist. tried install 1 https://github.com/delfit/yii-haml composer gave error the requested package delfit/phamlp not found in version, there may typo in package name. sass , coffeescript bonus the error mentioned related minimum-stability setting because extension doesn't have stable releases yet. seems it's not supported anymore. but yii 1 extensions not compatible yii 2, because difference between them pretty big, doesn't matter. you can rewrite newer version, found similar extension yii2. it's called yii2-mthaml , based on mthaml extension. try this, seems it's 1 yii2 haml extension @ moment.

bash - Piping in C - Error in Command 2 -

so, thought on right track trying imitate bash shell, i'm having issues piping. getting error executing second command. wondering if explain me how fix , why it's going wrong. i'm new c & linux commands supplemental information me along way appreciated. thank time. code below, there lot of it. issue occurring in exec_pipe function. include have used input , getting output, sample input executable files professor gave testing. unfortunately, mine not working in shell. getting error print out: inside case 5 inside exec_pipe error in pipe execvp cmd2 #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <stdbool.h> #include <time.h> #include <limits.h> #include <fcntl.h> #include <sys/wait.h> #define bufsize 1024 #define cstrsize 100 #define cmdsize 30 #define debug 1 //i referenced our blackboard source code files create fork functions , deal ...

populate php array with while loop? -

is there way output sqlite table php array? i trying use while loop not display correctly. $db = sqlite_open ("products.db", 0666, $error); $result=sqlite_query($db,"select * books"); $products = array(); while($row=sqlite_fetch_array($result,sqlite_assoc)) { $products = $row; } i want store 2d php array if were: $products = array( 1 => array( 'name' => '', 'price' => , 'category' => '', 'description' => '' ), 2 => array( 'name' => '', 'price' => , 'category' => '', 'description' => '' ), 3 => array( 'name' => '', 'price' => , 'category' => '', 'description' => '' ) ); you're close. need add each row array inst...

NCO download Python -

there not on troubleshooting outside package nco netcdf4 files when downloading. following steps https://github.com/jhamman/nco-bindings . first step run setup.py install , able see install. below end of output saying installed. installed c:\users\...\appdata\local\enthought\canopy\user\lib\site- packages\nco-0.0.2-py2.7.egg processing dependencies nco==0.0.2 finished processing dependencies nco==0.0.2 but running problem when running operators. step is: from nco import nco nco=nco() and error nco = nco() saying typeerror: 'nonetype' object has no attribute ' getitem ' meaning there nothing within function. using enthought canopy python not think problem. on getting function ncra running appreciated. thanks i had similar problem , solved defining new system variable called "ncopath" , did set value path of nco package (in case path "c:\nco"). i hope helps.

sql - Get the table name where data is updated/inserted -

is there way table name data updated/inserted? update set a.salary = a.salary + 5000 dbo.employee inner join dbo.status b on a.statusid = b.id b.description = 'regular' select @@tableupdated ouput should employee it's hack , can done inside trigger still can try , may idea: create trigger z on dbo.employee after update if(update(a)) begin if exists(select * information_schema.columns table_name = 'employee' , column_name = 'a') begin select 'employee' end else // can add more if statements begin select 'status' end end once create trigger, use update statement provided in question, trigger should return name of table.

python - Large list generation optimization -

i needed python function take list of strings in form of: seq = ['a[0]','b[2:5]','a[4]'] and return new list of "expanded" elements preserved order, so: expanded = ['a[0]', 'b[2]', 'b[3]', 'b[4]', 'b[5]', 'a[4]'] to achieve goal wrote simple function: def expand_seq(seq): #['item[i]' item in seq xrange in item] return ['%s[%s]'%(item.split('[')[0],i) item in seq in xrange(int(item.split('[')[-1][:-1].split(':')[0]),int(item.split('[')[-1][:-1].split(':')[-1])+1)] when dealing sequence generate less 500k items works well, slows down quite bit when generating large lists (more 1 million). example: # let's generate 10 million items! seq = ['a[1:5000000]','b[1:5000000]'] t1 = time.clock() seq = expand_seq(seq) t2 = time.clock() print round(t2-t1, 3) # result: 9.541 seconds i'm looking ways improve funct...

PHP - User Profile URL From Ugly URL -

alright, try figure things out on own, stumbled. making php registration/login/profile system php , sql. 97% finished, users' profiles. i have form can search users. form links "www.example.com/profiles.php?username=." can link "www.example.com/user/" or "www.example.com/profile/." functionality of going directly "user/" url. i sure there rewrite rules this, , have tried many. still seem have trouble getting work. help? in advance. here current .htaccess file (doesn't work): rewriteengine on rewriterule ^user/([^/]*)\.php$ /profile.php?username=$1 [l] if htaccess work, should linking to? because currently, linking "/profile.php?username=" doesn't anything. again, clarify, want output form able link www.example.com/profile/username or www.example.com/user/username. user access profile typing www.example.com/profile/username.

Print Javascript function in htm php page -

this javascript code: <script> $(function() { $('#input').validatecreditcard(function(result) { $('.log').html('card type: ' + (result.card_type == null ? '-' : result.card_type.name) + '<br>valid: ' + result.valid + '<br>length valid: ' + result.length_valid + '<br>luhn valid: ' + result.luhn_valid); }); }); </script> i m print result value in html tag like: <h1><script>document.write(result.card_type.name())</script></h1> <h1><script>document.write(result.valid())</script></h1> <h1><script>document.write(result.length_valid())</script></h1> <h1><script>document.write(result.luhn_valid())</script></h1> bt not showing value..!! the "result" variable local function. can...

windows - Java, Import Class From File -

i'm writing java program , wanted make class can called on make quick log cmd (i'm still in testing phase, figuring stuff out). have file , folder file in it. launchprogram.java helping dbg.class dbg.java the summarized contents of launchprogram.class (the stuff relevant): import helping.dbg; public class launchprogram{ public static void main(string[] args){ dbg("testing"); } } the contents of dbg.class : package helping; public class dbg{ public static void main(string message){ system.out.println(message); } } when javac dbg.java in cmd, runs without error, producing dbg.class . when javac launchprogram.java in cmd, following error: launchprogram.java:5: error: cannot find symbol dbg("testing"); ^ symbol: method dbg(string) location: class launchprogram i'm not sure what's happened cause this, , i've looked everywhere can't find solution. kn...

c - Why is [static N] not enforced at compile-time? -

c99 has added static in function parameter (only meaningful in function definition, not declaration): void func( int a[static 10] ) { if ( == null ) { /* branch can optimized out */ } printf("%d", a[-1]); /* causes ub */ } however, meaning defined in c11 6.7.6.3/7 semantic , not constraint , means compiler should not issue diagnostic if function called incorrectly. in fact compiler must not abort compilation unless can prove ub caused in branches. example: int main() { func(null); // ub int b[9]; func(b); // ub } why did standard not make constraint (therefore requiring diagnostic)? secondary question: why static ignored in prototype (6.7.6.3/13), instead of being part of function signature? seems misleading allow prototype contain function body doesn't, , vice versa. because violations cannot detected @ compile time in cases. for example, argument pointer initial element of array allocated malloc() . com...

.net - How to connect to local SQL Server? -

i trying run .net solution @ local pc, have set sql server 2008 , have imported database. when trying run solution , connection error: the specified named connection either not found in configuration, not intended used entityclient provider, or not valid. the exception thrown by /// initializes new sdementities object using connection string found in 'sdementities' section of application configuration file. /// </summary> public sdementities() : base("name=sdementities", "sdementities") { this.contextoptions.lazyloadingenabled = true; oncontextcreated(); } i have specified entity name. entityclient provider specified in connection string.... the connection string in web.config file , looks this: <add name="sdementities" connectionstring="metadata=res://*/models.sdemmodel.csdl|res://*/models.sdemmodel.ssdl|res://*/models.sdemmodel.msl;provider=system.data.sqlclient;provider connection strin...

javascript - I am looking to create a webpage similar to http://www.creativecrisp.com/ -

i looking create webpage similar http://www.creativecrisp.com/ idea framework used build webpage? how done? should start? thanks! the chrome add-on wappalyzer show technologies each site on uses. kind of fun , handy.

database design for online bus ticket booking with extra features -

i trying build online bus ticket reservation system on package base, ticket includes other features ticket of site seeing places, bus ticket same passenger price other features may depends on passenger type(adult/child/senior ...). there tables other_feature,passenger_type,feature_type, confused how relate these reservation system please appreciated . in advance! my table structure table reservation_details id passenger_id travel_detail_id purchase_detail_id reserved_date seat_no depature_date table travel_details id bus_id route_id depature_time arrival_time fare freq_detail_id table routes id name distance from_city to_city table freq_details id sun mon tue wed thu fri sat

emacs can't open files outside current directory -

so here interesting error...there particular folder on desktop (hdrive, connected university-wide backup system, set automatically it) emacs has difficulty opening files. in directories within hdrive emacs can't open files above current directory. example, cd ~/hdrive/directory/ emacs ../another_directory/file gives error message emacs: `get_current_dir_name' failed: no such file or directory i same error if instead try emacs ~/hdrive/another_directory/file the files not missing , not corrupted, using cat in place of emacs in these commands works fine. , don't problem directories in hdrive - directory problem have subdirectory without - directories problem consistent. there no .dir-locals.el anywhere in hdrive, can't messing things up. any ideas?

c - Memory allocation for structure extension -

suppose have 2 structures 1 of extends other 1 (as below). what's correct procedure dealing memory when creating extended structure existing structure? should malloc called again new structure? doubling memory allocation shouldn't be? typedef struct grid { int rows; int cols; int * grid; } grid; typedef struct supergrid { grid; char * property; int id; } supergrid; static grid * new_grid(int rows, int cols) { grid * grid = (grid *)(malloc(sizeof(grid))); grid->rows= rows; grid->cols= cols; grid->grid = (int *)(calloc(rows*cols, sizeof(int))); } static supergrid * new_super_grid(int rows, int cols) { /* needs happen here? */ return (supergrid *)new_grid(rows, cols); } your structure extension mechanism similar primitive c++ class derivation system. achieve goal, need separate structure allocation , initialization: typedef struct grid { int rows; int cols; int *grid; } grid; typedef struct supergrid ...

git - Does Github have a way to synchronize your fork with cloned repo? -

does github offer way synchronize fork of github repo changes in source repo? for instance fork repo, , rename master upstream want keep synchronized changes source repo, can github synchronize upstream master of source repo regularly? no, github not provide it. instead can achieve locally. first, create local repository, add own remote , retrieve it. git init git remote add origin git@github.com:<username>/<repo>.git git pull origin master next step, add remote branch repository points original repo forked from. git remote add --track master <repo-name> git://github.com/<username>/<source-repo>.git note master branch want track in forked repo. <repo-name> you. if want verify, run git remote , must see <repo-name> , origin output. now, ready new changes original repo. git fetch <repo-name> a new branch called <repo-name>/master created latest changes.

graph - R- programming- Error in get.current.chob() : improperly set or missing graphics device -

library(quantmod) getsymbols("lt.ns") plot(lt.ns["2013-12-01::2014-12-01"]) close<-cl(lt.ns["2013-12-01::2014-12-01"]) open<-op(lt.ns["2013-12-01::2014-12-01"]) close<-as.matrix(close) open<-as.matrix(open) bbands<-addbbands(n=20,sd=2) values_bbands<-bbands@ta.values values_bbands[is.na(values_bbands)]<-0 bbands<-as.matrix(values_bbands) up<-bbands[,1] up<-as.matrix(up) down<-bbands[,3] down<-as.matrix(down) data<-read.table("c:\\temp\\dates.txt") attach(data) head(data) stock<-as.matrix(data) for(i in 131:261) { if(close[i]>down[i]) { print("the selling date is:") print(i) big.red.dot <- xts(open[i], as.date(stock[i,1])) points(big.red.dot, col="red", pch=19, cex=0.5 ) } if(close[i]<up[i]) { print("the buying date is:") print(i) big.green.dot <- xts(open[i], as.date(stock[i,1])) p...

ios - How to make a UICollectionView fill vertical space before moving to next row -

Image
i want use uicollectionview create layout looks this. however, default flow layout lays things out instead. how should go trying achieve desired effect? can uicollectionviewflowlayout being configured behave or should creating custom layout instead? custom layout should available @ github

java - OpenAM + Spring Security SAML gettting SAML Request is invalid response -

i'm facing problem when using openam spring security saml2 example . i have followed this tutorial configure spring saml2 sample openam. i'm getting error after selecting http://localhost:8080/openam-12.0.0 , click login , browser return "http status 500 - saml request invalid.". both example project , openam deployed in same tomcat server, didn't exception in logs. i have attached below decoded saml request extracted url. <?xml version="1.0" encoding="utf-8"?> <saml2p:authnrequest xmlns:saml2p="urn:oasis:names:tc:saml:2.0:protocol" assertionconsumerserviceurl="http://localhost:8080/sso/saml/sso" destination="http://localhost:8080/openam-12.0.0/ssoredirect/metaalias/idp" forceauthn="false" id="a436bg49hb19hhe73i2c450iadb7c8d" ispassive="false" issueinstant="2015-03-16t12:14:31.468z" protocolbinding="urn:oasis:names:tc:saml:2.0:bind...

How can I provide an Index Hint to a MS-SQL Server Indexed View? -

Image
i have indexed view fooview . i've created following indexes against it: create unique clustered index ix_foo1 on [fooview](someid, anotherid) create nonclustered index ix_foo2 on [fooview](someid) is possible use hint against ix_foo2 ? keeps using ix_foo1 when use with (noexpand) hint. yes straightforward create table dbo.footable ( someid int, anotherid int, filler char(8000) ); go create view dbo.fooview schemabinding select someid, anotherid, filler dbo.footable go create unique clustered index ix_foo1 on dbo.fooview(someid, anotherid) create nonclustered index ix_foo2 on dbo.fooview(someid) go select someid dbo.fooview (noexpand) --no hint non clustered index chosen automatically select * dbo.fooview (noexpand) --no hint clustered index chosen automatically select * dbo.fooview (noexpand, index = ix_foo2) --with hint nonclustered index forced execution plans (note forcing index ...

Python homework help request -

i need little input on why i'm not getting desired result code. here's code: def main(): seat_limit_a=300 print("enter total amount of tickets sold section a") sectiona=gettickets(0, seat_limit_a) print("the total amount of tickets sold section is",sectiona) def gettickets(ticket, seat_limit): ticket=int(input("enter:")) ticketsinvalid(ticket, seat_limit) return ticket def ticketsinvalid(ticket, seat_limit): while ticket <0 or ticket > seat_limit: print ("error: amount of tickets sold can't less 0 or more than",seat_limit) ticket=int(input("please enter correct amount here: ")) return ticket main() i need number of tickets sold section in movie theater, , need validation loop verify if number entered not less or more seat limit section (in case it's a, need implement more program once figure out section). professor wants create general functions ...

jquery - Get value of seleceted child of ul - Bootstrap3 -

i want value of selected nav-stacked. <div class="col-md-2"> <ul class="nav nav-stacked nav-pills" id="sidebar"> <li class="active"><a href="#registration" data-toggle="tab">registration report</a></li> <li><a href="#events" data-toggle="tab">events report</a></li> <li><a href="#count" data-toggle="tab">count report</a></li> </ul> </div> <div class="tab-content"> <div class="tab-pane fade active" id="registration"> content </div> <div class="tab-pane fade" id="count"> content </div> <div class="tab-pane fade" id="events"> content </div> </div> how can value of selected nav-stacked.?...

javascript - Save screenshot of a DIV as and image -

how take screenshot of div contain more 1 images? dragging images div , want take screenshot using jquery or javascript without using server side scripting language. assuming have button click (to trigger capture), , images on same domain, load html2canvas js file, add this: $('#btn').click(function() { html2canvas($('#div'), { onrendered: function(canvas) { //do canvas element - upload, append display element, etc. example: var myimage = canvas.todataurl("image/png"); window.open(myimage); } }); });

xml - SOAP Authentication Through cURL PHP Returns "HTTP GET method not implemented" 500 error -

so working on soap request using php curl. want invoke operations before want test authentication part. below code: $username = 'myusername'; $password = 'mypassword'; $host = 'http://xx.xx.xx.xx:xxxxx'; $process = curl_init($host); curl_setopt($process, curlopt_httpauth, curlauth_any); curl_setopt($process, curlopt_header, true); curl_setopt($process, curlopt_httpheader, array( 'content-type: text/xml', "authorization: basic " . base64_encode($username.":".$password) )); curl_setopt($process,curlopt_useragent,'xxxxx/x.x'); curl_setopt($process, curlopt_returntransfer, 1); curl_setopt($process, curlopt_verbose, 1); curl_setopt($process, curlopt_failonerror, false); $return = curl_exec($process); print_r($return); curl_close($process); i need use base64 username/password. found how on other question. when print_r($return) received http/1...

ios - run scene (scene kit )? -

is possible run code on apple watch: scnscene *scene = [scnscene scenenamed:@"art.scnassets/ship.dae"]; // retrieve ship node scnnode *ship = [scene.rootnode childnodewithname:@"ship" recursively:yes]; // animate 3d object [ship runaction:[scnaction repeatactionforever:[scnaction rotatebyx:0 y:2 z:0 duration:1]]]; // retrieve scnview scnview *scnview = (scnview *)self.view; // set scene view scnview.scene = scene; // allows user manipulate camera scnview.allowscameracontrol = yes; // show statistics such fps , timing information scnview.showsstatistics = yes; i can not put scene on main controller. scnview *scnview = (scnview *)self.view; please, help. the way make apps apple watch watchkit. watchkit not include ability present ios view on watch, specific set of ui controls defined in watchkit framework. see watchkit programming guide details.

WMI event notification in C++ -

can me in writing wmi query event notification when speaker or headphone/mic connected system. tried select * __instanceoperationevent within .1 targetinstance isa 'win32_sounddevice' . doesn't seems working. i coding in c++ .

spring mvc - Dojo grid: load data from html markup -

i'm using dojox.grid.datagrid displaying data, in second request sent server data. i'm using spring mvc, , hence fill data (from markup) using model data in view (using jstl, exact). , i'm no getting near in achieving this, since cant find way data inside grid via html markup. dojo grid supports filling data via script (store)? i found dojox.data.htmlstore made use of. making sure there's no better solution. yes, dojox.grid.datagrid can defined using html markup. sample code: <table data-dojo-type="dojox.grid.datagrid" > <thead> <tr> <th field="fieldname" >col1</th> <th field="fieldname" >col2</th> </tr> </thead> </table> so in jsp have logic generate above structure. more info can found here and data part can this: <table data-dojo-type="dojox.grid.datagrid" > <thead> <tr> ...

html - <PRE> TAG doesn't work? -

here, doing printing javascript code wrapping between "pre" tags : <pre> var sum = function(tosum) { var j = 0; for(var i=0; i<tosum.length; i++) { j = j + tosum[i]; } console.log("the sum of array " + j); }; sum([1,2,3,4]); var multiply = function(tomultiply) { var j = 1; for(var i=0; i<tomultiply.length; i++) { j = j * tomultiply[i]; } console.log("the multiplication of array " + j); }; multiply([1,2,3,4]); </pre> but actual getting : var sum = function(tosum) { var j = 0; for(var i=0; why so? how can " pre " tag working? you should use &lt; instead of < . similarly, use &gt; > , &amp; & when displaying in html. your loop like: for(var i=0; i&lt;tosum.length; i++) { ... }

visual studio - Using transformed Web.config with IIS Express during debug -

i have visual studio application has multiple solution configurations. there web.config transform file each configuration. example, web.debug.config, web.release.config, etc. we have couple of developers working on project have nonstandard sql express instance names due way installed sql express , rather having them continually editing web.debug.config run in environment have setup solution configuration each of them , added following bottom of .csproj file. code work in triggers creation of web.config , mywebapp.dll.config in vs /obj/debug-developername/ folder. the transformed .config files perfect, iis express still uses root web.config (not transformed). is there way iis express use these transformed web.config files while debugging locally? <usingtask taskname="transformxml" assemblyfile="$(msbuildextensionspath)\microsoft\visualstudio\v12.0\web\microsoft.web.publishing.tasks.dll" /> <target name="aftercompile" ...

html - How to add an icon to a button at the bottom right corner -

Image
i know how use font-awesome , other css files icon in button images below. but requirement have icon @ bottom right corner of button. like... i using bootstrap , font-awesome. create css class , assign icon span : .bottom-right { position: absolute; bottom: 0; right: 0; } additionally button needs have position: relative; assigned, absolute positioned icons coordinates relative button. here fiddle: http://jsfiddle.net/8a2jbp7f/2/ if want rotated caret in image use text roation @benw posted.

android - How to load background Image programmatically ? Using picasso library -

i'have trying load background image url programmatically (so when i'd change background, change image , don't need modify application). picasso best library load background image url, tried use big imageview , loading image picasso, doesn't work good, works few times. can suggest else please ? you question answered on stackoverflow. refer these visit image loading libraries stackoverflow - lazy load images please search on stackoverflow before ask questions.

gruntjs - cors issue with google places api using angularjs(yeoman) -

i trying configure google places api , display search results using angularjs. i've generated angular using yeoman , serving using 'grunt'. i'm using find "sport" results around location. angular.module('frontendapp') .controller('httpreqcontroller', ['$scope', '$http', function($scope,$http) { console.log('next on click'); $scope.myfunction = function() { console.log('on click in place'); $http.get('https://maps.googleapis.com/maps/api/geocode/json?address='+ $scope.address+ '&key=<api_key>') .success(function (response) { $scope.names = response; var location = response.results[0]; console.log(location.geometry.location); // http request find sport around users place var comurl2 ='https://maps.googleapis.com/maps/api/place/nearbysearch/json?location='+ ...

java - Selenium: Element not getting child element -

i doing selenium automation test list of webelements child elements of each of of them. unfortunately when it, gets child elements of first element list weird. can point on went wrong? thanks. @override public void performtest() { performaction(); try { (webelement element : search_rows) { system.out.println(element.getattribute("class")); system.out.println(element); assertelements(element, constants.selectors.amity_result_one); assertelements(element, constants.selectors.amity_result_two); assertelements(element, constants.selectors.amity_result_three); } webelement nextpage = webdriverutils.findelementbycssselector( driver, constants.selectors.amity_next_page); webdriverutils.scrolltoelement(driver, nextpage, webdriverutils.by_javascript); nextpage.click(); performtest(); } catch (exception e) { // e.printsta...