Travel Agency

در آخرین روزهای سال 1989 یک جوان هلندی به نام خَودو فان روسوم که از تعطیلات کریسمس حوصله اش سر رفته بود، تصمیم گرفت سرش را با رایانه شخصی اش گرم کند. تصمیمی که به تولد زبان برنامه نویسی پایتون منجر شد. او در همان روزها اهداف زیر را برای پایتون مشخص کرده بود:
1. یک زبان برنامه نویسی ساده و بصری، در حالی که قدرت رقیبان خود در دنیای حرفه ای را داشته باشد.
2. متن باز؛ هر فردی بتواند در توسعه این پروژه کمک کند.
3. کد برنامه قابل درک و آسان برای راحت خواندن یک متن انگلیسی.
4. مناسب برای کارهای روزمره و مخصوص طراحی سریع و آسان یک برنامه با مدت زمان کم.
این زبان برنامه نویسی اکنون تعداد زیادی از این خواسته ها را برآورده کرده است. طی این مدت پایتون پیشرفت کرده و به عنوان یک زبان برنامه نویسی محبوب در دنیای مجازی اینترنت شناخته می شود. فلسفه? ایجاد آن تاکید بر دو هدف اصلی خوانایی بالای برنامه‌های نوشته شده و کوتاهی و بازدهی نسبی بالای آن بود. کلمات کلیدی و اصلی این زبان به صورت حداقلی تهیه شده‌اند و در مقابل کتابخانه‌هایی که در اختیار کاربر است بسیار وسیع هستند. یک کار غیر معمول که در طراحی این زبان انجام گرفته استفاده از فاصله و جلوبردن متن برنامه برای مشخص کردن بلوک‌های مختلف کد است. پایتون مدل‌های مختلف برنامه نویسی (از جمله شیء گرا و برنامه نویسی دستوری و تابع محور) را پشتیبانی می‌کند و برای مشخص کردن نوع متغییرها از یک سامانه? پویا استفاده می‌کند.
پایتون یک زبان اسکریپتی و بسیار قدرتمند و گسترده هستش و این روزها می توانید آثاری از نفوذش رو تقریبا همه جا ببیند از پروژه های ساده و بسار کوچک گرفته تا پروژه های عظیم چون برخی از نرم افزار هایNASA .
جالب است بدانید مایکرو سافت نیز این زبان را با نام IronPython در تکنولوژی Net. خود گنجانده است . پایتون ذاتا یک زبان شی گراست و از ویژگی های پیشرفته شی گرایی چون وراثت – چند شکلی – سربار گزاری عملگر و ... پشتیبانی می کند چون پایتون با زبان پورتابل C نوشته شده می تواند به صورت مجازی بر روی هر سیستمی کامپایل و اجرا شود . این یه زبان اسکریپتی یعنی در حالت معمول به فایل اجرایی تبدیل نمی شه بلکه یک ماشین مجازی(مفسر پایتون) فایل کد رو می خونه و همزمان اونارو تفسیر کرده و اجرا می کنه . پس شما می تونید یک برنامه رو تو ویندوز بنویسید و سپس انو بدون تغییر روی لینوکس یا مکینتاش یا هر سیستم عامل و سخت افزار دیگری که پایتون روی آن نصب باشد اجرا کنید .
پایتون یه زبان سطح بالا و شی گرا و تفسیری سمت سرور است. جالب است بدانید که نام پایتون از برنامه مورد علاقه ی سازنده ی آن مونتی پایتون که یک برنامه ی کمدی انگلیسی بود گرفته شده است.
پایتون به صورت opensource توسعه یافته است و سه قابلیت اصلی دارد : سهولت بیشتر - فهم راحت تر - توسعه ی سریع تر
در حقیقت پایتون به قدری سطح بالاست که برنامه نویسی را برای ما دلچسب می کند نکته ی قابل توجه این است که که کدهای نوشته شده با پایتون روی پلتفرم های وسیعی چون لینوکس و ویندوز و مک و حتی گوشی های موبایل و... قابل اجرا می باشد.
هم اکنون پایتون در شرکت ها و سازمان های بزرگی مثل ناسا و گوگل و یاهو و .. به صورت گسترده مورد استفاده قرار می گیرد.
ویزگی های پایتون :‌
 شی گرایی:
نکته ای که جالب است این است که امکان استفاده از کدی که در پایتون نوشتیم در زبان ها ی دیگری مثل سی پلاس پلاس و جاوا وجود دارد در حقیقت کار چسباندن قطعات کد جدا و نوشتن بدنه ی اصلی به عهده ی پایتون است.
رایگان بودن Opensource بودن
قابلیت حمل: چون پایتون با زبان قابل حمل سی نوشته شده می تواند به صور ت مجازی روی هر پردازش گری اجرا شود
قدرتمند بودن: پایتون چون از زبان های تفسیری و سیستمی مشتق شده قدرت زبان های سطح پایین را هم داراست
درونی سازی و گسترش: پرکاربرد ترین و قوی ترین ویزگی پایتون است
شما می توانید قطعه کد را در زبانی مثل سی پلاس پلاس و جاوا نوشته سپس از آن در برنامه نوشته شده با پایتون استفاده کنید
و یا می توان از توابع کتابخانه ای و کامپوننت هایی چون API COM استفاده کرد
می توان از کدهای پایتون هم در زبان های دیگر استفاده کرد(درونی سازی).
سهولت یادگیری واستفاده
از نظر یادگیری این زبان یکی از ساده ترین زبان ها برای یادگیری است
این زبان نیازی به کامپایلر ندارد و شما می توانید بعد از نوشتن کد با یک خط دستور را اجرا کنید
زبان پایتون بسیار شبیه به زبان انسان است
برنامه Hello World را که اولین برنامه ساده می باشد را در دو زبان C و Python مقایسه کنید :
int main()
{
printf("Hello World ");
return 0;
}
اما بوسیله پایتون در یک فایل متنی بنویسید
print "Hello World !!"
و با دستور python hi.py اونو اجرا کنید .
با کم شدن حجم کد برنامه نویسی راحت تر و رفع اشکال و توسعه آن آسان تر می شود .
مدیریت حافظه، جمع‌آوری پسماندها (Garbage Collection) و... همه توسط خود زبان انجام خواهد‌شد.
علاوه بر اینکه Python زبانی عملی برای برنامه های کاربردی میباشد یه جورایی میشه ازش تو زمینه هایه دیگه ای مثلا برنامه نویسی سیستمی – رابط کاربری (gui) – کامپوننت – برنامه نویسی اینترنت – برنامه های عددی و محاسباتی – برنامه های پایگاه داده – پردازش تصویر – هوش مصنوعی – اشیا توضیع شده – شبیه سازی – روباتیک – برنامه نویسی موبایل – امنیت و شبکه و ... استفاده کرد !!!!
برنامه‌های پایتون به‌سادگی روی لینوکس، ویندوز، FreeBSD، مک، سولاریس، آمیگا، پلی‌استیشن، Pocket PC و... قابل اجرا هستند. بر‌خلاف زبان های پایتون به مترجم نیازی ندارد و برنامه شما به‌طور‌مستقیم از روی کد اجرا می‌شود. در‌واقع در پشت پرده، مفسر پایتون برنامه شما را به‌حالتی واسطه‌ای به‌نام ByteCode تبدیل کرده و سپس اجرا‌می‌کند.
پایتون در کجا استفاده می شود؟
مشهورترین کاربر زبان پایتون غول دنیای اینترنت یعنی گوگل است. پایتون به‌عنوان زبان مورد‌علاقه برنامه‌نویسان گوگل شناخته می‌شود. موتور پردازش ابری گوگل با نام Google App Engine از پایتون پشتیبانی می‌کند. شما می‌توانید برنامه‌هایی را که به‌‌محاسبه‌های سنگین و پیچیده نیاز دارند با پایتون نوشته و از طریق App Engine اجرای آن را به سرورهای قدرتمند گوگل بسپارید.
ناسا نیز از دیگر استفاده‌کنندگان پایتون است. به‌صورت دقیق‌تر شرکت United Space Alliance شرکت اصلی پیمانکار مسئول نگه‌داری شاتل‌ها در ناسا از پایتون برای برنامه‌نویسی‌های علمی، طراحی رابط کاربر و توسعه سریع نرم‌افزار بهره می‌برد.
همچنین شرکت اتودسک که از بزرگ‌ترین تولید‌کنندگان نرم‌افزارهای طراحی به کمک کامپیوتر (CAD) و مصور‌سازی است، از پایتون برای ایجاد قابلیت اسکریپت‌نویسی در محیط مایا استفاده می‌کند.
اما تصور نکنید که استفاده از پایتون تنها به‌محاسبه‌های علمی و کاربردهای مهندسی محدود است؛ جرج لوکاس شرکت ILM (سرنام Industrial Light and Magic) را در سال 1975 برای ایجاد جلوه‌های ویژه فیلم اصلی جنگ ستارگان تأسیس کرد. این شرکت هم اکنون برای ایجاد جلوه‌های ویژه، گرافیک کامپیوتری و مدیریت سیستم‌ها از پایتون استفاده می‌کند.
و در‌نهایت می‌توان از شرکت فیلیپس نام برد. این تولید‌کننده سرشناس وسایل الکترونیکی و مصرفی برای توسعه سریع نرم‌افزار، کنترل خط تولید و سیستم کنترل کیفیت خود از پایتون بهره می‌برد.
برای مشاهده فهرست کاملی از کاربران مشهور پایتون بر‌اساس زمینه فعالیت به‌همراه خلاصه‌ای کوتاه از نحوه استفاده و دلایل به‌کارگیری این زبان می‌توانید به آدرسhttp://python.org/about/success مراجعه کنید. 
برای یادگیری پایتون منابع زیادی وجود دارد که بسیاری از آنها رایگان است و ما اینجا تعدادی از آنها را معرفی می کنیم. برای به دست آوردن بهترین نتیجه، توصیه می شود از تمام این وبسایت ها استفاده کنید؛ چرا که هریک از آنها جنبه های منحصر به فردی از این زبان برنامه نویسی را آموزش می دهند.
مانند یک دانشمند IT فکر کنید
مهم ترین جنبه یادگیری پایتون این است که نه فقط به شما چگونگی استفاده از زبان برنامه نویسی پایتون را یاد می دهد بلکه به شما می آموزد چگونه مانند برنامه نویسان فکر کنید. اگر حتی این اولین بار است که کدنویسی می کنید، سایت openbookproject.net یک منبع بسیار مناسب برای شما خواهد بود (آموزش پایتون در آدرس http: / / www.openbookproject.net / thinkcs / python / english2e / ) قرار دارد.
البته به یاد داشته باشید این آموزش نیازمند یک تغییر اساسی در شیوه تفکر است. دستیابی به این تغییر برای برخی ساده و برای برخی بسیار مشکل است؛ ولی وقتی به هدف خود خواهید رسید که پشتکار داشته باشید. هنگامی که یاد گرفتید چگونه مانند یک دانشمند علوم رایانه فکر کنید، قادر خواهید بود براحتی به زبان های دیگر تسلط پیدا کنید.
به داخل پایتون شیرجه بزنید
مجموعه آموزش Dive Into Python (آموزش در لینک http: / / www.diveintopython.net / toc / index.html) برای افرادی که می خواهند کدنویسی در پایتون را یاد بگیرند و در عین حال در برنامه نویسی بی تجربه یا کم تجربه هستند، فوق العاده است. اولین قسمت آموزش به شما یاد می دهد چگونه باید یک مفسر پایتون را روی رایانه تان نصب کنید؛ این کار می تواند برای افراد بی تجربه بسیار سخت باشد.
این وبسایت یک اشکال کوچک نیز دارد؛ خیلی سریع به سمت عمق مطلب حرکت می کند. این مساله که نویسنده چقدر سریع در زبان حرکت می کند، می تواند مبتدیان را کاملا بترساند. اگر بتوانید این مشکل را کنترل کنید، Dive Into Python به یک منبع بسیار مفید تبدیل خواهد شد. ولی اگر در کنترل آن به مشکل خوردید وبسایت های دیگری را که در این فهرست آورده شده است مشاهده کنید تا درک بهتری از زبان به دست بیاورید سپس به این سایت برگردید.
آموزش رسمی پایتون
برای یادگیری پایتون چه جایی می تواند بهتر از خود وبسایت رسمی پایتون باشد. سازندگان زبان یک راهنمای بزرگ و مفید تدوین کرده اند که شما را در اصول اولیه زبان پیش می برد. (http: / / docs.python.org / 2 / tutorial / ) بهترین قسمت این مجموعه آموزشی این است که عجله ای ندارد و به آرامی جلو می رود! با استفاده از چند راه مفاهیم را کاملا در ذهن شما حک می کند تا مطمئن شود کاملا متوجه آن شده اید. قالب بندی وبسایت ساده است و چشم را اذیت نمی کند، این موضوع کل آموزش را نیز ساده تر می کند.
پایتون را امتحان کنید
برخلاف سایت های آموزشی که تا الان آورده شده، trypython.org از آن جهت خوب است و مورد توجه قرار می گیرد که یک مفسر پایتون را در خود دارد. به این معنی که می توانید مستقیما در وبسایت پایتون کدنویسی کنید، که این کار شما را از گشتن و نصب کردن مفسر روی سیستم تان بی نیاز می کند.
البته بدیهی است اگر می خواهید به طور جدی با این زبان کار کنید، سرانجام باید یک مفسر نصب کنید؛ ولی TryPython به شما این امکان را می دهد تا قبل از این که زمان زیادی صرف یادگیری زبانی شود ـ که ممکن است هیچ گاه به درد شما نخورد ـ آن را امتحان کنید. آموزشی که در این سایت وجود دارد با مفسر ترکیب شده است و شما می توانید در همان زمان کدنویسی کرده، تغییرات را اعمال و درحین آموزش نیز تجربه کسب کنید. این سایت بهترین آموزش عملی پایتون است که می توانید خارج از کلاس درس پیدا کنید. البته برای استفاده از TryPython ابتدا باید سیلورلایت مایکروسافت (Microsoft Silverlight) را روی مرورگر خود نصب کنید.
پایتون را یاد بگیرید
وبسایت learnpython.org همانند TryPython یک مفسر در خود دارد تا آموزش، جنبه عملی تر نیز به خود بگیرد. با این حساب این سایت ها چه تفاوتی با یکدیگر دارند؟ درواقع فرق چندانی ندارند.
سایت LearnPython کمی پایه ای تر است که همین مساله باعث می شود مبتدی ها بتوانند با درس ها راحت تر پیش بروند و از مسائل مطرح شده ترس کمتری داشته باشند. همچنین برخلاف TryPython، در آخر هر درس تمرین های برنامه نویسی قرار داده شده است. این تمرین ها دانشی را که کسب کرده اید، تثبیت می کند و مطمئن می شوید آنچه را که یاد گرفته اید، کاملا فهمیده اید.
PyGame: گزینه ای برای بازی دوست ها
برای کسانی که می خواهند پایتون را برای ساخت بازی های رایانه ای یاد بگیرند، این گزینه بسیار ارزشمند خواهد بود. این وبسایت مجموعه ای از کتابخانه های پایتون را در اختیار دارد که به درد تولید برنامه های گرافیکی می خورد. درحالی که پایتون عمومی در پنجره کنسول اجرا می شود که برنامه نویس را به متن های اسکی (ASCII) محدود می کند. ولی PyGame برای نمایش تصاویر در یک صفحه غیرکنسولی ترفندهایی در چنته دارد. می خواهید بدانید بهترین قسمت آن چیست؟ یادگیری و استفاده از پایتون در آن برای شما بسیار ساده خواهد بود. در پایان اگرچه نمودار یادگیری پایتون در سطح پایینی قرار دارد، ولی این زبان آنچنان قدرتمند است که می تواند برای توسعه برنامه های کاربردی مختلفی به کار گرفته شود. محبوبیت این زبان نسبت به گذشته رشد چشمگیری داشته است و به این زودی هاهیچ نشانه ای از افول آن به چشم نمی خورد. اگر می خواهید یک زبان همه کاره و قدرتمند یاد بگیرید، هیچ گاه برای نگاه انداختن به پایتون دیر نخواهد بود. - See more at: http://bakhshayesh.com/blog-entry/%D9%87%D9%85%D9%87-%DA%86%DB%8C%D8%B2-%D8%AF%D8%B1%D8%A8%D8%A7%D8%B1%D9%87-%D8%B2%D8%A8%D8%A7%D9%86-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D9%86%D9%88%DB%8C%D8%B3%DB%8C-%D9%BE%D8%A7%DB%8C%D8%AA%D9%88%D9%86-python#sthash.oNsO58uH.dpuf

 

Source

http://bakhshayesh.com

 


کلمات کلیدی:


نوشته شده توسط Abteen 94/10/18:: 11:32 صبح     |     () نظر

s it possible to build a full featured instant messaging app using Parse.com only? Just to mention that the app is basically a group chat app where users login, choose group or "search/add" specific peer to chat with.

App features:

peer to group or peer to peer messaging
Users will be able to Send photos
Presence detection (Detect when user is online/offline)
Customized stickers


I was just looking at the new Google Cloud Messaging (GCM) and I was wondering if it is possible to use GCM for Instant Messaging on your Android application?

I saw you can send data, like a message, from a server, but is it also possible to send from one device to another one? And how would this work? Some example code would be really helpful..

Tnx!
android instant-messaging google-cloud-messaging
shareimprove this question
   
asked Jul 6 "12 at 19:08
dumazy
3,87052563
   
add a comment
4 Answers
active
oldest
votes
up vote
14
down vote
accepted
   

The official docs on Google Cloud Messaging for Android does mention that GCM can be used to develop an instant messaging app.

    ...or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly).

So we went ahead and created an instant messaging app using GCM. The server-side is powered by Google App Engine. You can read the complete tutorial here. Create an Instant Messaging app using Google Cloud Messaging (GCM)

So it is possible to use GCM for Instant Messaging on Android, to answer your question. However, reliability of GCM compared to XMPP for IM is another topic.
shareimprove this answer
   
edited Jul 25 "13 at 17:22
   
answered Jul 25 "13 at 15:24
appsroxcom
2,656514
   
        
   
Cool tutorial. How much time did it take you to create this? And how much people were involved? – mlatu Nov 10 "14 at 12:02
add a comment
up vote
8
down vote
   

Just my two cents:

I think you should not use GCM for delivering IM. You should have a dedicated server where your Android IM apps will connect to, using a persistent socket connection. Your server will know who is online or not and therefore can present an "online list" to all the apps.

GCM can come into play, while users are offline or not running your app. A GCM message can be sent to them to indicate "XXXX wants to chat". They can then launch your app and automatically connects to a chat session.

Google has said that the delivery of GCM messages are not guaranteed. This reason alone is not a good idea to rely on them for Instant Messaging.
shareimprove this answer
   
answered Jul 7 "12 at 19:55
azgolfer
9,24343242
   
        
   
And do you know a some kind of alternative for IM? tnx – dumazy Jul 8 "12 at 19:53
4      
   
IM is a complex beast, it"s best not to reinvent the wheels if possible. Do a google search on XMPP, you may find some free or cheap solution that you can integrate into your environment. Also see this topic: stackoverflow.com/questions/4769020/… – azgolfer Jul 8 "12 at 21:00
        
   
Hi check out pub nub - it is pretty easy to implement - see if they have a java client here is a javascript only solution works on mobile. <stackoverflow.com/questions/7316186/…; – ozmike Oct 20 "12 at 1:25
        
   
I totally agree given that I"ve had some delays in message delivery and even some that were skipped totally. – Michael Obi May 4 "15 at 11:44
add a comment
up vote
0
down vote
   

Try pub nub - it is pretty easy to implement - send Im from one mobile to another - simply fire up the web page (see link) in the browser , and chat between pc, mobile - and works - with "no server". Code is for javascript but they also have java. Chat app using jquerymobile web app framework
shareimprove this answer
   

   

   

You might want to check out how a server sends a message to the GCM Service. It is possible to use php on Server side so it should be possible to adapt that to a POST request directly out of your application. However, to communicate you need the registered ids of the devices you want to send data to. Means you will need something to store and get them. Best solution would be your own (web) server which stores all ids and handles the Message sending.



I was just looking at the new Google Cloud Messaging (GCM) and I was wondering if it is possible to use GCM for Instant Messaging on your Android application?

I saw you can send data, like a message, from a server, but is it also possible to send from one device to another one? And how would this work? Some example code would be really helpful..

Tnx!
android instant-messaging google-cloud-messaging
shareimprove this question
   
asked Jul 6 "12 at 19:08
dumazy
3,87052563
   
add a comment
4 Answers
active
oldest
votes
up vote
14
down vote
accepted
   

The official docs on Google Cloud Messaging for Android does mention that GCM can be used to develop an instant messaging app.

    ...or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly).

So we went ahead and created an instant messaging app using GCM. The server-side is powered by Google App Engine. You can read the complete tutorial here. Create an Instant Messaging app using Google Cloud Messaging (GCM)

So it is possible to use GCM for Instant Messaging on Android, to answer your question. However, reliability of GCM compared to XMPP for IM is another topic.
shareimprove this answer
   
edited Jul 25 "13 at 17:22
   
answered Jul 25 "13 at 15:24
appsroxcom
2,656514
   
        
   
Cool tutorial. How much time did it take you to create this? And how much people were involved? – mlatu Nov 10 "14 at 12:02
add a comment
up vote
8
down vote
   

Just my two cents:

I think you should not use GCM for delivering IM. You should have a dedicated server where your Android IM apps will connect to, using a persistent socket connection. Your server will know who is online or not and therefore can present an "online list" to all the apps.

GCM can come into play, while users are offline or not running your app. A GCM message can be sent to them to indicate "XXXX wants to chat". They can then launch your app and automatically connects to a chat session.

Google has said that the delivery of GCM messages are not guaranteed. This reason alone is not a good idea to rely on them for Instant Messaging.
shareimprove this answer
   
answered Jul 7 "12 at 19:55
azgolfer
9,24343242
   
        
   
And do you know a some kind of alternative for IM? tnx – dumazy Jul 8 "12 at 19:53
4      
   
IM is a complex beast, it"s best not to reinvent the wheels if possible. Do a google search on XMPP, you may find some free or cheap solution that you can integrate into your environment. Also see this topic: stackoverflow.com/questions/4769020/… – azgolfer Jul 8 "12 at 21:00
        
   
Hi check out pub nub - it is pretty easy to implement - see if they have a java client here is a javascript only solution works on mobile. <stackoverflow.com/questions/7316186/…; – ozmike Oct 20 "12 at 1:25
        
   
I totally agree given that I"ve had some delays in message delivery and even some that were skipped totally. – Michael Obi May 4 "15 at 11:44
add a comment
up vote
0
down vote
   

Try pub nub - it is pretty easy to implement - send Im from one mobile to another - simply fire up the web page (see link) in the browser , and chat between pc, mobile - and works - with "no server". Code is for javascript but they also have java. Chat app using jquerymobile web app framework
shareimprove this answer
   
answered Oct 20 "12 at 1:32
ozmike
9591121
   
add a comment
up vote
0
down vote
   

You might want to check out how a server sends a message to the GCM Service. It is possible to use php on Server side so it should be possible to adapt that to a POST request directly out of your application. However, to communicate you need the registered ids of the devices you want to send data to. Means you will need something to store and get them. Best solution would be your own (web) server which stores all ids and handles the Message sending.


Source
Stackoverflow.com


کلمات کلیدی:


نوشته شده توسط Abteen 94/10/17:: 6:30 عصر     |     () نظر
position

                   orders rows based on their value for the expression

                   in this position of the select list.

            ASC

            DESC

                   specifies either ascending or descending order.  ASC

                   is the default.



FOR UPDATE

    locks the selected rows.



NOWAIT

    returns control to you if the SELECT statement attempts to lock a

    row that is locked by another user.  If you omit this clause, ORACLE

    waits until the row is available and then returns the results of the

    SELECT statement.



PREREQUISITES:

    For you to select data from a table or snapshot, the table or

    snapshot must be in your own schema or you must have SELECT

    privilege on the table or snapshot.



    For you to select rows from the base tables of a view, the owner of

    the schema containing the view must have SELECT privilege on the

    base tables.  Also, if the view is in a schema other than your own,

    you must have SELECT privilege on the view.



    The SELECT ANY TABLE system privilege also allows you to select data

    from any table or any snapshot or any view"s base table.



    If you are using Trusted ORACLE in DBMS MAC mode, your DBMS label

    must dominate the creation label of each queried table, view, or

    snapshot or you must have READUP system privileges.



SEE:

    DELETE, UPDATE

 


    CREATE TABLE command



PURPOSE:

    To create a table, the basic structure to hold user data, specifying

    this information:



    * column definitions

    * integrity constraints

    * the table"s tablespace

    * storage characteristics

    * an optional cluster

    * data from an arbitrary query



SYNTAX:



CREATE TABLE [schema.]table

     ( { column datatype [DEFAULT expr] [column_constraint] ...

       | table_constraint}

    [, { column datatype [DEFAULT expr] [column_constraint] ...

       | table_constraint} ]...)

    [ [PCTFREE  integer] [PCTUSED  integer]

      [INITRANS integer] [MAXTRANS integer]

      [TABLESPACE tablespace]

      [STORAGE storage_clause]

    | [CLUSTER cluster (column [, column]...)] ]

    [ ENABLE   enable_clause

    | DISABLE disable_clause ] ...

    [AS subquery]



where:



schema

    is the schema to contain the table.  If you omit schema, ORACLE

    creates the table in your own schema.



table

    is the name of the table to be created.



column

    specifies the name of a column of the table.  The number of columns

    in a table can range from 1 to 254.



datatype

    is the datatype of a column.



DEFAULT

    specifies a value to be assigned to the column if a subsequent

    INSERT statement omits a value for the column.  The datatype of the

    expression must match the datatype of the column.  A DEFAULT

    expression cannot contain references to other columns, the

    pseudocolumns CURRVAL, NEXTVAL, LEVEL, and ROWNUM, or date constants

    that are not fully specified.



column_constraint

    defines an integrity constraint as part of the column definition.



table_constraint

    defines an integrity constraint as part of the table definition.



PCTFREE

    specifies the percentage of space in each of the table"s data blocks

    reserved for future updates to the table"s rows.  The value of

    PCTFREE must be a positive integer from 1 to 99.  A value of 0

    allows the entire block to be filled by inserts of new rows.  The

    default value is 10.  This value reserves 10% of each block for

    updates to existing rows and allows inserts of new rows to fill a

    maximum of 90% of each block.



    PCTFREE has the same function in the commands that create and alter

    clusters, indexes, snapshots, and snapshot logs.  The combination of

    PCTFREE and PCTUSED determines whether inserted rows will go into

    existing data blocks or into new blocks.



PCTUSED

    specifies the minimum percentage of used space that ORACLE maintains

    for each data block of the table.  A block becomes a candidate for

    row insertion when its used space falls below PCTUSED.  PCTUSED is

    specified as a positive integer from 1 to 99 and defaults to 40.



    PCTUSED has the same function in the commands that create and alter

    clusters, snapshots, and snapshot logs.



    The sum of PCTFREE and PCTUSED must be less than 100.  You can use

    PCTFREE and PCTUSED together use space within a table more

    efficiently.



INITRANS

    specifies the initial number of transaction entries allocated within

    each data block allocated to the table.  This value can range from 1

    to 255 and defaults to 1.  In general, you should not change the

    INITRANS value from its default.



    Each transaction that updates a block requires a transaction entry

    in the block.  The size of a transaction entry depends on your

    operating system.



    This parameter ensures that a minimum number of concurrent

    transactions can update the block and helps avoid the overhead of

    dynamically allocating a transaction entry.



    The INITRANS parameter serves the same purpose in clusters, indexes,

    snapshots, and snapshot logs as in tables.  The minimum and default

    INITRANS value for a cluster or index is 2, rather than 1.



MAXTRANS

    specifies the maximum number of concurrent transactions that can

    update a data block allocated to the table.  This limit does not

    apply to queries.  This value can range from 1 to 255 and the

    default is a function of the data block size.  You should not change

    the MAXTRANS value from its default.



    If the number concurrent transactions updating a block exceeds the

    INITRANS value, ORACLE dynamically allocates transaction entries in

    the block until either the MAXTRANS value is exceeded or the block

    has no more free space.



    The MAXTRANS parameter serves the same purpose in clusters,

    snapshots, and snapshot logs as in tables.



TABLESPACE

    specifies the tablespace in which ORACLE creates the table.  If you

    omit this option, then ORACLE creates the table in the default

    tablespace of the owner of the schema containing the table.



STORAGE

    specifies the storage characteristics for the table.  This clause

    has performance ramifications for large tables.  Storage should be

    allocated to minimize dynamic allocation of additional space.



CLUSTER

    specifies that the table is to be part of the cluster.  The columns

    listed in this clause are the table columns that correspond to the

    cluster"s columns.  Generally, the cluster columns of a table are

    the column or columns that comprise its primary key or a portion of

    its primary key.



    Specify one column from the table for each column in the cluster

    key.  The columns are matched by position, not by name.  Since a

    clustered table uses the cluster"s space allocation, do not use the

    PCTFREE, PCTUSED, INITRANS, or MAXTRANS parameters, the TABLESPACE

    option, or the STORAGE clause in conjunction with the CLUSTER

    option.



ENABLE

    enables an integrity constraint.



DISABLE

    disables an integrity constraint.



    Constraints specified in the ENABLE and DISABLE clauses of a CREATE

    TABLE statement must be defined in the statement.  You can also

    enable and disable constraints with the ENABLE and DISABLE keywords

    of the CONSTRAINT clause.  If you define a constraint but do not

    explicitly enable or disable it, ORACLE enables it by default.



    You cannot use the ENABLE and DISABLE clauses in a CREATE TABLE

    statement to enable and disable triggers.



AS subquery

    inserts the rows returned by the subquery into the table upon its

    creation.



    If you include this clause, the column definitions can only specify

    column names, default values, and integrity constraints, not

    datatypes.  ORACLE derives column datatypes and lengths from the

    subquery.  ORACLE also automatically defines NOT NULL constraints on

    columns in the new table if they existed on the corresponding

    columns of the selected table and the subquery does not modify the

    column value with a SQL function or operator.  A CREATE TABLE

    statement cannot contain both the AS clause and a referential

    integrity constraint definition.



    The number of columns must equal the number of expressions in the

    subquery.  If all expressions in the subquery are columns, you can

    omit the columns from the table definition entirely.  In this case,

    the names of the columns of table are the same as the columns in the

    subquery.



PREREQUISITES:

    To create a table in your own schema, you must have CREATE TABLE

    system privilege.  To create a table in another user"s schema, you

    must have CREATE ANY TABLE system privilege.  Also, the owner of the

    schema to contain the table must have either space quota on the

    tablespace to contain the table or UNLIMITED TABLESPACE system

    privilege.



SEE:

    ALTER TABLE, CONSTRAINT, CREATE CLUSTER, CREATE INDEX, CREATE

    TABLESPACE, DISABLE, DROP TABLE, ENABLE, STORAGE

 


    CONSTRAINT clause



PURPOSE:

    To define an integrity constraint.  An integrity constraint is a

    rule that restricts the values for one or more columns in a table.



SYNTAX:



Column constraint:



[CONSTRAINT constraint]

{ [NOT] NULL

| {UNIQUE | PRIMARY KEY}

|  REFERENCES [schema.]table [(column)]

        [ON DELETE CASCADE]

|  CHECK (condition) }

{ [ USING INDEX [PCTFREE integer]

                [INITRANS integer] [MAXTRANS integer]

                [TABLESPACE tablespace]

                [STORAGE storage_clause] ]

  [ EXCEPTIONS INTO [schema.]table

| DISABLE }



Table constraint:



[CONSTRAINT constraint]

{ {UNIQUE | PRIMARY KEY} (column [,column] ...)

|  FOREIGN KEY (column [,column] ...)

         REFERENCES [schema.]table [(column [,column] ...)]

        [ON DELETE CASCADE]

| CHECK (condition) }

{ [ USING INDEX [PCTFREE integer]

                [INITRANS integer] [MAXTRANS integer]

                [TABLESPACE tablespace]

                [STORAGE storage_clause] ]

  [ EXCEPTIONS INTO [schema.]table[@dblink]

| DISABLE }



where:



CONSTRAINT

    identifies the integrity constraint by the name constraint.  ORACLE

    stores this name in the data dictionary along with the definition of

    the integrity constraint.  If you omit this identifier, ORACLE

    generates a name with this form:

            SYS_Cn

    where

            n

                   is an integer that makes the name unique

                   within the database.



    For the names and definitions of integrity constraints, query the

    data dictionary.



NULL

    specifies that a column can contain null values.



NOT NULL

    specifies that a column cannot contain null values.



    If you do not specify NULL or NOT NULL in a column definition, NULL

    is the default.



UNIQUE

    designates a column or combination of columns as a unique key.



PRIMARY KEY

    designates a column or combination of columns as the table"s primary

    key.



FOREIGN KEY

    designates a column or combination of columns as the foreign key in

    a referential integrity constraint.



REFERENCES

    identifies the primary or unique key that is referenced by a foreign

    key in a referential integrity constraint.



ON DELETE CASCADE

    specifies that ORACLE maintains referential integrity by

    automatically removing dependent foreign key values if you remove a

    referenced primary or unique key value.



CHECK

    specifies a condition that each row in the table must satisfy.



USING INDEX

    specifies parameters for the index ORACLE uses to enforce a UNIQUE

    or PRIMARY KEY constraint.  The name of the index is the same as the

    name of the constraint.  You can choose the values of the INITRANS,

    MAXTRANS, TABLESPACE, STORAGE, and PCTFREE parameters for the index.

    For information on these parameters, see the CREATE TABLE command.



    Only use this clause when enabling UNIQUE and PRIMARY KEY

    constraints.



EXCEPTIONS INTO

    identifies a table into which ORACLE places information about rows

    that violate an enabled integrity constraint.  This table must exist

    before you use this option.  If you omit schema, ORACLE assumes the

    exception table is in your own schema.  The exception table must be

    on your local database.



DISABLE

    disables the integrity constraint.  If an integrity constraint is

    disabled, ORACLE does not enforce it.



    If you do not specify this option, ORACLE automatically enables the

    integrity constraint.



    You can also enable and disable integrity constraints with the

    ENABLE and DISABLE clauses of the CREATE TABLE and ALTER TABLE

    commands.



PREREQUISITES:

    CONSTRAINT clauses can appear in either CREATE TABLE or ALTER TABLE

    commands.  To define an integrity constraint, you must have the

    privileges necessary to issue one of these commands.  See the CREATE

    TABLE and ALTER TABLE commands.



    Defining a constraint may also require additional privileges or

    preconditions that depend on the type of constraint.



SEE:

    ALTER TABLE, CREATE TABLE, DISABLE, ENABLE



Example:  To define the table staff, as user scott, you could enter:



               CREATE TABLE staff (

                  empno    NUMBER       NOT NULL   PRIMARY KEY,

                  ename    CHAR(20)     NOT NULL   CHECK (ename = UPPER),

                  job      CHAR(10),

                  mgr      NUMBER       REFERENCES scott.staff(empno),

                  hiredate DATE         CHECK (hiredate >= SYSDATE - 7),

                  sal      NUMBER(10,2) CHECK (sal > 800),

                  comm     NUMBER(9,2)  DEFAULT NULL,

                  deptno   NOT NULL     REFERENCES scott.dept(deptno)

               )

               PCTFREE 5 PCTUSED 75

کلمات کلیدی:


نوشته شده توسط Abteen 94/10/16:: 3:27 عصر     |     () نظر
SQL*PLUS COMMANDS



     @                        @@                     /

     ACCEPT                   APPEND                 BREAK

     BTITLE                   CHANGE                 CLEAR

     COLUMN                   COMPUTE                CONNECT

    COPY                     DEFINE                 DEL

    DESCRIBE                 DISCONNECT             EDIT

    EXECUTE                  EXIT                   GET

    HELP                     HOST                   INPUT

    LIST                     PAUSE                  PRINT

    PROMPT                   REMARK                 RUN

    RUNFORM                  SAVE                   SET

    SHOW                     SPOOL                  SQLPLUS

    START                    TIMING                 TTITLE

    UNDEFINE                 VARIABLE               WHENEVER OSERROR

    WHENEVER SQLERROR



PL/SQL COMMANDS (Statements)



    CLOSE Statement          EXIT Statement         FETCH Statement

    GOTO Statement           IF Statement           LOOP Statement

    NULL Statement           OPEN Statement         RAISE Statement

    RETURN Statement



SQL COMMANDS



The SQL commands are divided into these categories:



    * Data Definition Language commands

    * Data Manipulation Language commands

    * Transaction Control commands

    * Session Control commands

    * System Control commands



SQL Data Definition Language commands include the following:



    ALTER CLUSTER            ALTER SEQUENCE         COMMENT

    ALTER DATABASE           ALTER SNAPSHOT         CREATE CLUSTER

    ALTER FUNCTION           ALTER SNAPSHOT LOG     CREATE CONTROLFILE

    ALTER INDEX              ALTER TABLE            CREATE DATABASE

    ALTER PACKAGE            ALTER TABLESPACE       CREATE DATABASE LINK

    ALTER PROCEDURE          ALTER TRIGGER          CREATE FUNCTION

    ALTER PROFILE            ALTER USER             CREATE INDEX

    ALTER RESOURCE COST      ALTER VIEW             CREATE PACKAGE

    ALTER ROLE               ANALYZE                CREATE PACKAGE BODY

    ALTER ROLLBACK SEGMENT   AUDIT                  CREATE PROCEDURE

    CREATE PROFILE           DROP ROLE

    CREATE ROLE              DROP ROLLBACK SEGMENT

    CREATE ROLLBACK SEGMENT  DROP SEQUENCE

    CREATE SCHEMA            DROP SNAPSHOT

    CREATE SEQUENCE          DROP SNAPSHOT LOG

    CREATE SNAPSHOT          DROP SYNONYM

    CREATE SNAPSHOT LOG      DROP TABLE

    CREATE SYNONYM           DROP TABLESPACE

    CREATE TABLE             DROP TRIGGER

    CREATE TABLESPACE        DROP USER

    CREATE TRIGGER           DROP VIEW

    CREATE USER              GRANT

    CREATE VIEW              NOAUDIT

    DROP CLUSTER             RENAME

    DROP DATABASE LINK       REVOKE

    DROP FUNCTION            TRUNCATE

    DROP INDEX               UPDATE

    DROP PROCEDURE

    DROP PROFILE



SQL Data Manipulation Language commands include the following:



    DELETE

    EXPLAIN PLAN

    INSERT

    LOCK TABLE

    SELECT



SQL Transaction Control commands include the following:



    COMMIT

    ROLLBACK

    SAVEPOINT

    SET TRANSACTION



SQL Session Control commands include the following:



    ALTER SESSION

    SET ROLE



SQL System Control command (only one command):



    ALTER SYSTEM

Insert Command



INSERT INTO t/v_name (column, column,...)    --(column list) optional

    VALUES(value, value,...);



 INSERT INTO t/v_name (column, column,...) SELECT...;



 INSERT adds rows to the table or view specified.  Names in the column

 list may be in any order.  Unlisted columns are set to NULL; you must

 list any column created NOT NULL, and supply a value for it.



 VALUES inserts each item in its list of values into the corresponding

 column in the list of columns. The datatypes of each pair of items in

 the two lists must be compatible or convertible. CHAR and DATE values

 must be enclosed in "single quotes".



 Use a subquery to INSERT rows from another table.  SELECT must return

 a value for each column listed.



Update Command 



UPDATE table/view_name SET

     column_name = sql_expression                       --SQL option

     column_name = (one_value_SELECT_statement)         --SQL option

     (column_name, column_name,...) = SELECT_statement  --SQL option

   WHERE_clause;



 UPDATE replaces the values in rows of one or more specified columns

 with the values from a SQL expression or a SELECT statement. SELECT

 must return at least one row, and every column to the left of the =

 sign.  SELECT may not contain an INTO clause.  Use the WHERE clause

 to specify conditions rows must meet in order to be updated; if you

 omit the WHERE clause, all rows are updated.





 DELETE FROM table_or_view  WHERE clause;                   





 DELETE removes one or more rows from the table or view you specify.

 The WHERE clause specifies the rows to remove.  To remove all rows,

 omit the WHERE clause.





    SELECT command



PURPOSE:

    To retrieve data from one or more tables, views, or snapshots.



SYNTAX:
SELECT [DISTINCT | ALL] { *

                        | { [schema.]{table | view | snapshot}.*

                          | expr [c_alias] }

                       [, { [schema.]{table | view | snapshot}.*

                          | expr [c_alias] } ] ... }

    FROM [schema.]{table | view | snapshot}[@dblink] [t_alias]

      [, [schema.]{table | view | snapshot}[@dblink] [t_alias] ] ...

    [WHERE condition ]

    [ [START WITH condition] CONNECT BY condition]

    [GROUP BY expr [, expr] ... [HAVING condition] ]

    [{UNION | UNION ALL | INTERSECT | MINUS} SELECT command ]

    [ORDER BY {expr|position} [ASC | DESC]

           [, {expr|position} [ASC | DESC]] ...]

    [FOR UPDATE [OF [[schema.]{table | view}.]column

                 [, [[schema.]{table | view}.]column] ...] [NOWAIT] ]



where:



DISTINCT

    returns only one copy of each set of duplicate rows selected.

    Duplicate rows are those with matching values for each expression in

    the select list.



ALL

    returns all rows selected, including all copies of duplicates.



    The default is ALL.



*

    selects all columns from all tables, views, or snapshots listed in

    the FROM clause.



table.*

view.*

snapshot.*

    selects all columns from the specified table, view, or snapshot.

    You can use the schema qualifier to select from a table, view, or

    snapshot in a schema other than your own.



    If you are using Trusted ORACLE, the * does not select the ROWLABEL

    column.  To select this column, you must explicitly specify it in

    the select list.



expr

    selects an expression, usually based on columns values, from one of

    the tables, views, or snapshots in the FROM clause.  A column name

    in this list can only contain be qualified with schema if the table,

    view, or snapshot containing the column is qualified with schema in

    the FROM clause.



c_alias

    provides a different name for the column expression and causes the

    alias to be used in the column heading.  A column alias does not

    affect the actual name of the column.  Column aliases cannot be

    referenced elsewhere in a query.



schema

    is the schema containing the selected table, view, or snapshot.  If

    you omit schema, ORACLE assumes the table, view, or snapshot is in

    your own schema.



table

view

snapshot

    is the name of a table, view, or snapshot from which data is

    selected.



dblink

    is complete or partial name for a database link to a remote database

    where the table, view, or snapshot is located.  Note that this

    database need not be an ORACLE7 database.



    If you omit dblink, ORACLE assumes that the table, view, or snapshot

    is on the local database.



t_alias

    provides a different name for the table, view, or snapshot for the

    purpose of evaluating the query and is most often used in a

    correlated query.  Other references to the table, view, or snapshot

    throughout the query must refer to the alias.



WHERE

    restricts the rows selected to those for which the condition is

    TRUE.  If you omit this clause, ORACLE returns all rows from the

    tables, views, or snapshots in the FROM clause.



START WITH

CONNECT BY

    returns rows in a hierarchical order.



GROUP BY

    groups the selected rows based on the value of expr for each row and

    returns a single row of summary information for each group.



HAVING

    restricts the groups of rows returned to those groups for which the

    specified condition is TRUE.  If you omit this clause, ORACLE

    returns summary rows for all groups.



UNION

UNION ALL

INTERSECT

MINUS

    combines the rows returned by two SELECT statement using a set

    operation.



ORDER BY

    orders rows returned by the statement.

            expr

                   orders rows based on their value for expr.  The

                   expression is based on columns in the select list or

                   columns in the tables, views, or snapshots in the

                   FROM clause.

کلمات کلیدی:


نوشته شده توسط Abteen 94/10/16:: 3:26 عصر     |     () نظر

Recently on the RCM2 LinkedIn Group, an interesting discussion emerged on the differences between root cause and failure mode? Worth sharing…

Adhen Utomo, Mechanical Engineer at Kaltm Prima Coal in Indonesia, asked this question, “what is the difference between root cause and failure mode?”

Denis Marshment, long time RCM2 Practitioner and Director of Asset Dynamics Asia. Stated that “Root cause and failure modes are essentially the same thing. Both are causes of failure. The only difference is in the techniques that we use to identify them. With Root Cause Analysis (RCA) we are studying a failure event that has already occurred with the aim of preventing its re-occurrence. To do this we must understand all the contributing factors that led to the failure and identify the likely causes. We stop listing failure modes (causes) when it becomes possible to implement a suitable failure management policy – this is the “Root Cause”. RCA is concerned with a single failure event and is applied after the failure has occurred, so in this sense its scope is limited and it is a reactive approach.

The other technique that uses root causes/failure modes is the RCM approach. With RCM we try to identify all the likely causes of failure and their consequences for an asset or system and identify suitable failure management policies to address each failure mode. RCM is a proactive approach that is hopefully applied before the asset has failed with the objective being to mitigate or prevent the failure consequences. The output of RCM is a maintenance plan for the asset or system that covers all the likely failure modes.

Both approaches are extremely useful and quite complimentary.”

Steve Turner of OMCS added that he has a different understanding. “To me, if we are talking assets, there are failure modes which by definition from a dictionary, means the “manner for form” by which things fail. The word “cause” can mean the same thing. However when someone adds the word root to either failure mode or cause, they are meaning the failure mode or cause that was at the root of the problem. My understanding of causal relationships is that they are a continuum and they can have multiple trees. You can keep asking why forever and so you can never get to the root cause in reality…. there is no such thing. There are numbers of causes and events that end up causing failure. So with Dennis definition, his root cause is when we can put in a suitable failure management policy… Under his definition, Root Causes is a post failure thing. My definition is root cause can be established ahead of failures… RCA can be done in the future tense but it is not called by that name in futuristic studies.
I don’t want to add to the confusion, but some people use the term failure mechanism too and they say this term differs from failure mode. Maintenance is full of words that people use differently. You can see that Dennis has a different understanding to me… If I get into a technical conversation I often ask what they mean by the words they use so I understand the definitions being applied.”

Adhen Utomo, whom asked this question, realized that this company needs to decide and develop a dictionary related to maintenance since there is a lot confusion and debate for maintenance “word”. He agreed with Denis because “We have the same information from John Moubray, but there are a lot that might be we must search and digging for details of this issue in maintenance.”

Matt Thomnpson of Rio tinto added “The only thing I would like to add to the discussion is that athough failure modes ( from an equipment centric point of view) can often be thought of as causes not all causes can be thought of as failure modes. For example administrative causes or failures of procedures or management policies can be root causes of an RCA cause and effect chain but are not equipment or component failure modes.  Root cause and failure mode are classified as two separate things.”  

Matt had an example (however simple it is) to illustrate the differences:

EQUIPMENT:  e.g. furnace tube boiler

FAILURE: (what happened)  e.g. Catastrophic failure of the welded joint between the furnace tube and tube plate.

FAILURE MODE: (by definition is what the equipment or component failed from) e.g. Corrosion fatigue.

ROOT CAUSE/S: (by definition, what caused the failure mode to occur AND what can be changed to prevent re-occurrence. Remember there can be more than one!!)
e.g. Poor feed water treatment accelerated corrosion; Rapid firing, particularly from cold, increased thermal stress on the boiler; Over pressurization and temperature cycles.

 

Source

http://www.thealadonnetwork.com


کلمات کلیدی:


نوشته شده توسط Abteen 94/10/16:: 3:17 عصر     |     () نظر

only thing you have to do is change

httpd.conf

Listen 80 to 8080

ServerName : localhost:80 to 8080

and

C:\xampp\apache\conf\extra

httpd-ssl.conf

Listen 443 to 4499

and

VirtualHost default:443 to 4499

ServerName www.example.com:443 to 4499

Normal Xampp Working

Source

Stackoverflow.com


کلمات کلیدی:


نوشته شده توسط Abteen 94/10/11:: 12:23 عصر     |     () نظر

In your xampppath\apache\conf\extra open file httpd-xampp.conf and find the below tag:

# Close XAMPP sites here
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

and add

"Allow from all"

after Allow from ::1 127.0.0.0/8 {line}

Restart xampp, and you are done.

In later versions of Xampp

...you can simply remove this part

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

from the same file and it should work over the local network.

share improve this answer
 
    
But after adding that it takes me to the XAMPP homepage instead of whatever IP I provide it. I tried accessing my DLink router but I landed upon the XAMPP homepage after adding the Allow from all line to the file. – ikartik90 May 21 "12 at 12:30
    
i cant able you get you give details – Abhishek Jaiswal Jul 20 "12 at 10:50
1  
just for somebody information: i had also to set up the passwords in "/opt/lampp/lampp security" after adding this string. Thanks. – Maksym Aug 10 "12 at 22:58
1  
Only works when set up passwords in /opt/lampp/lampp security – B4NZ41 Mar 30 "13 at 16:27
3  
Restarting your computer or XAMPP is a must! – Gauraw Yadav Aug 13 "13 at 13:51

This solution worked well for me: http://www.apachefriends.org/f/viewtopic.php?f=17&t=50902&p=196185#p196185

Edit /opt/lampp/etc/extra/httpd-xampp.conf and adding Require all granted line at bottom of block <Directory "/opt/lampp/phpmyadmin"> to have the following code:

<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
</Directory>
shareimprove this answer
 

This answer is for XAMPP on Ubuntu.

The manual for installation and download is on (site official)

http://www.apachefriends.org/it/xampp-linux.html

After to start XAMPP simply call this command:

sudo /opt/lampp/lampp start

You should now see something like this on your screen:

Starting XAMPP 1.8.1...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.

If you have this

Starting XAMPP for Linux 1.8.1...                                                             
XAMPP: Another web server daemon is already running.
XAMPP: Another MySQL daemon is already running.
XAMPP: Starting ProFTPD...
XAMPP for Linux started

. The solution is

sudo /etc/init.d/apache2 stop
sudo /etc/init.d/mysql stop

And the restast with sudo //opt/lampp/lampp restart

You to fix most of the security weaknesses simply call the following command:

/opt/lampp/lampp security

After the change this file

sudo kate //opt/lampp/etc/extra/httpd-xampp.conf

Find and replace on

    #
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8
Allow from all
#\
# fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
# fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

Source
Stackoverflow.com

کلمات کلیدی:


نوشته شده توسط Abteen 94/10/11:: 12:19 عصر     |     () نظر

MySQL 5.6 Command Line Client

and mysqld.exe from the Program Files/MySQL/MySQLServer/bin directory and I"ve had no luck.

Upon running mysqld.exe, I get the following error:

2013-10-28 18:52:12 4788 [ERROR] InnoDB: .\ibdata1 can"t be opened in read-write mode
2013-10-28 18:52:12 4788 [ERROR] InnoDB: The system tablespace must be writable!
2013-10-28 18:52:12 4788 [ERROR] Plugin "InnoDB" init function returned error.
2013-10-28 18:52:12 4788 [ERROR] Plugin "InnoDB" registration as a STORAGE ENGINE failed.
2013-10-28 18:52:12 4788 [ERROR] Unknown/unsupported storage engine: InnoDB
2013-10-28 18:52:12 4788 [ERROR] Aborting`

Naturally, I tried running it as administrator and I got this:

C:\Windows\system32>"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe"
2013-10-28 19:24:30 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca
ted. Please use --explicit_defaults_for_timestamp server option (see documentati
on for more details).
share improve this question
1  
This is how I feel right now: i.imgur.com/xVyoSl.jpg – Shaun Wild Oct 28 "13 at 18:56
1  
install mysql workbench and try accessing it from there – Shekhar Oct 28 "13 at 19:16
up vote 2 down vote accepted

Make sure the mysqld.exe is ticked under the Startup tab when you go to run and type msconfig. Also, same goes for Services, look for the MySQL services there, right click > properties and make sure the startup types are selected as automatic.

shareimprove this answer
    
how do I just run the server? – Shaun Wild Oct 28 "13 at 19:03
    
Have you tried to run it manually? Just by starting mysqld.exe? I can only verify the exact services tomorrow at work, do not know them out of my head. – Rudolph Oct 28 "13 at 19:05
    
Yes, please check my question. – Shaun Wild Oct 28 "13 at 19:26
2  
I set the service as automatic an restart my computer, job done. Thanks! – Shaun Wild Oct 28 "13 at 20:05

If you installed MySQL using the MSI installer, it should be setup as a service.

You can open the service in two ways

METHOD #1 : Access the Installed Service

  • Open up the Services Icon in the Control Panel
  • Scroll alphabetically to the MySQL Service
  • Right Click the Service
  • Click Start Service

METHOD #2 : Command Line Execution

  • Open DOS Window
  • From the C: Prompt, run this: net start mysql

If you get this error

C:\Windows\system32>net start mysql
System error 5 has occurred.

Access is denied.

C:\Windows\system32>

then you didn"t run the DOS Window as Administrator. Try again as Administrator. You should see:

C:\Windows\system32>net start mysql
The MySQL service is starting..
The MySQL service was started successfully.


C:\Windows\system32>

Give it a Try !!!

shareimprove this answer

In order to start manually the mysql serve you must run the mysqld executable. Open the command prompt and type:

shell> "C:\Program Files\MySQL\MySQLServer\bin\mysqld"

If mysqld doesn"t start, check the error log. The error log is located in the C:\Program Files\MySQL\MySQLServer\data. It is the file with a suffix of .err. You can also try to start the server as mysqld --console; in this case, you may get some useful information on the screen that may help solve the problem.

The last option is to start mysqld with the --standalone and --debug options. In this case, mysqld writes a log file C:\mysqld.trace that should contain the reason why mysqld doesn"t start.

 

Source

stackoverflow.com

 


کلمات کلیدی:


نوشته شده توسط Abteen 94/10/10:: 9:42 عصر     |     () نظر

 

 

dcpromo

This will show you a message to wait until the installation wizard opens. Once the installation wizard opens, hit Next. Make sure the Use advanced mode installation option is unchecked.

Welcome

The next step will display a screen explaining operating system compatibility details with a link at the bottom of the wizard which can be used to get more information about the topic. Hit Next to continue.

Step 2

When making a domain you will be given the option to add a domain in an existing forest or creating a new domain within a new forest. You can also use this wizard to add a domain controller to an existing domain (a domain tree). Here we will select Create a new domain in a new forest option and hit Next.

Step 3

A tree is made up of multiple domains and multiple trees merge under the realm of a forest.  The name of the first Domain created within a forest (the forest root Domain) also becomes the name of the forest. To move forward, enter a FQDN (Fully Qualified Domain Name), e.g. addictivetips.com. The wizard will proceed further after checking the NetBIOS name to make sure that there is no existing domain already present with the same name.

Step 4

In the next step, select the forest functional level by choosing the appropriate Windows Server version. Choosing a newer version will give you more functionality options, however, you can select older levels as well.

Step 5


The DNS Server checkbox is checked by default to install the DNS server.

Step 6

While attempting to proceed further you may be prompted to assign a static IP if it is set to obtain (IP automatically). It is not advised to use a dynamic IP from the DHCP server for a domain as the dynamic IPs change after a set period of time which will cause major disruptions as client operating system will disconnect if and when the IP changes.

Step 6 IP Conflict

To assign a static IP to the adapter, go to the Network and Sharing Center and click on Change Adapter Settings. From here select TCP/IPv4 and set a static IP e.g. 192.168.1.254. Also set a Default Gateway, which is normally the IP of a router. In the Proffered DNS section you can simply enter the Domain IP (which in this case is 192.18.1.254) or add a loopback IP (127.0.0.1) so that the domain automatically send itself the DNS queries. This will be helpful if you ever change the Domain IP, as the DNS will not have to be adjusted. You can also use an alternative DNS in the Alternative DNS Server section. To move forward click on “No, I will assign static IP addresses to all physical adapters”.

Step 8

In the next step, you will have the choice to save the Database, Log and SYSVOL files to the same or separate locations. Some administrators save them separately to balance the load or hard disk space considerations, whereas others save them at the same location. This is not much of an issue nowadays, especially in the wake of better disaster recovery mechanisms.

Step 10

Moving forward, you will be asked to save a restore mode password (which is separate from the Domain Administrator’s account). This password is configured to be used when the Domain Controller is started in Directory Services Restore Mode.

Step 11

In the final part of the wizard, you can check the summary of the configurations in the Review Your Selections box and proceed to create your Domain.

Step 12

The installation will complete after a brief period of time (depending upon your hardware capability) and you will be able to start working on your Domain after restarting the system.

Login To Domain

 

Addictivetips.com

 


کلمات کلیدی:


نوشته شده توسط Abteen 94/10/8:: 12:59 عصر     |     () نظر

 

 

dcpromo

This will show you a message to wait until the installation wizard opens. Once the installation wizard opens, hit Next. Make sure the Use advanced mode installation option is unchecked.

Welcome

The next step will display a screen explaining operating system compatibility details with a link at the bottom of the wizard which can be used to get more information about the topic. Hit Next to continue.

Step 2

When making a domain you will be given the option to add a domain in an existing forest or creating a new domain within a new forest. You can also use this wizard to add a domain controller to an existing domain (a domain tree). Here we will select Create a new domain in a new forest option and hit Next.

Step 3

A tree is made up of multiple domains and multiple trees merge under the realm of a forest.  The name of the first Domain created within a forest (the forest root Domain) also becomes the name of the forest. To move forward, enter a FQDN (Fully Qualified Domain Name), e.g. addictivetips.com. The wizard will proceed further after checking the NetBIOS name to make sure that there is no existing domain already present with the same name.

Step 4

In the next step, select the forest functional level by choosing the appropriate Windows Server version. Choosing a newer version will give you more functionality options, however, you can select older levels as well.

Step 5


The DNS Server checkbox is checked by default to install the DNS server.

Step 6

While attempting to proceed further you may be prompted to assign a static IP if it is set to obtain (IP automatically). It is not advised to use a dynamic IP from the DHCP server for a domain as the dynamic IPs change after a set period of time which will cause major disruptions as client operating system will disconnect if and when the IP changes.

Step 6 IP Conflict

To assign a static IP to the adapter, go to the Network and Sharing Center and click on Change Adapter Settings. From here select TCP/IPv4 and set a static IP e.g. 192.168.1.254. Also set a Default Gateway, which is normally the IP of a router. In the Proffered DNS section you can simply enter the Domain IP (which in this case is 192.18.1.254) or add a loopback IP (127.0.0.1) so that the domain automatically send itself the DNS queries. This will be helpful if you ever change the Domain IP, as the DNS will not have to be adjusted. You can also use an alternative DNS in the Alternative DNS Server section. To move forward click on “No, I will assign static IP addresses to all physical adapters”.

Step 8

In the next step, you will have the choice to save the Database, Log and SYSVOL files to the same or separate locations. Some administrators save them separately to balance the load or hard disk space considerations, whereas others save them at the same location. This is not much of an issue nowadays, especially in the wake of better disaster recovery mechanisms.

Step 10

Moving forward, you will be asked to save a restore mode password (which is separate from the Domain Administrator’s account). This password is configured to be used when the Domain Controller is started in Directory Services Restore Mode.

Step 11

In the final part of the wizard, you can check the summary of the configurations in the Review Your Selections box and proceed to create your Domain.

Step 12

The installation will complete after a brief period of time (depending upon your hardware capability) and you will be able to start working on your Domain after restarting the system.

Login To Domain

Source

Addictivetips.com

 


کلمات کلیدی:


نوشته شده توسط Abteen 94/10/8:: 12:57 عصر     |     () نظر
<      1   2   3   4   5   >>   >