Split a delimited list into two columns
Functions used: TEXTSPLIT, TEXTJOIN
Formula: =TEXTSPLIT(TEXTJOIN("~", TRUE, list), "/", "~")
Context: you have a delimted list which you want to split into two columns.
If you go row by row you can do it using TEXTSPLIT on its own, but if you want the result in a single array this won't work. Instead, you can use TEXTJOIN to combine the values into a single string, then use TEXTSPLIT on that.
Step-by-step
Evaluating TEXTJOIN with [delimiter] "~" results in this:
(Setting [ignore_empty] to TRUE will skip any empty rows in the list. Not relevant here but a useful feature).
Then applying TEXTSPLIT with [col_delimiter] "/" and [row_delimiter] "~" gives the desired result:
0 notes
How do you fill a PHP array dynamically (PHP, array, development)?
To dynamically fill a PHP array, you can use various methods to add elements to the array during runtime. Here are some common approaches:
Using array_push() function:
The array_push() function allows you to add one or more elements to the end of an array.
phpCopy code
$myArray = array(); // Initialize an empty array
// Dynamically add elements to the array
array_push($myArray, "Element 1");
array_push($myArray, "Element 2");
array_push($myArray, "Element 3");
// Resulting array: ["Element 1", "Element 2", "Element 3"]
Using square brackets:
You can also use square brackets to add elements directly to the array.
phpCopy code
$myArray = array(); // Initialize an empty array
// Dynamically add elements to the array
$myArray[] = "Element 1";
$myArray[] = "Element 2";
$myArray[] = "Element 3";
// Resulting array: ["Element 1", "Element 2", "Element 3"]
Associative array:
For associative arrays, you can set values dynamically by specifying the key.
phpCopy code
$myArray = array(); // Initialize an empty associative array
// Dynamically add elements to the array
$myArray["name"] = "John";
$myArray["age"] = 30;
$myArray["email"] = "
[email protected]";
Using loop:
You can use a loop to dynamically populate the array with elements.
phpCopy code
$myArray = array(); // Initialize an empty array
// Use a loop to add elements to the array
for ($i = 1; $i <= 5; $i++) {
$myArray[] = "Element " . $i;
}
// Resulting array: ["Element 1", "Element 2", "Element 3", "Element 4", "Element 5"]
These methods allow you to dynamically add elements to a PHP array during development, making your code flexible and adaptable to various data requirements.
1 note
·
View note
Array Vs Lists in Java (With Examples)
Define List In Java
In Java, A List is an ordered collection of an object in which values can be stored. It allows insertion, delete, update and positional access elements in list with index number. List created by the following classes(ArrayList, LinkedList , Stack, Vector).
The list method is found in java.util.List package. using this package we can iterate list in forward and backward directions. The implementation of classes of list are ArrayList, LinkedList, Stack, vector. The arrayList and linkedList are widly uesd in java. The vector class is deprecated scince java5
How to create a List in JAVA
Implementation of Array List:-
Syntax: List<String> lst1=New ArrayList<>();
Implementation of Linked List:-
Syntax: List<String> lst2=new LinkedList<>();
Different types of Methods of List in Java.
Some of List methods are commonly used in java are:
add() - It is used to add new Element in a list.
addAll()- It is used for add all elements of a list to a new list.
get() - It is used to access any element in a list.
set() - It is used for change element in a List. (More)
0 notes
❄️ Kinkmas — 08. Tail play ❄️
Jake Sully x female Avatar reader
⋆。° ✮ Minors dni 🔞
⋆。° ✮ Kinkmas Masterlist
⋆。° ✮ Warnings: tail play, tension, making out, age difference, alien biology, dirty talk, a/b/o dynamics
"It's a tail."
"Correct."
"I- I have a tail. I really have tail, oh my god!"
"Yeah, you do, kid."
It wagged and curled ever so slightly when you lifted up your shirt to get a better look at what you had to deal with now. It hung over your skimpy shorts and started where your tailbone would be. Fascinating. Not that this was your first time seeing a tail on a na‘vi or avatar, but still.
"...I'm gonna touch it."
It's just not every day that you wake up with a tail attached to your body, after all. A blue, strangely cat-like, alien body. Your alien body.
"Go for it." Jake crosses his thick arms over his chest as he watches you in amusement, a knowing grin on his lips like he thought about the time he himself had woken up in this strange new body he had to adjust to.
Just as anticipated, your tail was soft. The skin taunt and warm to the touch. But it kept moving, making it harder for you to get ahold of it. The constant wagging and curling and swaying proved to be mildly annoying, actually. You wrapped a hand a few inches above the base; half out of wanting it to stop slipping away, and half because you wanted to see if it'd... pop off. Which you hoped it wouldn't, but you still wanted to satiate your curiosity.
"Okay but don’t–"
And then you gave it a firm tug.
You jolted at the sudden sensation of what felt like lightning shooting up your spine. Your own voice was cut off in your throat, causing you to let out a sort of drawn-out gasp or… more like a moan.
Glancing up at Jake who still stood besides you with a smirk, you quickly straightened up and then attempted to cover up what just happened by letting go of your tail completely.
"You okay, sweetheart?", he huffed out a laugh, cocking his head to the side as you tried to avoid his intense gaze.
"You, uh...", you clear your throat, "You wanna explain what that was?"
"That’s a pleasure spot you just hit", he said, a little to nonchalant for your liking.
"A what?"
You then flinched at the sudden sensation of a hand around your tail. It still felt so strange to have what was essentially a whole other limb on your body, and with it being new and all that, it was more sensitive than you thought when Jake wrapped his big hand around it. A sharp tug made your whole body jolt once again, a similar sensation to having your hair pulled, you noted.
Stars blinked in the corners of your vision for less than a second, before Jake spoke again, his voice having grown a tad deeper and it’s just now that you realize just how close he had gotten to you.
"A pleasure spot, kid", he explains, "It’s supposed to feel good when you tug on it. Helps to get you in position when you’re in heat."
Heat?
Suddenly there’s another tug. Harder this time. Your back arches and you have to bite your lip to try and stop any and all involuntary noises from escaping your mouth.
Jake‘s low, almost seductive chuckle sends goosebumps all over your skin as he traces his fingers up your spine, then back down to give your tail's base a little squeeze. This earns him an array of short gasps, moans and twitches. A deep flush spreads all over your cheeks, up to your ears that had folded back against your head.
"Feel how your back arches?", Jake asks, and suddenly his lips are so close to your ear that you can feel them touching your soft lobe. "That tingly sensation in your spine?"
"Y-Yes, I- hmh", you sputter, voice skipping like a scratched CD. It was hard to get the words out with Jake’s hand stroking up and down your tail, him being entirely too close to you, mixed with that strange sensation radiating off the hand around your tail.
"If I do it again, you‘ll want to spread those pretty legs for me", he whispers, followed by a smug, "See?"
Right on cue, he tugs on your tail again and the feeling almost makes you dizzy. It’s like your body suddenly has a mind of its own, because your knees buckle, your back arches further and your thighs instinctively want to spread, so you balance your weight between your feet and put them just a little wider apart.
A pair of strong hands grab your narrow hips as if you gave the impression you would colllabs any minute, but you’re so far gone in this lustful haze, you’re just glad for some stability. Meanwhile, Jake runs his thumbs up and down your skin, causing you to let out soft hums as your tail sways from side to side.
"F-Fuck", you mutter breathlessly, not yet believing what had just happened. Jake’s hands however don’t stop just there. They wander around your waist, until they’re both on your backside.
Finally free from any hands holding it in place, your tail continues to sway and curl in what seems to be anticipation or nervousness. Having a tail must’ve been the worst if you’re trying to suppress any emotions, you thought, flushing deeper in embarrassment.
"You know", Jake then leans in closer, close enough his chest was tightly pressed against yours, his lips so dangerously close to your own as he spoke, "when they fuck", there’s a pause to let the words sink in, "they often do it on all fours. They tug on their tails to get themselves in deeper."
And then you felt his tongue, warm and wet, swipe across your bottom lip, and like on instinct your mouth opened to welcome him. Your quiet, muffled moans from Jake exploring the inside of your mouth quickly became much, much louder as he slides a hand down your backside and continued to stroke your tail.
"If you wanted this so badly, you shoulda said somethin' sooner", Jake spoke against your kiss swollen lips, his hand keeping still so he'd be able to get a coherent response from you. "Want me to show you how they do it, hm?"
"Y-Yes", you exhale hastily, and if you were in any other state of mind, you’d probably feel embarrassed over how desperate you must’ve sounded to him. "Yes, please."
"Attagirl. Get on your hands and knees then, and I‘ll show you what that pretty tail is good for."
2K notes
·
View notes