“Please try again in 42 years…”
A blog on Office 365 DLP, SharePoint, Data Protection, Privacy and Compliance in the cloud.
How to eject cd drive using windows code
Nice prank to play on your friends. This will eject the CD-drives in the local computer every 2 minutes.
Copy the code below into a text file. Rename it to .vbs and execute.
'get hold of the object who controls the windows media player
set mediaPlayerManager = CreateObject("WMPlayer.OCX.7")
'make a list of all CD-Roms installed in the computer
set CdROMCollection = mediaPlayerManager.cdromCollection
' put the process to sleep for 10 minutes
' just enough time to sound like unexpected when it runs
wscript.sleep 6000000
' performs an eternal loop (or until the user restart the machine or kill the process)
do
'if there is at least 1 cd-rom in the machine,
if CdROMCollection.Count >= 1 then
'go through all the cd-roms found and eject each one of them
For i=0 to CdROMCollection.Count-1
CdROMCollection.Item(i).Eject
Next
End If
' put the process to sleep for 2 minutes
wscript.sleep 120000
'return to the beginning of the loop and repeat
loop
Cycling training program French Alps
This is my program to my ride the French Alps in August 2014. Since we came up with this plan recently, I’ll post here my training log updates, the itinerary, nutrition and anything else I might find along the way until the ride day.
A bit of myself for you who doesn’t know me: I am your average family man, middle-aged, who mainly rides the bike to work, definitely not a semi-pro. I’ve never done any specialized cycling training. So I hope this guide can help motive others to achieve similar goals. Trust me: If I can do it, anyone can.
If you have questions about it, feel free to contact me at edge@superedge.net. This will be a curious experiment and hopefully I’ll have some fun while at it Below is my project plan:
Where will be the ride.
Well, below is just a list of intentions. I am setting the goals very high by planning to ride the following mountains. Ideally I’ll be doing them all in 5 days. Some mountains will be short. And note I am including the mythical Alpe d’Huez; if I am going to do it once, I might do it properly and unforgettable as well.
- Le Semnoz
- Col de Tamie
- Col de la Madeleine
- Col de Glandon
- Col de la Croix de Fer
- Col du Mollard
- Col de Maurienne
- Les Lacets de Mountvernier
- Col de Chaussy
- La Toussuire
- Col du Telegraphe
- Col du Galibier
- Alpe d’Huez (WOW moment!!!)
- The other side of Alpe d’Huez
- Les Deux Alpes
- Villard Reculas
Buy proper cycling shoes.
[TODO] do I really need this? I need to research.
Nutrition plan for mountain cycling.
[TODO] I might need special nutrition to be able to ride on altitude. Never done that before. Need to research
Find time and training locations.
[TODO] There is no way around here. Need to find the time!!
Keep a training log.
[TODO]
By Edge Pereira
How To Separate Multiple Users Selected with InfoPath People Picker–No Code
If you reached this page, you’re likely looking for an answer to the dreadful issue of how to separate the selected users from the InfoPath People Picker control in a string. Well, there are a few solutions using code, but if we can come up with something that does not need to use code deployment, any web services etc. and it is good enough, then this is your answer.
First of all this is the structure we will be using in this example:
Note the pc: Person has a blue arrow? That’s the catch. The People Picker is actually a Repeating Table with a person object underneath! Keep that information for now, we will come back to it in a minute and it all will make sense.
Next thing we will do is to add a regular textbox control to your form. Click “Properties” and then choose to define a formula for the default value. Also make sure the “Refresh value when formula is recalculated” is checked.
In the default value dialog box, click “Edit XPath (advanced)”. Here we will use a combination of 2 powerful functions: xdMath and Eval. Essentially xdMath will recalculate the position of the xml node in the parser and the Eval an loop though collections.
Remember when we saw that People Picker control is a Repeating Table? yep, a collection. So we will use the Eval to navigate the rows of that collection, and using Concat in the create a string attach a semi column at the end of each row.
Don’t worry about the advanced bit, It took me a bit to get the XPath formula right. So skip thinking about it and here’s the expression all nicely done for you.
xdMath:Eval(xdMath:Eval(../my:ReviewTeamSection/pc:Person, 'concat(pc:DisplayName, "; ")'), "..")
Make sure to replace the my:ReviewTeamSection path and use yours instead. Also you can play around with the XPath expression above and replace DisplayName for AccountId or AccountType to get different values.
I hope the time I spent figuring this out can be used to save yours
By Edge Pereira
How to Fix: Restore-SPSite. The site collection could not be restored. Content Database, Sufficient Free Space.
If you try to restore a site collection backup from another location, performing a simple Lift-and-Shift, you might be confronted with the following error:
“Restore-SPSite : The site collection could not be restored. If this problem persists, please make sure the content databases are available and have sufficient free space.”
What this Error Means?
In short, it can be MANY things. You know that your database actually has enough space for the restore file. You know that you have the right permissions. You check that the command actually runs for a period of time… and yet, after several minutes the restore operation fails.
What’s Causing This?
Unfortunately, like many warning emitted by SharePoint, this error sends a message which leads to an incorrect conclusion.
Let’s read again this warning, slowly and we will discover that it actually says: “…please make sure you have enough space…”, this is not saying that you don’t have. That’s very tricky and misleading, because it leads people to believe that “hey, such a trivial operation doesn’t work, must be space related”
What to do?
Actually this is a blanket message, a very high level warning covering the real cause of the problem. So, next time you see this check the SharePoint error logs. The first thing you should do is: in the error trace level, keep an eye in the “High”, “Critical” and “Unexpected” types. They will clearly indicate the error that this message is covering.
It might be a database permission problem, it might be a corrupted restore file, if could be a failed SharePoint service. I’ve seen this error message a few times already and both times they had nothing to do with space in the database server. For example, last time I saw this error message it was nothing to do with SQL server space, it was a corrupt backup file.
So, next time you see this error message, remember: thing are not really what they seem! especially in regards to SharePoint
By Edge Pereira
How to Fix: “The process cannot access the file” Error on SharePoint 2010
Most the developers I know have a stand-alone deployment of SharePoint in their own laptops, it gives them the capabilities of SharePoint without having to go with a full-blown SharePoint 3-tier farm. However most of the times they try to upgrade from SharePoint 2007 (aka. MOSS) to SharePoint 2010, they are confronted with the following and annoying error message:
“The process cannot access the file '<Path\FileName>' because it is being used by another process.”
The Issue:
Just so you know, when SharePoint configuration says "files are locked", what it really means is "a few rows in the SharePoint configuration database are locked for updates." These are not really real files in the sense of our windows explorer files. And that sort of behavior is as expected and per design by SharePoint. The Timer service is supposed to have this power to lock/update/release resources in the SQL Server; Unfortunately, a few times the locks are not released properly or quickly enough for the upgrade to continue
The Fix:
In the start Menu of your SharePoint server, call the “services.msc” shortcut, this will lead you to the Services interface running in the local machine.
Once there, find the “SharePoint 2010 Timer” and double click-it so you can see the “SharePoint 2010 Timer Properties”
IMPORTANT: In the properties select “Manual”or “Disabled”. You need to perform this step in order to force the service to release the hold on the files.
Then restart your machine. When the server is back online again, call the “SharePoint 2010 Products Configuration”, this will realign the Sharepoint Timer Service and will fix your new upgraded server.
I know it sounds weird this solution to “restart and everything will be OK”, but that’s how it worked for me and some friends a couple of times already.
By Edge Pereira
Windows 8.1 Enterprise. Keyboard not responding
If you just installed the released Windows 8.1 Enterprise Preview and realized that your keyboard is not working, you’re not alone. I’ve installed in 2 of my machines (a Dell Laptop and a Samsung Slate Series 7) and both had the same issue.
Turns out that it is not a faulty keyboard, the problem is in some manufacturers the keyboard settings will come with Sticky Keys and Filter Keys on.
To fix that go to the Start menu, find the Ease of Access Keyboard Settings and in the settings make sure the Sticky Keys and Filter Keys are disabled.
I must say it was a bit of a panic moment for me for a while I thought I had to reinstall everything again. So I hope if helps you guys out there.
By Edge Pereira
Microsoft Surface scratch problems
This is how my Microsoft Surface looks like after 6-months of daily usage.
For the record, I *love* my Surface. It replaced my iPad and my MacBook Air flawlessly, and I never went back to the Apple products. It is really a perfect companion. It if had a non-reflective screen I would even use it as my Kindle to read books.
No, I am not an unconsidered user. I am actually very careful with all my IT gadgets. I carry my Surface in a proper soft-material bag and I make sure it is always clean and tidy. My friends will tell you how I treat it. Below you can see a photo of my my Surface case. This is how I carry my Surface at all times!
However, despite all that, my Surface got these scratches in the side and in the logo behind. Every time someone comes to ask me about the Surface, I am full of praises, but as a good consultant I also have to inform about the sad news then I show these things to the curious minds I must say, it is a bit of a downer. Bugger.
I wish I could tell you my Surface experience is 100%. If wasn’t for the hardware, It would be.
*Please Microsoft, fix this in the next generation*
By Edge Pereira
Be Audacious! Today!
Among the many lessons I have learn in this life, here it is a very important one: Face the reality, nobody will/can do anything for you unless yourself.
Every single thing you conquer in this life, is directly related to what you do or don't do. Nothing is sacred. Absolutely everything in this life can be changed for better or for worse at anytime you want.
Those who take ownership of their acts, those who assume the responsibilities of their actions are the real winners in this life. Winners face all the challenges, even during those times when there are no guarantees of success.
Sounds crazy, but we can do this in 7 years, and I intend to lead this expedition.
There was a time when people did audacious things to expand new frontiers. Unfortunately, as a whole, it seems that we forgot those days and how to do this. Today, we live in a moment where we need to be audacious again." - words from Bill Stone, Explorer.
When I saw this man talking about these things, I confess shivers crossed my spine. To get inside a space shuttle heading to the moon without the fuel to return?!!! That's crazy!
And once again, this brings back the idea of the fear and the risk. We need it to feel alive. Without it, we are just robots, or like plants in a jar.
In this world sometimes we are so full of ourselves, our cars, our dream houses, our status, our jobs and our titles, our fancy mobiles, our nice looking ties, our web systems with our strong passwords, that when someone comes out with such a simple concept and at the same time so unbearable, this one person breaks all the mediocrity, all the plastic convictions that we learn from the TV shows and shows us what is the reality of things.
The beauty of Bill's speech goes beyond the courage to risk. The beauty is that he is taking ownership of the risks and the challenges of it. He is being his own lab mouse. If someone have to risk anything for what I believe, let it be me; if someone have to die for anything I believe, let it be me; take your life according to your own convictions, never ask someone to do something that you would not do it yourself, do not explore others, do not bet on someone's head, do not step on nobody's toes, do not take advantage of the other's weaknesses; pay all your taxes, never ask someone to bring you a cup of water, stand up and go get it yourself; drink your own wine; use your own products; be the customer of your own company; challenge all the Gods, because if any of those Gods really exists, he/she would expect you to be fearless, audacious, untamed and not a couch potato with a remote control in one hand and a can of nutella in the other; This God would expect you to be unbearable, to see you in the unknown, in the darkness searching for a new light, breaking new grounds.
Yeah, you probably have heard something like:” it is being hard to bring my ideas from the paper to the reality". Pure non sense!! I've never met no one who haven't written his ideas on a paper and did not try them in a real life scenario; but in other hand, I know hundreds who never tried their own cool ideas simply because they never tried to write them down on paper first.
How would you know what to do, when to do, how to do, why to do, what comes first, what comes last, if you keep saving these ideas for yourself only?
I know...you are too busy, the projects consume too much of your time etc. but again, if you don't do it, who will do it for you? Stand up! get you own cup of coffee! Remember?
Are you ready to get on board on a travel to the unknown and find your way out once there? Remember, you have only this life to try it. Do your best. Think about it.
See you all.
By Edge Pereira
Tip: When to do a Meeting ?
Traditionally, manager is an individual in charge of a group of tasks. A manager often, but not necessarily, has people who report to him or her. ( I hate the term subordinated )
However what I see most the time is someone who is in an eternal race between meetings and answering emails and phone calls. Also most managers I see don't have time to manage people who report to them. And this can be very frustrating.
If you think you are stuck in this cycle of frequently canceling your 1:1, finds delegation challenging and feel isolated...then you probably already feel bad enough.
instead of going on with this topic, how about if I share with you some steps I took that helped me to manage my day and also to develop a enjoyable team atmosphere. I did not develop all these ideas, mostly they are improvements of what I saw in great managers in my last decade of work in several countries....without working extra hours!
You can't give other people what you don't have. You're confused, insecure, disorganized? your team will be too. My goal is to devote sufficient time to get 100% clear on what I want to achieve; I generally do this by spending more time on priorities and follow-up, and less time in meetings. I try to reduce as much as I can my meeting times so we as a team can strategically focus in reaching the goals. Make everyone visualize the goal. The shared vision.
but how to create a shared vision?
Refuse more meeting invites. I see too many project managers looking at their calendar and thinking of them as a Facebook contest. newsflash: it is not! This is a trap! Having a full calendar of meetings does not have anything to do with being busy or accomplishing more. Way to many people are measuring themselves by the number of meetings they have. Yeah, going to a lot of meetings may make you feel important...for a while, but this is not a good way to allocate your precious time. So, next time you get a meeting invite, ask yourself, "Do I really need to go?" If the answer is "no," decline the meeting, if the answer is "Yes", think again and try to weight the pros and cons of going. If after that the answer is still "Yes", then accept; otherwise, pick "No" as your default answer.
If you really think you need to attend, consider these 3 options:
- Feel the pre-meeting. Most the times, just a quick written comment or a 5 minute chat might be enough to get your part done. And the side effect is that this will force the meeting organizer to actually create an agenda. (way too many meetings are developed on-the-fly)
- Send a proxy. Sending someone else from the team works great when the project is green and the meetings are just scheduled checkpoints. This is also great for the person going because it demonstrates also that your project is clear, transparent, balanced, open doors.
- Decline the meeting and ask for the meeting notes. Don't they write meeting's notes? You see, you are starting to make others realize how important time is wasted on meetings. The pure act of forcing them to write down the meeting's notes is a deterrent to make unplanned meetings in the future.
If after all these points you still feel guilty for declining meeting invitations…
Think this way, if you were sick during the meeting day, would it have it to be rescheduled? If "No" then that's it, you probably don't need to attend.
If “Yes” then ask yourself:"Am I here for strategic decisions or tactical decisions?" If you are there for strategic decisions, ask to have your part of the meeting close to the start. Then after that, you're probably safe to get out! Excuse yourself and go deliver. This leads to my next point...
Reduce your meeting duration. When you find yourself talking a lot, providing updates, and people are around in the room checking their phones, talking about football or anything else do yourself a favor: make 15-minutes your default meeting duration. If you find yourself making too many 1-hour meetings, you need to really work that out. Very rarely one needs hour long meetings; they should be the exception, not the norm. Here some things you can try?
Calculate how much costs 1 minute/meeting. The total cost of the meeting should not be larger that the time it takes to reach the decision.
Try the phone. Conferencing systems are there for a reason. Try to attend the meetings via phone; likewise try not to schedule a meeting when you can just discuss it personally in a chat or over the phone; and again, do not call someone to decide something that can be resolved in an email. Put effort in making lean meetings. Make it a game out of it and use it to show off your colleagues about how sharp, to the point and decisive your meetings are.
Now, remember about the beginning of the post? about you can only offer what you have? So, pass it on. Shape the model and let others mimic your style. Every time you see a chance to help others managing your time, do help them; and be careful not to step on people's toes in the process, but truth is vast majority of the times people are welcoming for time management tips and tricks.
In short
- When it comes to meetings: Email > Phone > quick 1:1 chat > quick group chat > full meeting.
- Full meetings if for when a real-time decision needs to me made or those moments when a task can be 100% finished in the meeting duration. Still, consider that the effort should be cheaper than the cost of meeting.
- Meetings require clear agenda, bullet points, sent together with the invite, not a few minutes before.
- During the meeting, take notes. Whenever possible say "I'll come back to you later on this". Don't try to answer the issue immediately if it does not have to be.
- After the meeting, update your team.
- Brag about having a clean calendar. Remember a fully booked calendar is not a popularity contest, nor represents someone's actually delivering things. It only creates pressure and most the times unrealistic expectations when not met.
So...now you have free time. What to do?
Block your time. Now. This will send a very clear message to people that time is important and you should not attend meetings during specified hours. For example, I always block my time before 9AM, between 11:45AM and 1:30PM, after 4PM on Fridays. After I did this, nobody ever scheduled meetings during these times...and we are all here still alive and with status green in the projects (who would have thought, hey? ).
Use the free time. If you don't, someone will. Fight for it, it is your free time after all. Don't ever trade it off. You fought hard for it. Set aside time for e-mail, general internet things, 1:1. See this as a meeting with yourself. How much importance would you do if you were to meet yourself?
All this might be hard at the beginning, but the real goal of this in not only make others to see how much time we spend in useless meetings; most of all, is to make people do reasonable choices and maybe...just maybe the world still will exists tomorrow if your input is missed today.
These tips worked for me, so I am here just sharing them with you and I hope some of them can be useful for you as well.
Cheers,
By Edge Pereira