Posts

angularjs - how to get results of my webservice with jsonp? -

I want to call one of my web server through jsonp. / code> code> $ http.jsonp ('http://example.com/files?callback=JSON_CALLBACK') .Service (data) {console.log (data); $ scope .folders = data;}); console.log is not showing up .... what am I doing? My Web service returns JSON_CALLBACK (["folder1", "folder2"]) ? Should I do it manually in my API? Browser does not do this automatically? You are currently returning ( ["folder1", "folder2"] ) is not valid. The JSON result should be wrapped up with the Javascript function call to be JSONP. For example, when you use URLs like this: http: // example.com/files?callback=JSON_CALLBACK Angular function will replace the JSON_CALLBACK parameter with the function name (built internally) such as: http://example.com/ Files? Callback = angular.callbacks._0 Then your server will need to be able to read that callback parameter and return results ...

asp.net - Bring the users identity from the presentation tier to the application tier -

For our n-level application, we are looking for a way to use the identity level from the presentation level to the application level Are there. Our application is a classic 3-level application with low levels: UI - presentation level Application / WCF category Database level The app is not coming to the internet and can connect to the presentation-level local network. Our problem is that a user enters the presentation level and we want the presentation level to pass, although the identification level of user aspects is the level. How can this be done? Is it possible to do this with a claim based authentication? We are currently looking to implement IWSTrust13SyncContract in the STS service, but it seems that the user should be accessible to the application level for the browser. Can someone give me some suggestions about how to contact this You can represent the impersonation / delegation Or use reliable subsystem models - See Impersonation / Delegation works bes...

root - Android L Preview: Attempting Task Locking By Rooting -

I am trying to test that the locking of workloads in Android L by removing the device instead of creating a custom ROM Can be completed or not. & lt ;? XML version = '1.0' encoding = 'UTF- I have created a' device_owner.xml 'file and placed it in \ data \ system. 8 '& gt; & Lt; Device owner & gt; Package = "com.ta.instrumentcontroller" name = "TA tool controller" & lt; / Device-owner & gt; On reboot, the Nexus 7 2013 tablet sits on the logo 'Sharing Android Balls'. If I go to TWRP and delete the file, then the boot sequence is completed. Do anyone know what's going on? I do not believe that what I am trying to do is possible, because this system is not in the image Was made. On this Google Git page, the function is installed (): Static Boolean is installed (string packagename, package manager, pm) {try {PackageInfo Pi; If ((pi = pm.getPackageInfo (package name, 0)) = null) {if ((p...

nginx - Centos 7 SELinux Policy with Samba -

The Samba and NGN service is installed on my server under Centos 7 Web applications To allow / operate in / www based on www Nginx I use the command chcon -R -t httpd_sys_content_t / www But in this case it is impossible for permissions for the shared / www directory by Samba. P> Requires access to / www files. I do not know how it should work with full access by samba and ngnx. Please help, thank you! In this case you have changed the file reference due to the Nginx service / Www / Try to label the bar: chcon -R -t httpd_sys_content_t / www Then create a soft link for / www '# ln -s / www / mysambashare The use of semanage does not only reboot the link; Just Goal: '# Seminigas FactNext-A-samba_share_t / mysambashare

c# - A data structure like Queue with access to last element -

I need a data structure like a queue only at the end of the cue, only the first element can be extracted and new elements are added You can. And I also need access to the last element. System.Collections.Queue requires all but the last feature. I wonder if there is any kind of data structure built into it? The C # class is exactly what you need. See

mysql - Select rows with the same Item name and show lowest Price -

We have two tables: product IDs. Items | Supplier 1 | Harry Potter | Warner 2 | Harry Potter | Warner 3 | Throne game HBO 4 | The Simpsons | Warner 5 | The Simpsons | Warner and value ID. Price 1 | 10.9 9 2 20.00 3. 20.00 4 10.00 5 | 12.00 I am trying to get the lowest price item where there are two items with the same name and supplier. I can find those rows where duplicates are as follows: SELECT Products.ID, Products.Item, excluding products.Supplier, Prices.price products Prices at Price Id = product. Id where the product. ID IN (Item ID from the item where Supplier = "Warner" group item has been counting (*)> 1) How can I modify only this I duplicate item name ? I tried to order but it throws an error for me. The result should be: id. Items | Supplier | Price 1 | Harry Potter | Warner | 10.9 9 4 The Simpsons | Warner | 10.00 Thanks, Rick All your implementation of tables must be improved in the first place if your product table...

Accessing variables in another file with PHP -

How can I get variable values ​​from another file in php? To get the value of $ name stored in file 1, I need a file and store it as a variable file1.php: $ name = "myname"; $ Name echo; file2.php: $ name = "" Add it at the top of the file 2.php: Include ('file1.php');