Saturday, 17 August 2013

Calculate failure of component by central limit theorm

Calculate failure of component by central limit theorm

A component in a device fails one time per 24 hours (on average). How many
spare parts should be in order to verify that the probability they will be
enough for one week is 95%? Use central limit theorem and standardization.
With standard tools (a.k.a without clt), I tried answering it with Poisson
and got that minimal part of replacements should be 21.
I don't know from where to start here. I can guess that if we define $X$
to be number of replacements per week, then $\mu=7$ but I can't figure out
what is $\sigma^2$? How can I proceed and use standardization here ?

Standard Permissions for /var/www after Fresh Linux / Ubuntu Installation with LAMP

Standard Permissions for /var/www after Fresh Linux / Ubuntu Installation
with LAMP

I just installed LAMP Stack with PHP-FPM & FastCGI. I have two users, root
and herit (with sudo rights, i can create more non-admin users if
required)
Now what should be default permission settings for my situation? I will
configure VirtualHosts for my domains inside www. Let's Assume i have
three domains, super.com, fruit.com & apple.com. I want separate user for
these domains (caz i have heard it is secure), so we anticipate fruit.com
& apple.com's script are vulnerable, i don't want them to mess up with any
other domain, because if any shell script or malware gets injected then i
am ruined. while super.com is having a secure script so i do want
super.com's user to have possible access to other domains, fruit and
apple. because my script on super.com is a web based file manager so i can
use it to control my other domain's data. i might have upto 10-20 sites,
each site can control themselves totally, while super.com which controls
everyone!
Additional Question: Do i really need 775 over 755?
All I am just worried is, that i don't want to get my site hacked as being
a newbie & someone overwriting my homepage, "You failed at setting
permissions!"
i am totally new with linux so i don't know much about chowning, so it
would be more appreciated if anyone can send solution with complete
command (i mean not just verbally described idea) so i simply have to
execute them over ssh.

MySQL Corrupted Insert

MySQL Corrupted Insert

I try to insert an entry into my db, but i get different result on select
query.
INSERT INTO `mobilpay_sms_log` (
`id` ,
`messageid` ,
`user` ,
`sms_key` ,
`sender` ,
`final_value` ,
`brute_value` ,
`message` ,
`code` ,
`status` ,
`time`
)
VALUES (
NULL , '20130814195225:0721254789', '0', '10752000000',
'0721547896', '10.00', '10.00', 'LICENTA 111', '8A5SSVPQ',
'FINISHED',
'20130814195225'
);
After Select i get strange value from "sms_key" field, "2147483647".
sms_key structure is int(20)

Assgin shared member to a const

Assgin shared member to a const

Supouse you have a class with shared members to make a reference to known
values like this
public class Semaphore()
{
public static int Red = 0;
public static int Yellow = 1;
public static int Green = 2;
}
In VB.Net you can assing these static(shared) values to a const like this:
Public Class Transit
Private Const Red as Integer = Semaphore.Red
End Class
But in C# this isn't possible. There is a reason for this? Some workaround?

vba Excel OCR is there a way to convert image into text

vba Excel OCR is there a way to convert image into text

I would like to convert image into text within Excel? Is there a DLL that
i can reference to do that. I know that oneNote do OCR Quite well, it will
be really cool if we can use the api in vba excel. Thanks for your help.
PS: I have tried to install MODI for VBA (from address below) , but i
couldnt find it in the reference window.
http://office.microsoft.com/en-us/help/find-modi-vba-reference-on-msdn-HP001049034.aspx

How to read a file in javascript using input tag

How to read a file in javascript using input tag

I want to access file path obtained from browsing file using input tag. I
want to display the path.

Friday, 16 August 2013

Having Navigation Problems

Having Navigation Problems

I was wondering if someone would be able to help me with my messed-up nav
bar. Here's a pic of what it should look like:
http://i.imgur.com/1WQ07Mu.png But on some browsers, it looks odd and cuts
off like this: http://i.imgur.com/FSgYkvS.png
Here's my HTML:
<ul id="menu" class="red">
<li class="active"><aref="index.html">Home</a>/li>
<li><a href="projects.html">Projects</a></li>
<li><a href="http://TechnoToast.com/">Blog</a></li>
<li><a href="status.html">Status</a></li>
<li><a href="contact.html">Contact Me</a></li>
</ul>
Here's my CSS:
#menu {
font-family:"Century Gothic", Arial, sans-serif;
text-transform:uppercase;
list-style-type:none;
font-size:1em;
background:#eee;
height:40px;
border-top:2px solid #eee;
border-left:2px solid #eee;
border-bottom:2px solid #ccc;
border-right:2px solid #ccc;
margin-bottom:5px;
}
#menu li {
float:left;
margin:0;
}
#menu li a {
text-decoration:none;
display:block;
padding:0 40.8px;
line-height:40px;
color:#666;
}
#menu li a:hover, #menu li.active a {
background-color:#f5f5f5;
border-bottom:2px solid #DDD;
color:#999;
}
#menu.red {
border-top:2px solid #660000;
border-left:2px solid #660000;
border-bottom:2px solid #450000;
border-right:2px solid #450000;
background:#850301;}
#menu.red a {color: #fff;}
#menu.red li a:hover, #menu.red li.active a {color: #F27F84; background:
#990000; border-bottom: 2px solid #660000;}
/*navbar end*/
I really appreciate anyone who could help me out. :)