by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 11 2019 23:36
    @MadLittleMods banned @gfhkj
  • Jun 13 2019 17:43
    @rostrander_gitlab banned @habibatify_twitter
  • May 06 2019 21:25
    @MadLittleMods banned @amanmahendra00_gitlab
  • Apr 30 2019 15:20
    @MadLittleMods banned @Baranov1D_twitter
  • Apr 27 2019 05:45
    @MadLittleMods banned @zhonghuacx
  • Feb 19 2019 00:49
    @MadLittleMods banned @Whats-In-My-Vape_gitlab
  • Oct 13 2018 17:05
    @InternetUnexplorer banned @akhilreddy4245
  • Aug 20 2018 13:56
    @InternetUnexplorer banned @JMP2DIS
  • Jun 26 2018 09:23
    @MadLittleMods banned @chinedu69931716_twitter
  • Jun 16 2018 16:41
    @InternetUnexplorer banned @mewovi21_twitter
  • Jun 08 2018 02:57
    @MadLittleMods banned @VPB_COM_twitter
  • Jun 05 2018 23:12
    @MadLittleMods banned @LWSS
  • Jun 04 2018 17:35
    @MadLittleMods banned @Dreamboy6668_twitter
  • Jun 04 2018 17:34
    @MadLittleMods banned @javaaltu1_twitter
  • Jun 04 2018 17:33
    @MadLittleMods banned @alam110
  • Jun 04 2018 17:33
    @MadLittleMods banned @MixedVideo_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @Hakmabhai1_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @raza_shahjad_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @simarjeetsohna_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @malikbila5_twitter
babytiger0929
@babytiger0929
hope helpful
:-)
Amir
@uthemus
Blank screen. <body> is empty. So odd....
babytiger0929
@babytiger0929
OMG
Amir
@uthemus
console.log(response) outputs the full source code. console.log($(response).find('.content') is empty. That seems impossible. Unless I can't traverse the response with find()
babytiger0929
@babytiger0929
can you sure me response simply?
Amir
@uthemus
I promise you, <div class='content'> is in the response.
babytiger0929
@babytiger0929
mmm...
Amir
@uthemus
I'm looking right at it.
Is there a way to manipulate the response on server-side?
babytiger0929
@babytiger0929
var content = $(response).find(".content")['prevObject'][0];
Amir
@uthemus
ha. let me try...
babytiger0929
@babytiger0929
try with this once again
Amir
@uthemus
Outputs empty #text " "
Amir
@uthemus
I think it doesn't work with class. Tried it with id element and it works.
Weird
babytiger0929
@babytiger0929
so your problem is solved?
Amir
@uthemus
Maybe...not sure yet. haha. Will let you know. Thank you very much for helping.
babytiger0929
@babytiger0929
my pleasure
Amir
@uthemus

@babytiger0929 So, what you suggested works on the front-end, but not the server-side. :point_up: 29 mei 2020 22:34

success: function(response) {
  var items = $(response).find('.item');
    for (var i = 1; i <= items.length; i++) {
      $('.item')[i].replaceWith(items[i]);
    }
}

I can traverse the DOM and replace everything on front-end, but the items are no longer in sync with the server and database. It's as if the PHP foreach code is lost.

success: function(response) {
  var newDoc = document.open("text/html", "replace");
  newDoc.write(response);
  newDoc.close();
}

This is the only code that works and everything is synced with the server and database. But it writes the full source code. I just want to write the piece that fetches from the server in the PHP foreach loop and still have it synced.

So, that's what I'm dealing with.

Amir
@uthemus
@babytiger0929 Hey there. It took me a while to notice that the scripts stopped running after the AJAX call. I had to delegate all my jQuery event handlers by changing ('#id').on('click', function(){}) to (document).on('click', '#id', function(){}). Now trying to get my vanilla JS to work though. But thanks, your code worked.
Fintan Moloney
@Josebuendia
@Josebuendia
Hi, is there a Gitter channel for Android development and Android Studio issues, or is anyone here knowledgeable in this area?
Is it dangerous to change Windows features and the BIOS?
Fintan Moloney
@Josebuendia
Like Unselecting all Hyper-V related options,.
Akshay Krishna
@akshaykrishh
Hey guys!!
So posted my first YT video today. It would be great if you could like, share and subscribe to my channel. Thanks ❤️ https://www.youtube.com/watch?v=ZGoYkRE-CAA&t=76s
Kris Baillargeon
@krisb1220
let makeNewTask = async function(ToDo, email){

    let doc = await UserModel.findOne({"email":email}, async (err, doc)=>{
      doc.data.tasks[ToDo.ObjectID] = await ToDo;
      console.log(doc);
      await doc.save();
      return doc;
    })
    await doc.save((err, doc)=>{
      if(err) console.erro(err)
      else console.log("Saved with no errors...")
    });
  }
Anyone have any idea why my document isn't saving?
I can't figure it out for the life of me
Ignore all the awaits, I was just trying to get it to work lol
There's no errors on save
It's updating the document with the data, but for some reason it refuses to save
Kris Baillargeon
@krisb1220

@krisb1220
Okay, so I got it but..
I did it like this

  let makeNewTask = async function(ToDo, email){
    let ObjectID = ToDo.ObjectID;
    let update = {
      data: {
        tasks: {}
      }
    }

    update.data.tasks[`${ObjectID}`] = ToDo;

    let doc = await UserModel.findOneAndUpdate({"email":email}, {
      $set: update}, {upsert:true, useFindAndModify: false})
    }
  }

And instead of just adding onto the nested object it completely resets the parent object (data) to only feature that task

Richard
@rylew0925
Hi, a quick question about CSS Typography. I have an instruction that states, "Set the display of the img element within the article element to none." Is it asking to make the img element a child of the article element?
Julian Gonggrijp
@jgonggrijp
Seems more like it assumes that the image is a child of the article already.
Fintan Moloney
@Josebuendia
Is there a chance that following the instructions here: https://stackoverflow.com/questions/16091677/intel-haxm-installation-error-this-computer-does-not-support-intel-virtualizat could mess up my computer? I'm trying to create a VM for using Android Studio.
Fintan Moloney
@Josebuendia
Can using multiple frameworks mess up your project? Like Bootstrap, JQuery, Rails, & PhoneGap.
Kris Baillargeon
@krisb1220
@Josebuendia Well Bootstrap and jQuery won't. Rails is a serverside language and it's in Ruby, so it won't have any effect on your clientside javascript. PhoneGap I'm not sure about.
The only issue you'd run into is namespaces, right?
So if PhoneGap has a function labeled $() like jQuery does, whichever script you link last will have hierarchy
babytiger0929
@babytiger0929
@uthemus of course, you need
because you can't select element created dynamically directly
Fintan Moloney
@Josebuendia
So, sounds like its something to be aware of but not a massive stumbling block. Thanks.
@krisb1220
Kris Baillargeon
@krisb1220
@Josebuendia Precisely!
And if you find an issue, just rename the function in your source.
Or, even better
Create a variable that just renames the function. Ex
let newFunction = function(){  
 return conflictedFunction()
}
Although there's some mental gymnastics involved with making sure the original isn't available but the copy is, it shouldn't be super hard :)
Kris Baillargeon
@krisb1220
Hey guys
I made a cool little VSCode snippet file that has the following snippets:
  • Get route (!get)
  • Post route (!post)
  • Javascript/CSS/Basic comment block Comment Block (!cb)
  • HTML Comment Block (!htmlcb)
  • Express Boilerplate (!ebp)
Kris Baillargeon
@krisb1220
@krisb1220
Okay so
I added a crap ton more, kinda went off LOL
I basically added anything that's repetitive that I've used so far in my current project
Here's the list:
  • Add comment block in Javascript ------ !cb
  • Add comment block in Javascript ------- !htmlcb
  • Bcrypt hash + return hash -------- !hash
  • Compare bcrypt hash ----- !hashcompare
  • Add a route with post|get and res.send|res.json|res.render ------- !route
  • Add a post route res.send|res.json|res.render -------- !post
  • Add a get with res.send|res.json|res.render ------ !get
  • Axios post ----- !axpost
  • Axios get ------- !axget
  • Axios with get|post|put -------- !axios
  • Require a module --- !reqmod
  • Require an internal module --- !reqint
  • Export a function -- exports.function = function(){} ---- !expfun
  • Export a global variable -- exports.var = var ------ !expvar
  • Export internal module.data -- exports.var = require("/data").data -----!expmod
  • Mongoose.connect ------ !mongooseconnect
  • App.use() -------- !use
  • Init session -- App.use(session) with boilerplate options ------- !session
  • Init passport -------- !passport
  • Init session and passport in correct order -------- !sessionpassport
  • Start express app -- const app = express() ------- !app
    Link: https://gist.github.com/krisb1220/5763dd04853ce3ddec9e914551db8ec9
Kris Baillargeon
@krisb1220
chris-czopp
@chris-czopp
Hi guys, I'm writing an online IDE + JS framework to code frontend faster and with no boilerplate setup. Imagine you can quickly prototype UI with HTML, add few attribute directives and boom! :bomb: You didn't touch JS yet but you already have a working app. Actions are generated and they use data you wrote in HTML. E.g. what you have in your LI tags becomes and action which returns an array of objects. When you done coding, you can download stand-alone code, run docker-compose up and you can keep changing it as you wish. It uses Webpack, Babel and all other open source goodies. You can find more here: www.glue.codes where you can try demo without giving away any of your details. Here is the framework repo: https://github.com/gluecodes/gluecodes-framework. Can you give me some feedback and if you like it, follow my social media and help spreading details about the project or talk to me if you'd wish to contribute. Apologies to those who feel offended by this message. I 'm just trying to get to developers as I really believe it'll make our frontend lives more enjoyable :wink: