Journaling on estrip is easy and free. sign up here

Tinypliny's Journal

tinypliny
My Podcast Link

10/03/2011 19:57 #55236

Clueless about regex
Category: goals
What I want to do is match strings with regular expressions.

^ : start of string
[ : beginning of character group
a-z : any lowercase letter
A-Z : any uppercase letter
0-9 : any digit
_ : underscore
] : end of character group
* : zero or more of the given characters
$ : end of string


Now I can't even write code for matching a variable length sentence or phrase in curly brackets for example:

{A quick brown FOX jumps over a sprightly hare}

Hmm... this does not work
(\{)[.*?](\})

This doesn't work
(\\{).*?(\\})

This doesn't work either.
\\{.*?\\}

ARRRGH.
It's funny how it's called regular.

References

1.
2.
3.
4.
tinypliny - 10/06/11 17:12
Thanks!! :) I am going to bug you with regex questions....
paul - 10/05/11 00:37
Matches result is shown in the first comment.
paul - 10/05/11 00:37
Sorry it did not come out:
$str = '{A quick brown FOX jumps over a sprightly hare}';
preg_match("/\{(.*?)\}/", $str, $matches);
print_r($matches);
paul - 10/05/11 00:36
I use \w (letters and _ ) and \d (digit) a lot. Here is some PHP for what I think you are trying to match. PHP uses PERL Compatible Regular Expressions. You have to have a begin and end delimiter in PHP and you have to escape the curly brackets because they are used to mark repetition. e.g. \d{3} means any 3 digits or \d{1,2} any one or two digits.



Array
(
[0] => {A quick brown FOX jumps over a sprightly hare}
[1] => A quick brown FOX jumps over a sprightly hare
)

10/03/2011 14:06 #55233

Fuddled.
Category: goals
80% of my inbox.
image

And still not done.

10/01/2011 15:53 #55222

NyQuil drama
Category: whine
The cold, fever and chills got out of hand so I had to go out in the rain to Walgreens at around 1:00 AM yesterday night. It was like one of those descriptions in the Wuthering Heights of wild rainy miserable nights but without any of the fun.

The Walgreens on North has undergone some kind of ludicrous rearrangement of shelves. It took me a whole 5 minutes to realize that everything had been shuffled around. The cold and flu medications are not with the other medications on the far wall anymore. I finally found them in the next aisle. It made no logical sense. I am convinced the whole point of the rearrangement was to make sick people suffer even more in their misery.

And that was not all. The walgreens brand was nowhere to be seen. The shop is aggressively promoting some new hippie form of the Nyquil concoction called Nature Fusion I looked at the ingredient list:


Acetaminophen
Dextromethorphan
Doxylamine Succinate
Citric Acid
Flavor
Glycerin
High fructose corn syrup
Honey
Polyethylene Glycol
Propylene Glycol
Purified Water
Sodium Citrate



Basically what I had been eating along with "flavor" (surely a taunting joke on people with colds), two different glycols, high fructose corn syrup AND Honey. I got it anyway.

And Walgreens was out of Biscoff Speculoos. How unbelievably unkind is that??

When I came home I couldn't open the stupid Nyquil bottle. I tried so hard for nearly 1/2 hour. It was the hardest bottle to open. You need to press down the lid while twisting it anti-clockwise. You can tell it's not going to open because it makes this annoying rachet-like noise. At that point I was almost livid with rage. I took a knife and ran it all round underneath the rim of the hideous cap and tore it off. It probably won't close well again, but who cares at this point?

I think I must have gone past 104 degree F with all that anger. When I was brushing my teeth later, my eyes looked completely bloodshot. They are still kind of murky now. I can only guess that I must have split many minor vessels in my conjunctiva. When I finally got at the syrup, it was extremely sweet. Sweeter than any other cough syrup I have ever had my entire life. This is what happens when people think that honey is not enough and go ahead and lay on the high fructose corn syrup.

So the point of this post is that NyQuil's new bottles are so hard to open that you need a knife. At 3:00 AM, anger got the better of me and I composed a nasty letter to Vicks, but in my hurry, I didn't save it and it got deleted. I have no idea now what I wrote in it. All I can remember that it was a page long before the Nyquil knocked me out. Now it seems silly and trivial but I was so unbelievably wretched and murderous last night. Illness does strange things to people, especially to me.

Update: 26th February, 2012

I received this message from a guest:


21372 02/26/2012 @ 21:08 guest @ 75.142.240.232 says:
Nature Fusion Drama
I loved the previous NyQuil drama. Walmart must have pulled all of the regular stuff off the shelves so you were guided to purchase the new (green) version of cough syrup. Got it home to my ailing husband and heard him cussing and grunting and whining about getting the damn thing open. Thinking he was inept and just felt to crappy to get it open. I asked to try.....needless to say I wore my hand out and tried using the can opener notches on my kitchen shears and only managed to strip all of the outer lid threads. So I went to the web to see if anyone else was so inclined to cut the top off. Oh boy! There is a ton of folks that would like watch the makers of Vick's products open their own designs. After reading NyQuil Drama and other similar complaints, my husband used a knife to break the child protection and was able to finally take the dosage.



So it's not just me!!!!! Vicks should be ashamed of its design team. Making sick people suffer even more in their misery! I am glad I was able to spread the hatred around. ;-)
tinypliny - 10/07/11 18:44
I got one more bottle of Dextromethorphan and Guaiphenesin for the residual mucus today. I had the walgreen clerk open it after I bought it. He probably thought I couldn't even wait to get home to start chugging on it. Oh the misery of being a weakling.
tinypliny - 10/01/11 17:54
Me, murderous? What are you blokes smoking??

The nyquil pills are not without their own evil set of additives. Take a look. This is the complementary Natural Fusion pill:

Active: Acetaminophen 325 mg (Pain reliever/fever reducer), Dextromethorphan HBr 10 mg (Cough suppressant), Phenylephrine HCl 5 mg (Nasal decongestant)
Inactive: EDTA, honey, hydroxypropyl methylcellulose, magnesium stearate, maltodextrin, medium chain triglycerides, microcrystalline cellulose, natural flavor, polydextrose, polyvinyl pyrrolidone, propylene glycol, starch, stearic acid, sucralose, talc, titanium dioxide, yellow iron oxide :::link:::

This is the regular NyQuil pill:
Active: Acetaminophen 325 mg (Pain reliever/fever reducer), Dextromethorphan HBr 15 mg (Cough suppressant), Doxylamine succinate 6.25 mg (Antihistamine)
Inactive: D&C Yellow No. 10, FD&C Blue No. 1, Gelatin, Glycerin, Polyethylene Glycol, Povidone, Propylene Glycol, Purified Water, Sorbitol Special, Titanium Dioxide

Maybe there is a old fashioned Nyquil pill that I am missing...

They used to have this mint-flavoured vaposyrup with phenylephrine and guaifenesin that I miss so much. I was so unhappy that I coudn't find it yesterday.

(e:metalpeter): yes, this has no alcohol. I don't do well with alcohol at all. It makes me sicker. And you are right, look at this whole discussion about how hard they can be to open!! --> :::link:::
metalpeter - 10/01/11 16:25
1. I agree with #1
2. I was going to say the same thing.... Not that they are all ways easy to open...
3. Now most of these have Alcohol was it Alcohol free or isn't it listed?
paul - 10/01/11 16:17
1. You are always a little murderous, that's why I like you.
2. Why not the nyquil pills. Same medicine minus to corn syrup filler and crap.

09/30/2011 18:42 #55220

Worst Cold Ever.
Category: whine
I have a temperature of 103 Degree F and a pulserate of 97/minute . I am shaking with chills even though I am wearing a sweater and woollen stockings AND drinking a hot cup of tea. My nose and throat are burning as if someone has put in hot embers into them. To add to the irritation my nose is also dripping like a broken faucet. It's not pretty at all. I tried to lie down to sleep but my head hurts with dull pains in a supine position. I am also very dizzy when I get up from a sitting position even though I am fairly certain I am well-hydrated. I can feel that my chest is congested with some really thick mucus. Not much is coming out, which is worrying me. Whatever little comes out once every 2 hours or so is a greyish yellow in colour and very thick.

So here I am typing my detailed symptoms into the new wide (e:strip) text area that I like very much!

Seriously, this is the worst cold at the worst possible time. My work is suffering because I am making a ton of mistakes and I can't go to see my brother.

My flat is littered with lozenge drop wrappers and soup bowls. I can't wait for this cold to go away but it seems like it never will. I am on
  • ibuprofen 400 mg X 4-6 hourly for the pain,
  • Co-trimoxazole BD (12 hourly) for the secondary infection and
  • Paracetamol (Acetaminophen) for the fever.
  • Guaiphenesin (oral) 1 tbsp X 2 hourly - expectorant
  • Dextromethorphan 1 tbsp X 2 hourly - anti-tussive

AND none of it is working in expected ways!!!!

WHHHHHHYYYYYY do I have to be sick now?? I have so much to do and can't do anything effectively. I hate being sick.

metalpeter - 10/01/11 16:19
My take is often when one gets sick it is because said person is doing to much or it is more then the body can take... So it is either your body is so run down that you can't fight off something normally you could... Or that your body knows you need rest or some other thing so it lets you get sick on purpose....
tinypliny - 10/01/11 13:10
I wrenched it off with a knife and lot of anger. :) And it did knock me out for around 10 hours. It hasn't bettered my cold but the fever and chills have gone away. :) Thanks!
heidi - 10/01/11 02:57
  • pet pet pet* When you get it open, don't take a full dose. It will likely be too powerful for you.
tinypliny - 10/01/11 02:27
I just got nyquil from walgreens and I can't open the FREAK bottle!!! Seriously, why would anyone make a medicine so HARD to open. You have to press down the lid and then swivel, and its just NOT happening. I am at the height of wretchedness, I can't even open a medicine bottle!
heidi - 09/30/11 21:33
If sleeping isn't an option, stupid movies help. The stupider the better because my brain isn't functioning well enough to get subtlety.
heidi - 09/30/11 21:31
  • hugs* sooo sorry!!! Sleep!!!! I'm the same as Paul - I prefer to be knocked out.
paul - 09/30/11 20:24
Wow that sucks. I hope you feel better. Sounds like your all stress, no relaxation lifestyle is catching up with you. I hate bring sick so much. Everytine I think I am dying. The thibg tgat qorka beat for me is hydration and high heat like a bottle full if hot water in a blanket but it seems you are already hot. My favorite cold medicine is nyquil. Sometimes its just easier being knocked out.

09/29/2011 14:45 #55216

Chrome = Desktop
Category: i-tech
I sometimes wish my desktop was the Chrome browser. What's the point of even having an empty space staring at me. I just want all that space to BE the browser. My nexus one has a small search bar embedded in the desktop. What I want is for the entire browsing to be the desktop.

I am sure there is something like this out there, something that implements this in Debian or maybe Red Hat. I just don't know how to search for it yet.

Update: Found it.

image
Someone obviously feels like I do.

The real question, however is, is that someone as technically challenged as I am? Can I even get to step 1?!

tinypliny - 09/29/11 23:12
I have a secret hebrew trait.
paul - 09/29/11 22:52
I was wondering why you went all jewish star.
tinypliny - 09/29/11 22:21
that's not my desktop yet. I don't know how to do it! I would like the google search to be embedded in the desktop though. I think if this is possible then it should be possible to rip out those ads and embed just the search bar and the content.I have no idea how to even get to the level of that shot though.
paul - 09/29/11 21:37
I love that you say you cleaned up you desktop and took over used space but I see it as adding a link to both Advertising Programs and Business Solutions.