Search Results

Search found 323 results on 13 pages for 'muhammad imran'.

Page 1/13 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Better Understand the 'Strategy' Design Pattern

    - by Imran Omar Bukhsh
    Greetings Hope you all are doing great. I have been interested in design patterns for a while and started reading 'Head First Design Patterns'. I started with the first pattern called the 'Strategy' pattern. I went through the problem outlined in the images below and first tried to propose a solution myself so I could really grasp the importance of the pattern. So my question is that why is my solution ( below ) to the problem outlined in the images below not good enough. What are the good / bad points of my solution vs the pattern? What makes the pattern clearly the only viable solution ? Thanks for you input, hope it will help me better understand the pattern. MY SOLUTION Parent Class: DUCK <?php class Duck { public $swimmable; public $quackable; public $flyable; function display() { echo "A Duck Looks Like This<BR/>"; } function quack() { if($this->quackable==1) { echo("Quack<BR/>"); } } function swim() { if($this->swimmable==1) { echo("Swim<BR/>"); } } function fly() { if($this->flyable==1) { echo("Fly<BR/>"); } } } ?> INHERITING CLASS: MallardDuck <?php class MallardDuck extends Duck { function MallardDuck() { $this->quackable = 1; $this->swimmable = 1; } function display() { echo "A Mallard Duck Looks Like This<BR/>"; } } ?> INHERITING CLASS: WoddenDecoyDuck <?php class WoddenDecoyDuck extends Duck { function woddendecoyduck() { $this->quackable = 0; $this->swimmable = 0; } function display() { echo "A Wooden Decoy Duck Looks Like This<BR/>"; } } Thanking you for your input. Imran

    Read the article

  • SQL SERVER – Shrinking NDF and MDF Files – Readers’ Opinion

    - by pinaldave
    Previously, I had written a blog post about SQL SERVER – Shrinking NDF and MDF Files – A Safe Operation. After that, I have written the following blog post that talks about the advantage and disadvantage of Shrinking and why one should not be Shrinking a file SQL SERVER – SHRINKFILE and TRUNCATE Log File in SQL Server 2008. On this subject, SQL Server Expert Imran Mohammed left an excellent comment. I just feel that his comment is worth a big article itself. For everybody to read his wonderful explanation, I am posting this blog post here. Thanks Imran! Shrinking Database always creates performance degradation and increases fragmentation in the database. I suggest that you keep that in mind before you start reading the following comment. If you are going to say Shrinking Database is bad and evil, here I am saying it first and loud. Now, the comment of Imran is written while keeping in mind only the process showing how the Shrinking Database Operation works. Imran has already explained his understanding and requests further explanation. I have removed the Best Practices section from Imran’s comments, as there are a few corrections. Comments from Imran - Before I explain to you the concept of Shrink Database, let us understand the concept of Database Files. When we create a new database inside the SQL Server, it is typical that SQl Server creates two physical files in the Operating System: one with .MDF Extension, and another with .LDF Extension. .MDF is called as Primary Data File. .LDF is called as Transactional Log file. If you add one or more data files to a database, the physical file that will be created in the Operating System will have an extension of .NDF, which is called as Secondary Data File; whereas, when you add one or more log files to a database, the physical file that will be created in the Operating System will have the same extension as .LDF. The questions now are, “Why does a new data file have a different extension (.NDF)?”, “Why is it called as a secondary data file?” and, “Why is .MDF file called as a primary data file?” Answers: Note: The following explanation is based on my limited knowledge of SQL Server, so experts please do comment. A data file with a .MDF extension is called a Primary Data File, and the reason behind it is that it contains Database Catalogs. Catalogs mean Meta Data. Meta Data is “Data about Data”. An example for Meta Data includes system objects that store information about other objects, except the data stored by the users. sysobjects stores information about all objects in that database. sysindexes stores information about all indexes and rows of every table in that database. syscolumns stores information about all columns that each table has in that database. sysusers stores how many users that database has. Although Meta Data stores information about other objects, it is not the transactional data that a user enters; rather, it’s a system data about the data. Because Primary Data File (.MDF) contains important information about the database, it is treated as a special file. It is given the name Primary Data file because it contains the Database Catalogs. This file is present in the Primary File Group. You can always create additional objects (Tables, indexes etc.) in the Primary data file (This file is present in the Primary File group), by mentioning that you want to create this object under the Primary File Group. Any additional data file that you add to the database will have only transactional data but no Meta Data, so that’s why it is called as the Secondary Data File. It is given the extension name .NDF so that the user can easily identify whether a specific data file is a Primary Data File or a Secondary Data File(s). There are many advantages of storing data in different files that are under different file groups. You can put your read only in the tables in one file (file group) and read-write tables in another file (file group) and take a backup of only the file group that has read the write data, so that you can avoid taking the backup of a read-only data that cannot be altered. Creating additional files in different physical hard disks also improves I/O performance. A real-time scenario where we use Files could be this one: Let’s say you have created a database called MYDB in the D-Drive which has a 50 GB space. You also have 1 Database File (.MDF) and 1 Log File on D-Drive and suppose that all of that 50 GB space has been used up and you do not have any free space left but you still want to add an additional space to the database. One easy option would be to add one more physical hard disk to the server, add new data file to MYDB database and create this new data file in a new hard disk then move some of the objects from one file to another, and put the file group under which you added new file as default File group, so that any new object that is created gets into the new files, unless specified. Now that we got a basic idea of what data files are, what type of data they store and why they are named the way they are, let’s move on to the next topic, Shrinking. First of all, I disagree with the Microsoft terminology for naming this feature as “Shrinking”. Shrinking, in regular terms, means to reduce the size of a file by means of compressing it. BUT in SQL Server, Shrinking DOES NOT mean compressing. Shrinking in SQL Server means to remove an empty space from database files and release the empty space either to the Operating System or to SQL Server. Let’s examine this through an example. Let’s say you have a database “MYDB” with a size of 50 GB that has a free space of about 20 GB, which means 30GB in the database is filled with data and the 20 GB of space is free in the database because it is not currently utilized by the SQL Server (Database); it is reserved and not yet in use. If you choose to shrink the database and to release an empty space to Operating System, and MIND YOU, you can only shrink the database size to 30 GB (in our example). You cannot shrink the database to a size less than what is filled with data. So, if you have a database that is full and has no empty space in the data file and log file (you don’t have an extra disk space to set Auto growth option ON), YOU CANNOT issue the SHRINK Database/File command, because of two reasons: There is no empty space to be released because the Shrink command does not compress the database; it only removes the empty space from the database files and there is no empty space. Remember, the Shrink command is a logged operation. When we perform the Shrink operation, this information is logged in the log file. If there is no empty space in the log file, SQL Server cannot write to the log file and you cannot shrink a database. Now answering your questions: (1) Q: What are the USEDPAGES & ESTIMATEDPAGES that appear on the Results Pane after using the DBCC SHRINKDATABASE (NorthWind, 10) ? A: According to Books Online (For SQL Server 2000): UsedPages: the number of 8-KB pages currently used by the file. EstimatedPages: the number of 8-KB pages that SQL Server estimates the file could be shrunk down to. Important Note: Before asking any question, make sure you go through Books Online or search on the Google once. The reasons for doing so have many advantages: 1. If someone else already has had this question before, chances that it is already answered are more than 50 %. 2. This reduces your waiting time for the answer. (2) Q: What is the difference between Shrinking the Database using DBCC command like the one above & shrinking it from the Enterprise Manager Console by Right-Clicking the database, going to TASKS & then selecting SHRINK Option, on a SQL Server 2000 environment? A: As far as my knowledge goes, there is no difference, both will work the same way, one advantage of using this command from query analyzer is, your console won’t be freezed. You can do perform your regular activities using Enterprise Manager. (3) Q: What is this .NDF file that is discussed above? I have never heard of it. What is it used for? Is it used by end-users, DBAs or the SERVER/SYSTEM itself? A: .NDF File is a secondary data file. You never heard of it because when database is created, SQL Server creates database by default with only 1 data file (.MDF) and 1 log file (.LDF) or however your model database has been setup, because a model database is a template used every time you create a new database using the CREATE DATABASE Command. Unless you have added an extra data file, you will not see it. This file is used by the SQL Server to store data which are saved by the users. Hope this information helps. I would like to as the experts to please comment if what I understand is not what the Microsoft guys meant. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Readers Contribution, Readers Question, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Do i need to apply htmlspecialchars / htmlentites on json array?

    - by Imran Omar Bukhsh
    I wanted to ask that in a php script of mine which I am accessing through an ajax request, I am returning json data ( converted from an array ) as such echo json_encode($row_array); I get this data in jquery and display it in a form. Do i need to apply htmlspecialchars / htmlentites before returning the data? Is do then whats the correct way to do it? The following code gives me an error: echo htmlentities(json_encode($row_array)); Thanking you Imran

    Read the article

  • Entity Framework 4 Table Valued Function

    - by Imran
    Hi, I am aware that table valued functions are not supported in previous versions of entity framework. I was wondering if this is now supported in EF 4? I cant see my functions in the edm designer so i'm guessing they are not supported unless I am doing something wrong? If they are not supported is there a workaround? Thanks, Imran

    Read the article

  • Facing problem in accessing webservice

    - by Muhammad Waqas
    System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Web.Services2.WebServicesExtension.AfterSerializeServer(SoapServerMessage message) Above exception is thrown whenever i try to access any method of webservice on another machine. Regards, Muhammad Waqas

    Read the article

  • GWT plugin for Eclipse not downloading

    - by Imran
    I`m following the instructions on the page : http://code.google.com/eclipse/docs/install-eclipse-3.5.html during downloading I get the following error in eclipse 3.5 galelio, is the jar file corupt on the server corrupt or what? Is it possible to manualy import GWT plugin in eclipse? java.io.IOException: Error unzipping C:\DOCUME~1\Imran\LOCALS~1\Temp\com.google.gwt.eclipse.sdkbundle.2.0.0_2.0.0.v2009120620038443413526480826930.jar: invalid entry size (expected 18889986 but got 18889962 bytes) at org.eclipse.equinox.internal.p2.core.helpers.FileUtils.unzipFile(FileUtils.java:75) at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository$ZippedFolderOutputStream.close(SimpleArtifactRepository.java:155) at java.io.FilterOutputStream.close(Unknown Source) at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository$ArtifactOutputStream.close(SimpleArtifactRepository.java:83) at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transferSingle(MirrorRequest.java:184) at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transfer(MirrorRequest.java:159) at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.perform(MirrorRequest.java:95) at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:511) at org.eclipse.equinox.internal.p2.artifact.repository.simple.DownloadJob.run(DownloadJob.java:64) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    Read the article

  • Rails: Open HTTP URL From HTTPS site

    - by Imran
    I have a rails application running on SSL. I also have setup Piwik (for analytics) and it is running non-secure i.e. HTTP. When I try to make a call to Piwik API from my ruby code (the application running on SSL) it gives me the following error: SocketError (getaddrinfo: Name or service not known): /usr/lib/ruby/1.8/net/http.rb:560:in initialize' /usr/lib/ruby/1.8/net/http.rb:560:inopen' /usr/lib/ruby/1.8/net/http.rb:560:in connect' /usr/lib/ruby/1.8/timeout.rb:53:intimeout' /usr/lib/ruby/1.8/timeout.rb:93:in timeout' /usr/lib/ruby/1.8/net/http.rb:560:inconnect' /usr/lib/ruby/1.8/net/http.rb:553:in do_start' /usr/lib/ruby/1.8/net/http.rb:542:instart' /usr/lib/ruby/1.8/net/http.rb:379:in get_response' app/controllers/piwik_charts_controller.rb:195:inmake_graph' It works perfect when I make call from an application running on HTTP. Please advise. Thanks, Imran

    Read the article

  • asp.net mvc controller actions testing

    - by Imran
    I was just wondering how others are going about testing controller actions in asp.net mvc? Most of my dependencies are injected in to my controllers so there is a not a huge amount of logic in the action methods but there may be some conditional logic for example which I think is unavoidable. In the past I have written tests for these action methods, mocked the dependencies and tested the results. I have found this is very brittle and a real PITA to maintain. Having 'Expect' and 'Stub' methods everywhere breaks very easily but I don't see any other way of testing controller actions. I actually think it might be easier to test some of these manually! Anyone have any suggestions? Perhaps I am missing something here? Thanks Imran

    Read the article

  • Why does Ubuntu (and other ubuntu based distros like lubuntu and linux mint) randomly shutdown on my laptop?

    - by Imran
    I have a lenovo g555 laptop and whenever I try and boot a ubuntu based distro off a usb, it randomly shuts off my PC (Not like a normal shutdown with shutdown loading screen but a like a sudden hard power off). This problem occurs even if I have installed the distro on my harddrive. In the past I've been able to use the distro for 10 min or so before it would it would do this. Now with the latest distros, It randomly pwers off even before it has fully booted up. My hardware specs are on this website.

    Read the article

  • What is the most efficient way to convert to binary and back in C#?

    - by Saad Imran.
    I'm trying to write a general purpose socket server for a game I'm working on. I know I could very well use already built servers like SmartFox and Photon, but I wan't to go through the pain of creating one myself for learning purposes. I've come up with a BSON inspired protocol to convert the the basic data types, their arrays, and a special GSObject to binary and arrange them in a way so that it can be put back together into object form on the client end. At the core, the conversion methods utilize the .Net BitConverter class to convert the basic data types to binary. Anyways, the problem is performance, if I loop 50,000 times and convert my GSObject to binary each time it takes about 5500ms (the resulting byte[] is just 192 bytes per conversion). I think think this would be way too slow for an MMO that sends 5-10 position updates per second with a 1000 concurrent users. Yes, I know it's unlikely that a game will have a 1000 users on at the same time, but like I said earlier this is supposed to be a learning process for me, I want to go out of my way and build something that scales well and can handle at least a few thousand users. So yea, if anyone's aware of other conversion techniques or sees where I'm loosing performance I would appreciate the help. GSBitConverter.cs This is the main conversion class, it adds extension methods to main datatypes to convert to the binary format. It uses the BitConverter class to convert the base types. I've shown only the code to convert integer and integer arrays, but the rest of the method are pretty much replicas of those two, they just overload the type. public static class GSBitConverter { public static byte[] ToGSBinary(this short value) { return BitConverter.GetBytes(value); } public static byte[] ToGSBinary(this IEnumerable<short> value) { List<byte> bytes = new List<byte>(); short length = (short)value.Count(); bytes.AddRange(length.ToGSBinary()); for (int i = 0; i < length; i++) bytes.AddRange(value.ElementAt(i).ToGSBinary()); return bytes.ToArray(); } public static byte[] ToGSBinary(this bool value); public static byte[] ToGSBinary(this IEnumerable<bool> value); public static byte[] ToGSBinary(this IEnumerable<byte> value); public static byte[] ToGSBinary(this int value); public static byte[] ToGSBinary(this IEnumerable<int> value); public static byte[] ToGSBinary(this long value); public static byte[] ToGSBinary(this IEnumerable<long> value); public static byte[] ToGSBinary(this float value); public static byte[] ToGSBinary(this IEnumerable<float> value); public static byte[] ToGSBinary(this double value); public static byte[] ToGSBinary(this IEnumerable<double> value); public static byte[] ToGSBinary(this string value); public static byte[] ToGSBinary(this IEnumerable<string> value); public static string GetHexDump(this IEnumerable<byte> value); } Program.cs Here's the the object that I'm converting to binary in a loop. class Program { static void Main(string[] args) { GSObject obj = new GSObject(); obj.AttachShort("smallInt", 15); obj.AttachInt("medInt", 120700); obj.AttachLong("bigInt", 10900800700); obj.AttachDouble("doubleVal", Math.PI); obj.AttachStringArray("muppetNames", new string[] { "Kermit", "Fozzy", "Piggy", "Animal", "Gonzo" }); GSObject apple = new GSObject(); apple.AttachString("name", "Apple"); apple.AttachString("color", "red"); apple.AttachBool("inStock", true); apple.AttachFloat("price", (float)1.5); GSObject lemon = new GSObject(); apple.AttachString("name", "Lemon"); apple.AttachString("color", "yellow"); apple.AttachBool("inStock", false); apple.AttachFloat("price", (float)0.8); GSObject apricoat = new GSObject(); apple.AttachString("name", "Apricoat"); apple.AttachString("color", "orange"); apple.AttachBool("inStock", true); apple.AttachFloat("price", (float)1.9); GSObject kiwi = new GSObject(); apple.AttachString("name", "Kiwi"); apple.AttachString("color", "green"); apple.AttachBool("inStock", true); apple.AttachFloat("price", (float)2.3); GSArray fruits = new GSArray(); fruits.AddGSObject(apple); fruits.AddGSObject(lemon); fruits.AddGSObject(apricoat); fruits.AddGSObject(kiwi); obj.AttachGSArray("fruits", fruits); Stopwatch w1 = Stopwatch.StartNew(); for (int i = 0; i < 50000; i++) { byte[] b = obj.ToGSBinary(); } w1.Stop(); Console.WriteLine(BitConverter.IsLittleEndian ? "Little Endian" : "Big Endian"); Console.WriteLine(w1.ElapsedMilliseconds + "ms"); } Here's the code for some of my other classes that are used in the code above. Most of it is repetitive. GSObject GSArray GSWrappedObject

    Read the article

  • Windows 7 not booting after installing Ubuntu 12.10

    - by Imran Choudhry
    I have Samsung sf511 with Windows 7 Home preinstalled. I installed Ubuntu 12.10 last night. First I mounted downloaded ubuntu 12.10 iso on a DVD from Windows 7, then I restarted, changed the boot option to DVD and let the Ubuntu DVD run. I selected "Install ubuntu alongside windows 7". In the next step I allocated the diskspace . Ubuntu installed perfectly and it ranned OK. I spent a good time exploring Ubuntu. When I restarted to start my work on Windows again and selected Windows 7 to boot, it showed blue screen after booting up (after logging in). I tried restarting several times but the same blue screen keep showing at the same point of bootup. I also restored windows to an earlier time. Left with no option I booted from Samsung provided windows recovery option. The recovery process ran fine but when it restarted to boot Windows for the first time all I see is a black screen. Nothing happens. It switches between dark command promt screen to a pitch black screen as if it's rebooting after every 10 seconds or so. The laptop can be booted from the DVD Drive or USB drive but is not booting from Harddisk. What should I do in order to use both Windows 7 and Ubuntu?

    Read the article

  • Tracking pages with variables in GA

    - by Imran
    Recently I have updated my site, it now passes a variable on some links like so... www.mysite.com/1234/?play=true I've noticed in Google Analytics it records www.mysite.com/1234/ and www.mysite.com/1234/?play=true as two different URL's. Is there a way to merge them because they are after all just one page, It makes "Top Content" for example hard to read because of dupilicates. I've read about something called canonical link tag which may help this? My blog has this already inserted into the head but it doesnt make a difference. Any suggestions?

    Read the article

  • What do you think about starting a reading group?

    - by Imran Omar Bukhsh
    Greetings everyone I know we as software engineers / developers always need to keep learning. I really wanted to start a reading group where people can be reading books and discussing about whatever they read like at the end of every chapter when everyone has finished by a particular time. We could also have like a min. limit of n pages per day for every person that participates in the group. What do you think? Do advise.

    Read the article

  • SQLAuthority News – Follow up on – Replace a Column Name in Multiple Stored Procedure all together

    - by pinaldave
    Last month I had a fantastic time with lots of puzzles and brain teasers, the amount of participation which I have received on the blog is indeed inspiring to write more. One of the blog post was about how to replace a column name in all the stored procedures. The article had very interesting conversation as a follow up. Please read the original article Replace a Column Name in Multiple Stored Procedure all together before reading this blog further as they are connected. Let us start few of the interesting comments. SQL Server Expert Imran Mohammed had a wonderful first and excellent note. I suggest all of you to read it. Imran stresses on the Data Modelling and Logical as well as Physical Design. Developers must create a logical design and get approval on naming convention, data types, references, constraints, indexes etc. He further suggested that one should not cut steps but must follow all the industry standards and guidelines. Here extended my blog post with following note – “Extending Pinal’s answer, what you can do is go to database properties, all tasks, scripts objects, in scripting wizard select all the stored procedure for which you want to change column name, export the query to a new window and then do find and replace, all in once window and execute the script. But make sure you check what you are replacing, sometimes column names are also used in table names, for ex:Table Name: Product and Column Name: ProductId, ProductName”. Thanks Imran Great Points!  Gatej Alexandru suggested that it is not good idea to DROP or CREATE but rather use ALTER as quite possible there may be permissions issue as well. Very good point let me see if I can write blog post over it. Vinay Kumar and SQLStudent144 have proposed another method to achieve the same. I am combining their solution and writing them here. Step 1. Press Ctrl+T or change “Result to Text” mode. Step 2. Execute below commands.SELECT 'EXEC sp_helptext [' + referencing_schema_name + '.' + referencing_entity_name + ']' FROM sys.dm_sql_referencing_entities('schema.objectname','OBJECT') Where schema.objectname is the object or table you are searching for. Step 3. Now copy the result and paste in new window. Again Press Ctrl+T or change “Result to Text” mode. Step 4. Copy the result and paste in new window. Execute the query. Step 5. Copy the result and paste in new window. Step 6. Now find your searching text in the script, make necessary changes and execute this script. Do not forget to remove the code which is generated in resultset which are not relevant to the T-SQL Script. Digitqr suggest we can do this for other objects besides Stored Procedure as well. Iosif suggests to use tool SQL Search from RedGate. I guess this sums it well. We have an alternative perspective to our original issue of replacing the column name in multiple stored procedure. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • 'cannot find -lboost_iostreams' while trying to install Deluge 1.3.3

    - by Muhammad
    While trying to install deluge 1.3.3 (I need this specific version) I get an error. I install all the needed packages through sudo apt-get install g++ make python-all-dev python-all python-dbus \ python-gtk2 python-notify librsvg2-common python-xdg python-support \ subversion libboost-dev libboost-python-dev \ libboost-thread-dev libboost-date-time-dev libboost-filesystem-dev \ libssl-dev zlib1g-dev python-setuptools \ python-mako python-twisted-web python-chardet python-simplejson I then build it $ python setup.py build and $ sudo python setup.py install then I get a long list at the end of which there is the error /usr/bin/ld: cannot find -lboost_iostreams collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Can you help me out with this?

    Read the article

  • Vidalia detected that the Tor software exited unexpectedly?

    - by Rana Muhammad Waqas
    I have installed the vidalia by following these instructions everything went as they mentioned. When I started vidalia it gave me the error: Vidalia was unable to start Tor. Check your settings to ensure the correct name and location of your Tor executable is specified. I found that bug here and followed their instructions to fix it and now after that it says: Vidalia detected that the Tor software exited unexpectedly. Please check the message log for recent warning or error messages. Logs of Vidalia Oct 18 02:15:06.937 [Notice] Tor v0.2.3.25 (git-3fed5eb096d2d187) running on Linux. Oct 18 02:15:06.937 [Notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning Oct 18 02:15:06.937 [Notice] Read configuration file "/home/waqas/.vidalia/torrc". Oct 18 02:15:06.937 [Notice] We were compiled with headers from version 2.0.19-stable of Libevent, but we're using a Libevent library that says it's version 2.0.21-stable. Oct 18 02:15:06.938 [Notice] Initialized libevent version 2.0.21-stable using method epoll (with changelist). Good. Oct 18 02:15:06.938 [Notice] Opening Socks listener on 127.0.0.1:9050 Oct 18 02:15:06.938 [Warning] Could not bind to 127.0.0.1:9050: Address already in use. Is Tor already running? Oct 18 02:15:06.938 [Warning] /var/run/tor is not owned by this user (waqas, 1000) but by debian-tor (118). Perhaps you are running Tor as the wrong user? Oct 18 02:15:06.938 [Warning] Before Tor can create a control socket in "/var/run/tor/control", the directory "/var/run/tor" needs to exist, and to be accessible only by the user account that is running Tor. (On some Unix systems, anybody who can list a socket can connect to it, so Tor is being careful.) Oct 18 02:15:06.938 [Warning] Failed to parse/validate config: Failed to bind one of the listener ports. Oct 18 02:15:06.938 [Error] Reading config failed--see warnings above. Please Help !

    Read the article

  • Dynamic Permissions for roles in Asp.NET mvc

    - by Muhammad Adeel Zahid
    Hello, we have been developing a web application in asp.net mvc. we have scenarios where many actions on web page are dependent upon role of a specific user. For example a memo page has actions of edit, forward, approve, flag etc. these actions are granted to different roles and may be revoked at some later stage. what is the best approach to implement such scenarios in Asp.net mvc framework. i have heard about windows workflow foundation but really have no idea how it works. i m open to any suggestions. regards

    Read the article

  • Install Everpad on Ubuntu 13.10

    - by Muhammad Ahmad Zafar
    I just installed a fresh copy of Ubuntu 13.10 and wanted to install Everpad but there is some issue as the PPA for it is missing it. These were the commands which I execute (took help from http://www.webupd8.org/2012/09/everpad-integrates-evernote-with-ubuntu.html and everywhere its the same): sudo add-apt-repository ppa:nvbn-rm/ppa sudo apt-get update sudo apt-get install everpad The following which what I get when the last command is executed: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package everpad Please help

    Read the article

  • How to make Eclipse CDT's Linux GCC toolchain resolve C++ standard library headers?

    - by Muhammad Khan
    In Ubuntu 12.04 LTS I installed the Eclipse CDT plugin and opened the new hello world project to just test everything out. When I was creating the project, I chose the only toolchain: "Linux GCC" When the project is created, however, it says that #include<iostream> #include<cstdlb> are unresolved. Thus, lines with cout and endl can't be used and it cannot find std. using namespace std; is also causing problems. How can I get my #include directives for standard library headers recognized, to support code using the std namespace?

    Read the article

  • Switching from Java/Java EE career path to C POS path?

    - by Muhammad
    I am a Java/Java EE Developer with about 3 years in this field. I like low-level programming so much... I favor back-end code over front-end. I've a knowledge in C and know little about C++. I got an offer to work with C in Point-of-Sale Payment terminals. I don't know much about how POS works (IDE/toolsets, etc). although I have a payment experience (ISO8583, etc...) I need you own opinion from Switching from the Java's High-level world to POS low-level world Although I love low-level world, but I am afraid from not being found what I seek.. I know programmers are not measured by the tools they use (including prog. langs.) but with their minds. I need your opinions of: Is programming POS terminals in C is an interesting thing, or I'll find myself doing usual code-writing job? (especially I am about to switch my whole career path). I find myself writing an elegant code in Java (like: Sobat http://code.google.com/p/sobat/) a code where I find myself in... So do I'll find the same thing in POS C? or It will all about Libraries that I'll call to finish my work?! Lastly, does this thing worse adventure with my current career (stability, conference, etc.. )? (as I currently don't think to move to a new job) Thanks.

    Read the article

  • Still no keyboard after uninstalling Ubuntu

    - by Muhammad Rushdi Ibrahim
    I installed Ubuntu 11.04 for the first time yesterday. After rebooting for the first time, I couldn't log in because I couldn't type anything using the keyboard. After rebooting, the keyboard failed completely; I can only automatically boot into Windows since I can't choose Ubuntu. Then the problem got worse. I had to use On-Screen keyboard to log in into Windows. Still no keyboard. When I rebooted, my laptop couldn't reboot at all! I had to hard reboot. I decided to uninstall the Ubuntu, using the Add/Remove program in the Control Panel. I uninstalled it successfully. My laptop automatically boots into Windows without Ubuntu option. However, I still don't have the keyboard! Please help me. Acer Aspire 4935 Windows 7 Ultimate Thanks.

    Read the article

  • How To Run A Shell Script Again And Again Having X Interval Of Time?

    - by Muhammad Hassan
    I have a shell script in my Ubuntu Server 14.04 LTS at ./ShellScript.sh. I setup /etc/rc.local to run the shell script after boot but before login using below code. Run this: sudo nano /etc/rc.local then add following and save. #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. #!/bin/bash ./ShellScript.sh exit 0 Now I want to run/execute this shell script again and again having 15min of time interval between every run after boot but before login. So Can I do it? Update 1:) When I run crontab -e then I got the following. Now What to do? no crontab for root - using an empty one Select an editor. To change later, run 'select-editor'. 1. /bin/ed 2. /bin/nano <---- easiest 3. /usr/bin/vim.basic 4. /usr/bin/vim.tiny Choose 1-4 [2]: After selecting 2, I got crontab: "/usr/bin/sensible-editor" exited with status 2 UPDATE 2:) Update ShellScript.sh like below... #!/bin/bash # Testing ShellScript... while true do echo "ShellScript Start Running..." ********************************** All My Shell Script Codes/Script/Commands ********************************** echo "ShellScript End Running..." exit 0 sleep 900 done Then Run this: sudo nano /etc/rc.local then add following and save. #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. sh ./ShellScript.sh & exit 0

    Read the article

  • I'm building a theme for tumblr and the {HasPages} doesn't seem to work properly.

    - by Muhammad
    I've put the HTML draft of the theme so far, with minor CSS edits. Currently I have all the block posts and everything else that's essential to a tumblr theme but I can't seem to get the {HasPages} block to work properly. I've tested it on a different tumblr, also. There are pages created and I already have provided some basic CSS for it just in case. But there isn't anything showing up. Has anyone has this problem and if so, is there a solution I'm missing? The code to display the pages is included. {block:HasPages} <ul> <li><a href="/">Home</a></li> {block:Pages}<li><a href="{URL}">{Label}</a></li>{/block:Pages} </ul> {/block:HasPages} Also, is this a valid web masters' question. I'm not sure.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >