Posts

php - Get data from Magento and Wordpress -

i have idea here how access data in magento , wordpress in same time user doesn't need log in magento backend or wordpress backend, needs log in 1 app using codeigniter. here simulation: enter image description here if 1 have idea can happy me share program when finish :). , hope can growing programs , warm regards

angular - module resolution with angular2 / ASP.NET5 (cannot find angular2/core) -

i have started new asp.net5/mvc6 project. attempt 1 problem when set moduleresolution classic in tsconfig.json receive error follows: cannot find module 'angular2/core' attempt 2 if change tsconfig.json use node resolution, exclude node_modules in tsconfig.js not work, this bug? , closed, though still seems problem, , multiple errors encountered when studio 2015 trolls through node_modules folder including every .d.ts in entire tree. there hundreds of errors, in rxjs . attempt 3 if remove tsconfig.json completely, can application executing, , files compiled, alas, error in browser. error: (systemjs) require not defined i cannot think angular2 / typescript support in visual studio is complete mess , , should go angular 1 , mvc5 . record, using typescript 2.0.6, , visual studio date. is there combination of package.json , tsconfig.json works out of box visual studio 2015 angular2. package.json has following dependencies. { ...

jquery - if this attribute value is enclosed in quotation marks the quotation marks must match error -

i trying design responsive image slider thumbnails. here code. <div class="cycle-slideshow" data-cycle-timeout=0 data-cycle-pager="#pager2" data-cycle-pager-template="<span><img src={{firstchild.src}}/></span>" > <span class="cycle-pager"></span> <span class="cycle-prev">&#9001;</span> <span class="cycle-next">&#9002;</span> <img src="images/backgroundalternate.jpg" /> <img src="images/logout.jpg" /> <img src="images/backgroundalternate1.jpg" /> <img src="images/backgroundalternate2.jpg" /> <img src="images/backgroundalternate.jpg" /> </div> while adding span tag attribute data-cycle-pager-template , getting error if attribute value enclosed in quotation marks quotation marks must match why that? in advance. ...

javascript - redux get input text value -

i have following reactjs component. class login extends component { render() { if (this.props.session.authenticated) { return ( <div></div> ); } return ( <div> <input type="text" placeholder="username" /> <input type="password" placeholder="password" /> <input type="button" value="login" onclick={() => this.props.loginaction("admin", "password")} /> </div> ); } } the login component makes use of prop set via redux, named "session.authenticated". if user session not authenticated, present couple of input fields (one username , password) , login button. if press on login button want emit action username , password values, passed parameters. now, how values of 2 input fields parameters ? ...

android - click on empty space in fragment executes activity event -

i have activity consists of 4 images , onclick of image i'm opening fragment . also, have navigation drawer profile option opens fragment . since fields in profilefragment few there allot of empty space. , if user clicks on empty space, click event of image placed in activity executed , particular fragment opens up. have tried set background color of profilefragment white , did not work. profilefragment class : public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { // inflate layout fragment view view = inflater.inflate(r.layout.fragment_profile, container, false); butterknife.bind(this, view); view.setbackgroundcolor(color.white); return view; } profile_fragment.xml <framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" androi...

Replacing a section of text in one file with text from another using python -

first bit of background: yes, new python, dabble , learn things. the goal this: have intranet website here @ work , have on static server no server side scripting allowed, meaning no php. add new pages, must update every freakin page's menu new link. fortunately, have application called arcgis installed on computer , came installation of python. thinking nice put script read file called "menu.txt" , search recursively in directory (and subdirectories) files ".html" , replace text between comment tags, <!--begin menu--> , <!--end menu--> , text in "menu.txt" so started looking , found snippet of code: with open('menu.txt', 'r') f: # read entire file file1 # assuming 'file1.txt' relatively small... file1 = f.read() open('test.html', 'r') f: # assuming 'file2.txt' relatively small... file2 = f.read() # read file file2 # index() raise error if not found... f1_st...

Normalize numpy array columns in python reading that array from other csv file -

whenever trying perform normalization on array obtained csv file . code wont work because have n't provided custom file. i getting error message : x = np.myarray attributeerror: 'module' object has no attribute'myarray' as new python ,can please me how normalized matrix if read matrix csv file ? import numpy np import csv open('csvk.csv', 'rb') f: reader = csv.reader(f) data_as_list = list(reader) print data_as_list myarray = np.asarray(data_as_list) print myarray x = np.myarray x_normed = x / x.max(axis=0) print x_normed what trying np.myarray ? attribute call, , python rightly informs module numpy not have attribute myarray . if you're trying make copy of myarray want x=myarray , although same in more pythonic way x_normed=myarray/myarray.max(axis=0)