Java

Dedicated to the discussion of the Java programming language a...
Jul 20, 2017 18:25
@Wietlol thanks again!
Jul 20, 2017 18:19
I didn't see that line on the webpage linked where did you get that?
Jul 20, 2017 18:17
thanks!
Jul 20, 2017 18:17
ah i see
Jul 20, 2017 18:14
is that what is boils down to
Jul 20, 2017 18:14
convenience vs readability?
Jul 20, 2017 18:13
hey, just wondering why in java you can have methods with the same name? What is the benefit to doing this? Thanks!
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Jul 11, 2017 15:16
hey, in react is it bad practice to reuse mapStateToProps functions between components?
 
Apr 14, 2017 01:08
got a response: {message: "Added “Earn What You're Really Worthˮ to playlist My Financial Playlist!",…}
message
:
"Added “Earn What You're Really Worthˮ to playlist My Financial Playlist!"
playlist_content
:
{id: 10221, order: 1, created_at: "2017-04-14T01:08:19.116Z", updated_at: "2017-04-14T01:08:19.116Z",…}
reorder_url
:
"https://pmp.psft.co/playlists/8efb8662-d4ad-4683-bbdf-3bb3e80e93db/contents/10221/reorder.json"
Apr 14, 2017 01:07
$("select#addto_select").on('change',function(){

var playlist_id = $(this).val();
var content_id = $('.item_id').html();
var content_id = "51ce5736-42f9-4cb8-842c-90bc99146c84";
var token = "2b28ef0a4d7179185ba596361944739307e8d9427cd745948047c3a8e96b26f8";
var data = "{\"playlist_content\" :{\"content_id\" : \"ef0a30ef-3198-4ce6-8927-e390257776ed\"}}"

var data2 = {
playlist_content:{
content_id : content_id
}
};

var url = "https://pmp.psft.co/api/v2/playlists/"+playlist_id+"/contents?access_token="+token+"&playlist_id="+playlist_id;
Apr 14, 2017 01:07
i got it working
Apr 14, 2017 00:55
in the fiddle I get a cors error
Apr 14, 2017 00:54
try passing that
Apr 14, 2017 00:54
make it a plain javascript object
Apr 14, 2017 00:54
sorry copy paste wasnt working
Apr 14, 2017 00:54
var data2 = {
playlist_content:{
content_id : content_id
}
};
Apr 14, 2017 00:53
why dont you just make this:
Apr 14, 2017 00:53
hey guys
 
Apr 13, 2017 18:44
If you have an exact example from your code base I can work through it with you
Apr 13, 2017 18:43
its UI routers way of making the urls well structures
Apr 13, 2017 18:43
instead of /#/home
Apr 13, 2017 18:43
you would end up with //home
Apr 13, 2017 18:43
and go somewhere deeper into the application
Apr 13, 2017 18:43
because if you just leave it as /
Apr 13, 2017 18:42
so if you give an actual url (some letters or words) then it doesn't need to add # as a filler
Apr 13, 2017 18:42
I think because you just have a / there instead of /test it creates the #
Apr 13, 2017 18:27
.state("/", { to .state("start", {
Apr 13, 2017 18:27
and typically you name your states
Apr 13, 2017 18:27
url: "/", to url: "/test",
Apr 13, 2017 18:26
what happens if you change / to /test ?
Apr 13, 2017 18:26
I may be wrong but I don't think htm5Mode has anything to do with why those #### are appearing. In your routing urls do you add # anywhere? What backend are you using? You can likely using some kind url formatting rules to remove the hash for certain URLS. In php you can use .htaccess and map this: example.com/#/home to example.com/home
Apr 13, 2017 18:26
@Kartheeks what is putting the # in eg: example.com/#/home
Apr 13, 2017 18:26
what is putting them there in the first place?
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Mar 28, 2017 17:30
security and other reasons as well
Mar 28, 2017 17:30
typically because get verb means to retrieve data
Mar 28, 2017 17:29
and apply the retrieved data to some dom element
Mar 28, 2017 17:29
ajax allows you to send post data and retrieve it without refresh
Mar 28, 2017 17:28
or whatever and have it listen for post data
Mar 28, 2017 17:28
you setup a different page called api
Mar 28, 2017 17:28
yeah provided you are posting to that page
Mar 28, 2017 17:27
then you can use ajax to call that page
Mar 28, 2017 17:27
with something like
Mar 28, 2017 17:27
and echo back the data
Mar 28, 2017 17:27
have it look at $_POST['likes']
Mar 28, 2017 17:26
you could create a new php file
Mar 28, 2017 17:25
7
Q: Pass data from jQuery to PHP for an ajax post

machaHello I am a newbie working with jQuery and Ajax. I am trying submit data to the server using Jquery POST method. And the data that I am passing is a string. Now I am unable to understand how do I pass the data and how do I retrieve the data. I have tried searching for articles for my problem, bu...

Mar 28, 2017 17:25
you might want to look at $_POST
Mar 28, 2017 17:24
eg: $_POST['likes']
Mar 28, 2017 17:23
so in this php file you have something listening for a POST?
Mar 28, 2017 17:20
@AshwinBaskaran do you a url / php file that can handling submitting like data to?