JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Aug 28, 2018 08:03
@KarelG If store.tag message exists I am searching an additional value apart from what it is done in the if block, can I make all in one shot. I am repeating this part
(store.name.toLocaleLowerCase().indexOf(val.toLocaleLowerCase()) > -1) || (this.getLocality(store.locality).locality.name.toLocaleLowerCase().indexOf(val.toLocaleLowerCase())> -1)

twice in code, can I make it single time by not declaring additional variable
Aug 28, 2018 07:51
Is it possible to refactor the following code shorter and better
```
if(store.tag){
return (store.name.toLocaleLowerCase().indexOf(val.toLocaleLowerCase()) > -1) || (this.getLocality(store.locality).locality.name.toLocaleLowerCase().indexOf(val.toLocaleLowerCase())> -1) ||
(store.tag.toLocaleLowerCase().indexOf(val.toLocaleLowerCase())> -1)
}
else{
return (store.name.toLocaleLowerCase().indexOf(val.toLocaleLowerCase()) > -1) || (this.getLocality(store.locality).locality.name.toLocaleLowerCase().indexOf(val.toLocaleLowerCase())> -1)
Jan 6, 2015 16:52
@NickDugger, sorry, I will add my code in pastebin
Jan 6, 2015 16:51
in html the code will be like this

<td>{{ case.sol_high }}</td>

and the json I get is

[{"_id":"54a9d8d3a864f9d815ad604f","timestamp":"2015-01-05T00:20:35.477Z","videoName":"","bannerName":"","thumbName":"","sector":"? string: ?","content":false,"lon":"-0.12775829999998223","lat":"51.5073509","location":"London","globe":true,"name":"Retail experience design","__v":0},{"_id":"54a9de51a864f9d815ad6051","timestamp":"2015-01-05T00:44:01.385Z","videoName":"c4bbf7608e3d5256a64c47afda955eeb.mp4","bannerName":"1c6f065ecd95d74772d749e88972467e.png","thumbName":"33d31f9094f84f5bc7cf38fb96243391.jpg
Jan 6, 2015 16:48
@NickDugger from database, I get this "<li>abc</li><li>abc</li>", using angular js I added it
Jan 6, 2015 16:46
I added html content "<li>abc</li><li>abc</li>" inside div tag using , but it is not being rendered as bullet points. I am seeing it as <li>abc</li><li>abc</li> in browser, how to I fix this ?
Sep 7, 2013 13:26
ya @Pinocchio, I tried in server too.
Sep 7, 2013 13:24
In server python is making that quotes while fetching json from database and making it JSON @Pinocchio
Sep 7, 2013 13:23
@Pinocchio My variable looks like this a.data = "[{"id": 1}]" , I need to convert that to JSON. struggling from 3 hours
Sep 7, 2013 13:20
I need to make that JSON, to use id
Sep 7, 2013 13:20
it looks like that
Sep 7, 2013 13:19
My variable is a.data = "[{"id": 1}]"
Sep 7, 2013 13:17
@dystroy thanks
Sep 7, 2013 13:15
it's generated from server, How do I remove them
Sep 7, 2013 13:13
why m =JSON.parse("[{"id": 1, "la": 30}]") leading to
SyntaxError: Unexpected identifier.Can someone help
Sep 7, 2013 12:53
If I assign this m = "[{"id": 5, "la": "3"}]" I am Unexpected identifier error, how to overcome this
Sep 7, 2013 12:51
If a assign this m = "[{"id": 5, "latitude": "33.000000"}]" I am Unexpected identifier error, how to overcome this
Sep 7, 2013 08:26
I will try that thanks
Sep 7, 2013 08:23
@O0oO0oOO0ooO , You are right, my problem is when I define a marker var markeranit = new google.maps.Marker(); the eclipse is showing the error that google is not defined, how can I set eclipse to ignore this type of error
Sep 7, 2013 08:16
question : In eclipse, I have installed JSDT, I am working with google maps API and jQuery, In the left side vertical error bar ( What to call this ) , it's showing error as $ is not defined or google is not defined ( google from maps api) how to overcome these errors, but I want other suggestions from it
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
Jan 6, 2015 16:43
I added html content "<li>abc</li><li>abc</li>" inside div tag using , but it is not being rendered as bullet points. I am seeing it as <li>abc</li><li>abc</li> in browser, how to I fix this ?
Jun 15, 2014 22:33
@PatsyIssa it's ok, thanks
Jun 15, 2014 22:29
oh
Jun 15, 2014 22:26
do u mean the link I put up
Jun 15, 2014 22:26
@Pa
Jun 15, 2014 22:21
finally found it.It's just a web font kroods.com/css/font-awesome.min.css
Jun 15, 2014 22:17
Hey I want to take the facebook image icon from this page kroods.com , I don't see any .png or .jpg format image by chrome inspect, can someone help me for a minute ?
 

Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Dec 30, 2014 13:45
@PM2Ring that's awesome, you made my day !!
Dec 30, 2014 13:05
oh let give a try print "kevin"
Dec 30, 2014 13:04
I thought `` will format the code
Dec 30, 2014 13:03
`
if quantity:
if quantity == 'gm':
items = items.exclude(cost_gm=0.00)
elif quantity == 'oz':
items = items.exclude(cost_oz=0.00)
elif quantity =='fourth_oz':
items = items.exclude(cost_fourth_oz=0.00)
elif quantity == 'half_oz':
items = items.exclude(cost_half_oz=0.00)
elif quantity == 'eighth_oz':
items = items.exclude(cost_eight_oz=0.00)
`

how do I make this code short.
Dec 30, 2014 10:05
thank you
Dec 30, 2014 10:05
yeah
 

Trash can

Like the recycle bin, but trashier.
Dec 30, 2014 09:59
Any Django Ninjas ??

http://stackoverflow.com/questions/27702532/django-mysql-join-to-increase-performance
 

Web Developers

Room to discuss javascript and jquery, php and mysql issues. b...
Apr 7, 2014 10:21
yes, there is a java server someone else wrote it, via which it inserts
Apr 7, 2014 10:20
I check the mysql database via PHPMyAdmin
Apr 7, 2014 10:19
I am getting data from bluetooth sensors, I don't have access to those
Apr 7, 2014 10:16
@CJRamki
Apr 7, 2014 10:16
created by other person
Apr 7, 2014 10:15
I get new records from the sensors
Apr 7, 2014 10:15
I don't insert it
Apr 7, 2014 10:10
yes @CJRamki
Apr 7, 2014 10:08
Help!!! Every second new will come to mysql database, soon after getting a new datapoint I need to run PHP script.
And this should run 27X7, how can I do this.
 

MySQL and relational databases

Ask your question, and then hang around a while to see if an e...
Apr 7, 2014 10:08
Help!!! Every second new will come to mysql database, soon after getting a new datapoint I need to run PHP script.
And this should run 27X7, how can I do this.
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Apr 7, 2014 10:06
I need to accomplish
Apr 7, 2014 10:06
with PHP
Apr 7, 2014 10:06
@Dav
Apr 7, 2014 10:03
Help!!! Every second new will come to mysql database, soon after getting a new datapoint I need to run a command.
And this should run 27X7, how can I do this ?
 

Hello World

For beginners of programming,testing,security etc Developers a...
Aug 9, 2013 12:13
I am a begginer in ubuntu, sorry for linux question : my contents of .sh file are 'sudo -i
cd /home/madhu131313/Documents/',I run it ,then it asked for root password, it changed to root, but it doesn't execute the changing directory
 
Aug 9, 2013 12:10
sorry for linux question : my contents of .sh file are 'sudo -i
cd /home/madhu131313/Documents/',I run it ,then it asked for root password, it changed to root, but it doesn't execute the changing directory