@littlepootis No way! As part of the js team you must join us! When a clueless newbie bash in and ask how to do 1+1, we educate him why he must use ES6 and introduce browserify and babel!
@astrosixer What do you want to do? You statement may work fine, so there should be some context it is missing. Do you want to recover data from deleted DOM node?
@littlepootis In the case I debugged, most of them are hidden. I think It's the category management page and it actually submits everything - name, order, hierarchy, status (many), etc.
hey guys, so I'm reading through the JS documentations. And I'm working on a tutorial where there's this code:
<script type="text/javascript">
$(document).ready(function(){
});
function sendPushNotification(id){
var data = $('form#'+id).serialize();
$('form#'+id).unbind('submit');
$.ajax({
url: "device_sendmsg.php",
type: 'GET',
data: data,
beforeSend: function() {
@littlepootis For example, each category has "parent" and "order" which can be changed by drag and drop. And the buttons will change things like "enabled", "hot", "new". When you in multi-lingual text with a big tree...
@Joshna Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
You can regard V8 as a compiler that compiles JavaScript to assembly code.
The compiler can be written in C++, but it can also be done in other language. Java also has a built-in engine that compiles JavaScript to Java bytecode.
@Sheepy Have a list item. Upon deleting its count or sl no should update.. Here is my code ...
function deletNremove(value){
var countTrelements = document.getElementsByTagName("tr");
var numberOfitems = countTrelements.length;
var deletingValue = document.getElementById("de_"+value).firstChild;
var actualValue = deletingValue.innerHTML;
alert(actualValue);
for(var k=actualValue;k<=numberOfitems;k++){
var valueOf = +k+1;
alert(valueOf);
@Joshna You are welcome. Please be aware that JavaScript doesn't need to be compiled. In the early days JavaScript is simply interpreted, so there is no conversion at all (at least not into another language).
@astrosixer Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
@Jacta Like I said, first thing I'd try is turn it into one json. (deflate it if necessary). If you insist on splitting it, there are many ways. Good luck~
Dear Excel 2016: If I type '000000 into a cell, I want a number stored as a text. It's not an error. Stop shoving it to my eyes everytime I do that. When I click "ignore this error", I don't mean "in this cell".
@SamIbraheem $(function($) { ... }); is equivalent to $(document).ready(function($) { ... });
jQuery(function($) { ... }); is the safest, because it tolerates $ being overwritten, and puts $ in scope in the callback, and guarantees you wont get messed up by code loading another jquery. You will use the jQuery that existed at the moment your script ran
if you set event handlers or use .data and something else loads jquery again, you're screwed if you don't capture one jquery reference and keep it
Now I know that we're forming a URL that passes data through GET, but I have some questions: 1- $('form#'+id).unbind('submit'), what does the form#+id mean?
or gist.github.com if it has no chance of running. doesn't matter
thanks
@SamIbraheem if a selector is tag#id such as form#foo then the browser really does a lookup for id foo, and if it finds it, makes sure it is a form, and if it isnt a form, no matching elements
the tag is pointless, it doesnt help the browser, it makes it do more unnecessary checks
and don't piece together ids
everyone is doing $('#thing' + i), and that is a terrible way to do it. it's getting annoying to constantly say it
@SamIbraheem The questions you asked can't be understood without a good idea on how JavaScript works. You may want to give it a proper study: Eloquent JavaScript
isnt it bad to store a list of json data in a global variable and doing the iteration again. Lets say there is a json response which have country,state and city. Actually I have 3 drop down in a html page named country,state and city. When a country is selected then the respective states will be displayed. Upon selecting a particular state,respective cities should be displayed. So I asked for 3 webservices but instead they gave me a single websevice which is having all couuntry,states and cities
and told me to store the whole json in a global variable and iterate accordingly
@SpringLearner It is not bad to give you a list of json. The number of cities in a country is relatively low, and is pretty static, so it saves you and them the trouble of lots of small requests by sending you the full list.
anyway, if you get data from ajax, store the promise and use .then to use the response. dont sneak async data into some cheater variable that magically sets itself out of nowhere
but absolutely, the lowest byte could come first, or highest. endianness is an issue if you play with nodejs buffers
big-endian is the way we write numbers with a pen... little endian allows you to interpret a 32-bit variable as a 16-bit variable without changing the address
if you tried to use the low half of a 32 bit big endian number as a 16 bit value, you would need to bump the pointer forward 2 bytes
so, while it feels backwards, little endian makes slightly more practical sense
Someone here good with innodb recovery? I have a .frm and .ibd files for a wordpress database, and I need to dump all the data. Don't want to reconstruct the entire database/tables, just want to get as much data from it as possible. The files are from a MySQL on Windows server, and my recovery environment is linux :|
@doug65536 hmm, just to ensure we are on the same page, I have the different table files like wp_users.ibd, wp_pages.ibd etc. so it will take one table file and dump the data for that table, right?
The scenario is that windows crashed (how surprising) and with great pain I have recovered these files from a clone of the ntfs volume on a clean linux environment. fortunately the ntfs volume was in a clean state and shutdown when the crash occured, so the state of these files is guaranteed to be usable by inno if the tablespace ids are matched. but... I don't know how to do that :P
@CiaranSynnott Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
As You can see in Figure 1 .
I have a Main Div - which is Droppable
With Four Draggables namely A , B , C , Fit.
On drag Of A , B and C div into the droppable Main Div - It occupies the space as shown in Fig 2.Now if I drag another div (A , B or C) then it should occupy the space with respect...