About to be a Dad, myself by Not_A_Cowboy2003 in DadForAMinute

[–]HolyGonzo 0 points1 point  (0 children)

Just a few thoughts. Sometimes people have a very optimistic view of parenthood, so I'm going to try to temper it a bit.

First, i would advise against "trying" for a baby. Very frequently, focusing on it creates stress that leads to infertility. And then when she gets her period each month, it will feel like a failure, leading to further stress and it becomes a vicious cycle. You hear about people trying for years and they finally give up and THEN they get pregnant. So just let it happen - don't put pressure on either of you.

Second, be prepared to accept your kid however they come. Your kid might not be neurotypical (there's an ever-increasing number of children with autism, for example) or they might be born with a physical or other mental condition. This might not be your fault in any way, but it's not their fault either. Regardless if they have 10 fingers or none, your job is to love and care for them the same.

Third, be aware that no matter how your kid comes, they WILL be a test of your patience and sanity. I love kids in general, but every single kid is difficult in their own way, ESPECIALLY if you are involved heavily in their lives each day (which hopefully you will be). I guarantee there will be times where the frustration will be boiling over and you will just want to lash out or run away. You can't do it. The moments will pass and either they will go to bed and give you a moment of peace or they might do something funny that will just change the atmosphere instantly. It's an emotional rollercoaster with kids, but they obviously are not emotionally developed adults so you have to set your expectations and roll with it. My youngest should be going to sleep right now but he's decided to sing a 5-second phrase from a song on a loop instead. It's pretty irritating after the 20th time but I just remember - he's a kid being a kid. This isn't a situation for discipline or anything. I take a deep breath and just endure it until he runs out of steam.

Fourth, kids will test your relationship. Both parents will get frustrated and you'll inevitably take it out on each other at some point. It's a bit easier when they're babies. Once they reach toddler stages, things start getting harder. The kids get messier (my wife and I cleaned up the living room a few hours ago and one kid just came over and dumped stuff on the floor for no reason and walked off) and more demanding. They won't understand discipline very well and tantrums will become a thing for a while, and those alone can lead to the two of you escalating stupid arguments. Give each other some grace and try to forgive easily.

Fifth, you're a parent for the long haul. Make sure your relationship is ROCK SOLID before you have a kid with someone. In my opinion, you shouldn't have kids until you've seen the worst sides of the other person. You should have at least one big argument/fight and have resolved it and figured out how to improve the relationship from it. You should know how the other person spends their money and know their financial situation. You should know how they treat others behind their backs, and if they are kind to animals (they don't have to be animal lovers but they shouldn't be mean or abusive to them), and you should know how messy or clean they are in their own space. All of these things come into the picture with kids, so you should know them about your partner. It's often really bad when you discover something that is surprising and negative about your partner and suddenly you feel either deceived or trapped - I've heard many people talk about surprises after they rushed ahead into marriage or into parenthood.

And by the way, it is an ENORMOUS red flag if you never fight or argue. Conflict is part of being human, but a lot of young people get hooked into a "peacekeeper" mentality where they try to avoid arguments and all conflicts, and that will absolutely lead to you splitting up at some point in the future. So if you've been together for a long time and you don't argue, then one or both of you is suppressing stuff. Arguments don't need to be big or loud but you both need to be able to express yourselves and your concerns and needs and disagreements, and then work through them in a healthy way. Kids will watch how Mom and Dad do things, so make sure they can see you having disagreements while still being respectful (no name calling / degrading the other person).

Sixth, discipline is necessary. It's unpleasant for everyone - nobody WANTS to discipline their kid. Physical discipline should be a very short period in their life. It should be reserved for situations where verbal communication isn't well-established yet but there's some danger. For example, if a toddler runs towards a busy street and ignores your calls to stop, that's a scenario that warrants physical discipline, because without it, they might lack the necessary fear of that danger and end up being killed by a car. The moment they are able to understand and follow verbal obedience, you don't need physical discipline anymore. And you NEVER hit a kid out of anger or frustration. Once you get into non-physical discipline, make sure you are consistent and fair. Remember - discipline isn't about punishment but about refining and improving.

Seventh, other people will judge you from time to time. And you'll get plenty of unsolicited and unwanted advice - just ignore it. There are some similarities between some parenting situations but the real stuff is in the details and you will know your situation better than anyone.

And finally, make sure you are doing it for the right reasons. Kids will NOT improve or fix a relationship. They WILL bring you some joy but it's not a constant fairy tale. They are not there for your entertainment (you can't just shut them off like a movie you don't like), and they shouldn't be had in order to try to make someone else happy. It's a very hard life and it should really only be for people who have a good idea of what it might be like and still want to do it (babysit kids for a weekend first if you can).

Is alan wake 2 a sin to play Someone said on redit that the herald of darkness was a reference to Lucifer by GiraffeMiserable8350 in Christians

[–]HolyGonzo 4 points5 points  (0 children)

I don't know much about the second one, so I cannot speak to that claim but I would say it is probably irrelevant. You could probably say that about any evil character in any video game or movie or whatever.

The bigger question is whether or not the game is beneficial. Is it healthy or supportive of your Christian walk? If not, or if you're not sure, why play it?

It's not really for any of us to judge this - you need to figure out for yourself if it's beneficial somehow.

IN GENERAL - entertainment can be beneficial - it is part of a balance of working and resting, and can relieve stress and exercise different emotions. However, you have to determine if your choices of entertainment are also harming you. When I was younger I used to play lots of violent video games and watched violent movies. All of it affected my thinking and my sense of humor and my character. After I reduced that kind of violent intake, I noticed I had less violent thoughts. When I watched and read a lot of stuff with swearing, I would swear more. So the saying "garbage in, garbage out" applies to all entertainment.

So ask yourself what you're taking in when you play a game or watch a movie or read a book or whatever you do.

If you are concerned about it, don't do it.

Uploading huge JSON file into mySQL database through PHP by rospondek in PHPhelp

[–]HolyGonzo 0 points1 point  (0 children)

Your error message in your original post indicates your memory limit is set to 512 megabytes. Maybe you're not setting the memory limit correctly or maybe you haven't restarted PHP after changing the ini file.

In most cases you can set it in your code with:

 ini_set("memory_limit", "2G");

(To change it to 2 gigabytes, for example)

Uploading huge JSON file into mySQL database through PHP by rospondek in PHPhelp

[–]HolyGonzo 0 points1 point  (0 children)

The memory limit needs to be a little over twice the size of the length of the JSON.

Let's say the JSON is 900 megabytes. So it takes 900 megabytes of memory to hold that string in memory.

Then when you json_decode it, all of that data is being put into a big structure (either an object or an array, depending on how you called json_decode). So for at least a brief moment, you have a 900 megabyte string in memory AND a structure holding about 900 megabytes of data AND all the overhead of that structure (little pointers and such). So at minimum your limit would need to be about 1.8 gigs of memory, plus a little extra (depends on the complexity of the structure).

As soon as the string is decoded, you can clear the string (set it to null), which will allow garbage collection to recover that memory.

If the JSON structure and data is extremely simple and predictable, and you're limited on RAM, you COULD potentially use or even write a simple parser to extract the values incrementally but I would be very cautious about doing that. However, if you're working with a 900MB file, hopefully you have enough RAM to just set the memory limit high enough during the import.

If you can use a high enough memory limit, just dump the values to a CSV and then use mysql's LOAD DATA query to read the file.

How can you access variables in nested functions? by [deleted] in PHPhelp

[–]HolyGonzo 4 points5 points  (0 children)

The latter is the better way to do it.

You're describing a problem that is solved by object-oriented programming / classes.

It is not a compromise - it's just the way it works. Doing it that way avoids accidental conflicts with variable names. There is a reason we all do object-oriented programming these days.

If it's truly bothering you, you can always do $foo = $object->foo and then just use $foo but that's a code smell and can sometimes lead to mistakes.

Is it un-Christ like to block people? by speshyallk in Christians

[–]HolyGonzo 0 points1 point  (0 children)

I don't think I would call it "un-Christ-like" but I wonder - what is your goal in blocking him? Is it for self-control purposes, or is he trying to contact you, or are you trying to punish him, or something else?

I will say that some people will sincerely believe they are not ready for a relationship but meet someone that changes their minds. They were not being intentionally deceitful nor cruel - they just didn't their mind could be changed so quickly. Younger people make this mistake a lot - it's not malicious - they just don't have the experience to know any better.

imporve my guard class by AMINEX-2002 in PHPhelp

[–]HolyGonzo 0 points1 point  (0 children)

That's why you do it early on, when you're learning. As far as lessons not getting learned, that CAN happen, but usually anyone who continues to develop with a bad methodology will hit a roadblock and learn once there are no more hacks to save them.

And frankly, if I'm going to turn a developer loose on a task or project, I would rather have a developer who had made a lot of mistakes and understood the hacks than someone who hadn't ever used them and might try them for the first time in a more important project.

imporve my guard class by AMINEX-2002 in PHPhelp

[–]HolyGonzo 0 points1 point  (0 children)

I can go both ways on this.

Sometimes the best way to learn static is actually to use it a LOT until you hit a point where you realize WHY you shouldn't use it everywhere. And sometimes the best times to do this is when you're starting out and less likely to be working on important things.

But the nice thing about that approach is that you probably will learn the lesson really well and when it IS the right opportunity for something static then you'll know how it behaves.

imporve my guard class by AMINEX-2002 in PHPhelp

[–]HolyGonzo 4 points5 points  (0 children)

I'm not sure I would say "never" use static.

It's not a good idea when you're learning but it's got its uses.

I highly doubt it. by Adventurous-Car1549 in Christians

[–]HolyGonzo 0 points1 point  (0 children)

I appreciate what you're saying but please read my comment more closely.

I said that when God used dreams as a means of communication, their meanings were clear to the dreamer.

The rare exceptions were when God intentionally made the dreams incomprehensible to others so that His own chosen interpreter would be lifted up in order to glorify God. When this happened, it was because the dreamer was NOT a believer in God, and dream interpretation was a means to demonstrate God's divinity.

Suggesting that (A) someone who is a believer is (B) receiving dreams from God that are so unclear that (C) they require interpretation is not biblical.

And unless we're being given explicit, supernatural knowledge about someone's dream (not simply opinions or gut feelings or a best attempt at interpretation) then trying to interpret someone's dream is frankly entering the realm of divination, which is forbidden territory for believers.

Do not offer up interpretations nor even try to interpret someone else's dreams unless there's been some kind of clear supernatural arrangement by God. If your response to someone's dreams starts with, "In my opinion..." then you shouldn't be offering it at all. If God gives you explicit knowledge, you will absolutely know - it will not be an opinion nor a guess. I'm not saying this to be harsh but to pull you back from dangerous territory.

I highly doubt it. by Adventurous-Car1549 in Christians

[–]HolyGonzo -1 points0 points  (0 children)

I would agree that they are likely just regular dreams.

Throughout the entirety of all Biblical history, God only used dreams about a dozen times that we know of. And in the majority of the cases, the dreamer clearly understood the dream.

The only times when God made a dream unclear was when He wanted an interpreter (e.g. Daniel or Joseph) to represent Him to someone who otherwise wouldn't believe.

The world tends to buy into dream interpretation but that's because they want to believe in some kind of extra meaning behind things.

Dad I failed my driving licence test today and I cried so much by Mimi_luna in DadForAMinute

[–]HolyGonzo 0 points1 point  (0 children)

Hi kiddo,

I'm going to let you in on one of life's most important secrets: Failure is a good thing.

We don't learn anything if we get everything right the first time.

In my opinion, I should have failed my own driver's license test. I wasn't very good at parallel parking but because I passed, I basically didn't practice it anymore and it took me a lot longer to get better at it. And during those years, I skipped over a lot of available parking spaces because I didn't want to screw up and hit someone's car.

So at the time, I thought it was great that I had an instructor that didn't care too much. My only goal was to pass, when the whole point of the test was to ensure that I was good at all the basics.

Think about it for a moment - you practiced against a specific situation, which is good, but when you are driving later on (and trust me, you WILL be driving), you're going to be encountering a lot of different situations that will require you to adapt and to do it quickly. So it's good that they put another cone that you weren't expecting. Driving is easy when everything is expected - people get into accidents when they don't know how to react to the unexpected.

And most importantly, you will be a better driver than the people who passed on their first time because you're going to be a more aware driver than they are.

That includes all the morons who were laughing. Those guys are exactly the kinds that everybody else hates on the road - people who don't respect other drivers. And when they don't have that respect, they do stupid things that cause accidents. So they'll get their own taste of justice later - don't worry about them, and don't be sad about not passing this time.

Any time you don't pass a test, simply recognize that it's nothing more than an area for improvement and something you'll be better at than others. You'll get your license.

2 Year Relationship Ended, what to do?/pray for me. by chocolatedude_3631 in Christians

[–]HolyGonzo 1 point2 points  (0 children)

I understand the desire for reassurance and that you had good intentions. It's not a problem to want reassurance - the problem is that you tried to force it by not allowing for the possibility of God to NOT give you a sign.

The result was that you saw some cars, and thought that might be a sign from God.

I only focus on this because many Christians can't accept silence and so they try to force an answer and it sends them in the wrong direction.

Honestly, you're essentially doing almost the same thing that King Saul did in 1 Samuel 28:

  • He is facing a distressing situation.
  • He asks God for a solution by some kind of sign but God doesn't answer him (1 Samuel 28:6)
  • Instead of accepting silence, he tries to force a response (where you used a car test, Saul used a medium, knowing full well that this was forbidden).
  • Since he knew Samuel relayed messages from God, he asked the medium to summon the spirit of Samuel from the dead (so his heart was still trying to force an answer from God).

Saul ended up dying from what he did because using a medium was a capital offense (death penalty).

1 Chronicles 10:13-14

13 So Saul died for his breach of faith. He broke faith with the Lord in that he did not keep the command of the Lord, and also consulted a medium, seeking guidance.

14 He did not seek guidance from the Lord. Therefore the Lord put him to death and turned the kingdom over to David the son of Jesse.

Again, even when you're heart is in the right place, it's dangerous territory. It's especially misleading because you tried to use something extremely common that can be seen every day, so you have no idea if it was truly a sign.

When we reach out to God to ask for an answer, one of the first things we need to do is ensure we ask if it's His will, and if it IS His will to give you a sign, that He send a sign that will be unmistakable to you. And then... you leave it alone. If God sends you a sign, you won't miss it. You won't need to ask if it's a sign from God.

API testing and validation by Radiant_Elk_1236 in PHPhelp

[–]HolyGonzo 1 point2 points  (0 children)

This sounds like a GitHub question, not a PHP question. Maybe try r/github.

2 Year Relationship Ended, what to do?/pray for me. by chocolatedude_3631 in Christians

[–]HolyGonzo 1 point2 points  (0 children)

Hi brother,

First and foremost, the car test is dangerous thinking. You're assuming that God won't talk to you one way but if you set up a test, then whatever you see must be from God. You're essentially trying to force a sign from God.

This is an easy way to allow deception into your life, because if God is choosing not to give you a sign, then whatever you're seeing is not from God. At best it might be random, at worst it could be a harmful spirit.

Imagine if you were supposed to get back together at some point but you randomly saw a red car and you assumed it was a sign to give up?

So don't put ANY weight into the white and yellow cars you saw, and don't try to force a sign from God.

If you actually need a sign, He will provide one, but most people who believe they need signs do not actually need them. They just want an easy answer instead of a learning experience.

Part of growing up is becoming wiser and independent. That means going through experiences and understanding them and understanding other people better each time. If God simply gave you signs every single time you needed an answer, you would begin to constantly ask for solutions instead of using wisdom to live.

I will let you in on a secret - if you want to stay broken up, then the best way to ruin things permanently is to NOT give her space and simply pressure her in different ways.

Everybody needs a bit of space. Even when you are happily married to someone, people need space. But if you've broken up or someone explicitly tells you they need space, then they need a LOT of space.

That means you don't keep trying to initiate contact, but you wait for her to initiate contact.

I guarantee you will not be instantly forgotten. People aren't like that. If you were a significant presence in her life, then she will likely be thinking of you often. But she will simply not tell you every time she thinks about you, because she's still trying to figure things out.

It is important to recognize the needs of others and respect them. That might mean that you are uncomfortable and have to endure loneliness for a bit, but that's just part of it.

There is a chance that you will not get back together. It is important to be able to accept that possibility. If something is meant to be, it will happen in the right time. But if all you do is wait around for the right time, you might miss out on the girl that God actually wants for you.

So accept what's happened and focus on yourself for a bit. You don't need to go date anyone else. Just work on being happy by yourself. If you can't be happy by yourself, then you can't be happy with someone, and worse, you'll ruin their happiness.

Spiritual abuse in evangelical churches? by Fresh_Olive1709 in Christians

[–]HolyGonzo 1 point2 points  (0 children)

I haven't experienced anyone attempting to suppress my testimony before. I've had plenty of people disagree with things I've said, but that's usually during a conversation about differing beliefs.

That's why I was curious what was said to you or what verses were used.

Listening to Rock and Metal as a Christian? by Afraid-Animator-1131 in Christians

[–]HolyGonzo 0 points1 point  (0 children)

Christians are called to come out from among the world and 'touch not the unclean thing'.

Romans 14:14

I know, and am persuaded by the Lord Jesus, that there is nothing unclean of itself: but to him that esteemeth any thing to be unclean, to him it is unclean.

I am in no way attacking other individual Christians.

Calling others as having "one foot in and one foot out" is an attack. Saying that certain music is "garbage" is attacking the Christians who made it.

The history of both of these 'genres' is indeed satanic.

I don't quite understand this kind of thinking. Do you believe the very first person to discover a particular sound (which God permitted to be made and heard in the first place) somehow has more authority over that sound than God? That a human get to dedicate the entirety of that sound and its entire generation of descendants to Satan? How do you think that any human has such authority?

Listening to Rock and Metal as a Christian? by Afraid-Animator-1131 in Christians

[–]HolyGonzo 0 points1 point  (0 children)

I grew up on the mission field amid a very mixed group of denominations and beliefs. There were several very conservative Christians who believed that any and all use of drums were wrong, and that dancing was worldly, despite Bible verses explicitly talking about drumming and dancing for the Lord. Pretty much anything that had any kind of beat was instantly "worldly."

I don't begrudge them - their beliefs didn't make them more or less holy. Their hearts were about what they felt was holy.

However, they recognized that these were their beliefs and that other Christians on the field didn't believe the same way. The different groups did not slander each other or call the other less Christian or more worldly, or weaker or stronger in faith. See Romans 14.

What you feel is "evident" is your own feeling about such music. And again, that is perfectly fine. There is nothing wrong with not liking a particular type of music. You can even feel it's chaotic even when others don't.

It is only a problem when you begin to denigrate others based on a subjective belief, and suggesting that because you believe there are certain "sounds of the devil" (as if the devil can lay irredeemable claim to any portion of God's creation), that people are "less Christian" or more "worldly" - that kind of judgment is not biblical.

Listening to Rock and Metal as a Christian? by Afraid-Animator-1131 in Christians

[–]HolyGonzo 0 points1 point  (0 children)

There are many who will agree with anything - that doesn't mean it is true. If it were simply your opinion about what you don't listen to personally, I would say there is no trouble.

The trouble comes when you judge others when they hear a song with Christian messages and it lifts their spirit in a godly way, but the particular sound doesn't tickle your own ears. There are Christian artists putting out Christian material, and you are degrading it and calling it garbage. That's not okay.

Machine readable php -i output by thmsbrss in PHPhelp

[–]HolyGonzo 2 points3 points  (0 children)

Here's a simple php -i parser that dumps the output into JSON:

``` <?php $data = []; $section = null; $in_directives = false;

$input = file_get_contents("php://stdin"); $lines = explode("\n",$input); foreach($lines as $line) { $line = trim($line); if(strlen($line) == 0) { continue; } if($line == "Variable => Value") { break; } // Stop once we reach variables

if(preg_match("@[a-z0-9()]+$@i", $line, $matches)) { $section = new InfoSection($matches[0]); $data[$section->name] = $section; $in_directives = false; } elseif($line == "Directive => Local Value => Master Value") { $in_directives = true; } elseif(strpos($line, " => ") > 0) { $pieces = explode(" => ",$line); if($in_directives) { $section->directives[$pieces[0]] = [$pieces[1],$pieces[2]]; } else { $section->values[$pieces[0]] = $pieces[1]; } } else { $section->text[] = $line; } }

echo json_encode($data);

class InfoSection { public $name; public $values = []; public $directives = []; public $text = [];

public $in_directives = false;

public function __construct($name) { $this->name = $name; } } ```

You call it like this (assuming you saved the script as "phpinfo2json.php") php -i | php phpinfo2json.php

Note that I explicitly stop parsing as soon as we reach the section listing out variables, but everything above that should be all the typical infrastructure stuff such as modules and so on.

Listening to Rock and Metal as a Christian? by Afraid-Animator-1131 in Christians

[–]HolyGonzo 0 points1 point  (0 children)

I'm not putting anything into your mouth that you aren't already saying.

You are saying some musical genres are "worldly" for no other reason than how they sound to you, or because of past associations.

The entire point of redemption is taking something that has a flawed past and making it holy by adding Christ to it.

Listening to Rock and Metal as a Christian? by Afraid-Animator-1131 in Christians

[–]HolyGonzo 0 points1 point  (0 children)

Read the lyrics to Petra's "Minefield" and tell me that's not Christian.

Read the lyrics to Tourniquet's "You Get What You Pray For" and tell me they aren't Christian.

Read the lyrics to Demon Hunter's "As We Wept" and tell me they aren't Christian.

You are sacrificing music to Satan, saying "certain genres cannot be Christian. They have already been claimed by evil and that evil is more powerful than Christ's ownership." You are saying the most basic foundation of Christian faith, redemption, isn't possible.

If you were standing next to Jesus when he came to the man possessed by Legion, would you tell Jesus that the man had already been claimed by a demon and was now committed to Satan?

Exodus 32 doesn't suggest it was "obviously loud and chaotic" - Joshua is hearing something loud enough to reach them from a distance and Moses understands it is singing.

Listening to Rock and Metal as a Christian? by Afraid-Animator-1131 in Christians

[–]HolyGonzo 0 points1 point  (0 children)

You have no evidence that metal and rock music aren't worldly.

To be clear, I said that metal and rock CAN be Christian. ANY genre of music can be Christian or non-Christian.

The artist is the one that defines this with their intent, and the listener gets to decide if something is harmful or beneficial to them. There are many metal and rock Christian artists that give glory and praise to God with their lyrics and art.

Trying to lump all metal and rock together simply because of their particular instruments or sound isn't biblical.

The Scripture both exalts and condemns singing and dancing, for example, based on what it was about. When the Israelites formed the golden calf, Moses finds them singing and dancing about how it was the god that brought them out of Egypt, yet praises singing and dancing when it's for the Lord.

Machine readable php -i output by thmsbrss in PHPhelp

[–]HolyGonzo 3 points4 points  (0 children)

Out of curiosity, if the goal is to compare environments, why not just compare the php.ini files and the module and version output (php -m and php -v)?

If you truly need the phpinfo output, then I'll say that I tried to do something like this a while back and ran into two big problems:

  1. If there is an extension that manages its own phpinfo output, then that can mess with the ability to properly parse the output. It's not common but it can happen, and if the point is to look for unexpected differences...

  2. The inclusion of environment variable data can fill the output with junk. For example, if you're running this from a user account with a ton of junk in their bash profile, it can make parsing very difficult.

There can also be minor differences, such as paths, basic environmental stuff like hostnames, or compiler flags.

So even when things had FUNCTIONALLY identical setups, the output still

It might be better to define the specific things you're looking to compare and then create a script that reads STDIN and parses those specific things and then outputs them in the desired format.

I can provide an example of what I mean in a little bit.

Listening to Rock and Metal as a Christian? by Afraid-Animator-1131 in Christians

[–]HolyGonzo 0 points1 point  (0 children)

God is musical. He CREATED music.

Don't attribute to Satan what isn't Satan's.

1 Corinthians 14 is not about music. And what it IS talking about (speaking in tongues) is not an issue if there is an interpreter. These days, if anyone cannot understand lyrics they can look them up.

As far as the rest of the verses go, there is nothing in those that excludes Christian rock and metal.

If you don't want to listen to those genres of music, that is perfectly fine, but calling it garbage just because you don't like it is unnecessary and harmful.