Search Results

Search found 32 results on 2 pages for 'saad inam'.

Page 1/2 | 1 2  | Next Page >

  • setting UAC settings of a file in C#

    - by Inam Jameel
    Hi guys. i want to give a file(already present on the client computer .exe) permissions to always execute with administrative permissions. please note that the file i wants to give permissions is already on target machine. and i want to change permissions of that file through another program written in c# and it has administrative permissions to do everything. kindly let me know how to do it i am using this code System.Security.AccessControl.FileSecurity fs = File.GetAccessControl(@"c:\inam.exe"); FileSystemAccessRule fsar = new FileSystemAccessRule("Everyone", FileSystemRights.FullControl, AccessControlType.Allow); fs.AddAccessRule(fsar); File.SetAccessControl(@"c:\inam.exe", fs); this code will change the permissions correctly but still when i execute inam.exe after executing this code the UAC not appeared and also the inam.exe cant perform administrative operations. actually i have already deployed an application on more than 10,000 clients so wants to release a patch to resolve the administrative rights issue.

    Read the article

  • Screen will not load in 11.04 alpha 3

    - by Saad Inam
    After updating from 10.10, there were no problems everything updated fine. I restarted the computer and selected Ubuntu from the boot menu but nothing came. it only shows a a black screen and it allows me to type. I have a feeling that this might be to do with the graphics driver, but how would i get a driver if nothing shows? I have ati radeon 5450 which runs with Catalyst Control Center on Windows. How can fix this?

    Read the article

  • 100,000 complex structures that are accessed frequently by 100,000 users

    - by Saad
    If you are required to store 100,000 complex structures that are accessed frequently by 100,000 users, which of the following solutions would you use and why? Memcached, In-code python objects, Redis, or a relational database (MySQL). With the little knowledge that I have I think that memcached and In-code python object will not store permanent persistent data. so they don't qualify as the right answer for such a problem. And for complex data structures its best to use Redis. Please correct me if I am wrong.

    Read the article

  • How to increase screen resolution in Hyper-V

    - by Saad
    I am using Ubuntu 12.04 on Hyper-V in windows 8. I want to increase the resolution so that Ubuntu window can occupy my whole screen. Does anyone have any idea of how it can be done ? I found one solution http://nramkumar.org/tech/blog/2013/05/04/ubuntu-under-hyper-v-how-to-overcome-screen-resolution-issue/, I have installed OpenSSH server on Ubuntu and Xming and Putty on windows. I am not sure what hostname to use to connect to Ubuntu (running in Hyper-V), using [email protected] or username@localhost in the hostname field returns error "Network error:connection refused". Can someone help me figure out what i am doing wrong ?

    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

  • Disqus Comment Form Missing from Posts

    - by Saad
    I decided to transition from IntenseDebate to Disqus for the blog. So I uninstalled ID via their uninstall process (you upload the template to them, they remove code, you reupload your new template onto the site). Then I went to install Disqus into the site through their Blogger widget method. The problem is that there is no comment form present on any of the blog posts' pages. For example, when you click on the 'Comments' link it jumps to #disqus-thread but there is no thread there. So is there any fix that I can do in order to make the comment form appear? I checked Disqus' knowledgebase for Blogger installation but as far as I can tell my template should be compatible.

    Read the article

  • How to store character moves (sprite animations)?

    - by Saad
    So I'm thinking about making a small rpg, mainly to test out different design patterns I've been learning about. But the one question that I'm not too sure on how to approach is how to store an array of character moves in the best way possible. So let's say I have arrays of different sprites. This is how I'm thinking about implementing it: array attack = new array (10); array attack2 = new array(5); (loop) //blit some image attack.push(imageInstance); (end loop) Now every time I want the animation I call on attack or attack2; is there a better structure? The problem with this is let's say there are 100 different attacks, and a player can have up to 10 attacks equipped. So how do I tell which attack the user has; should I use a hash map?

    Read the article

  • Dependency issue while installing Nagios plugins

    - by M. Saâd
    I have a dependency problem while installing nagios-plugins : yum install nagios-plugins-all ... --> Processing Dependency: /usr/bin/sensors for package: nagios-plugins-sensors-1.4.15-7.el6.i686 --> Finished Dependency Resolution Error: Package: nagios-plugins-sensors-1.4.15-7.el6.i686 (epel) Requires: /usr/bin/sensors You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest OS : RHEL 6.1 Installed packages : nagios.i686 3.2.3-3.el6.rf nagios-plugins.i686 1.4.15-7.el6

    Read the article

  • I can't log in to Nagios web interface

    - by M. Saâd
    When i try to login to Nagios in my web browser and after having repeatedly enter my login and password on my Nagios page http://127.0.0.1/nagios/, i get this : Authorization Required This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required. Apache/2.2.15 (Red Hat) Server at 127.0.0.1 Port 80 I changed the password : htpasswd -c /etc/nagios/htpasswd.users nagiosadmin And restart the server : service httpd restart But without result !

    Read the article

  • Dependencies issue while installing Graphviz 2.28

    - by M. Saâd
    I want to install this packages for Nagvis : graphviz-2.28.0-1.el6.i686.rpm graphviz-doc-2.28.0-1.el6.i686.rpm graphviz-gd-2.28.0-1.el6.i686.rpm graphviz-graphs-2.28.0-1.el6.i686.rpm graphviz-perl-2.28.0-1.el6.i686.rpm But while installing, i have this error : # rpm -ivh graphviz-2.28.0-1.el6.i686.rpm erreur: Dépendances requises: libgdkglext-x11-1.0.so.0 est nécessaire pour graphviz-2.28.0-1.el6.i686 libglut.so.3 est nécessaire pour graphviz-2.28.0-1.el6.i686 libgtkglext-x11-1.0.so.0 est nécessaire pour graphviz-2.28.0-1.el6.i686 libgts-0.7.so.5 est nécessaire pour graphviz-2.28.0-1.el6.i686

    Read the article

  • mouse touchpad doesnt work after sleep

    - by Saad
    Hey, i just bought a new laptop, th eproblem is that when i put my pc on sleep then after it wakes up the mouse touch pad is all messed up and doesnt work so i have to restart my laptop. Is this some problem with laptop or some other?

    Read the article

  • How to clone or copy running windows 7 to child partition

    - by saad
    Is there anyway to clone partition to partition in windows 7 for free using some kind of command line tool so that i can set block size to increase speed i google and found some tools like dd for windows and dcfldd but when i use them it gives me error like access denied and permission denied i tried to login as administrator using: net user administrator on but its same problem dcfldd bs=4096 if=.\k: of=\.\m: while its working to create image file : dcfldd bs=4096 if=.\k: of=\.\M:\filename.ext some help needed on this will appreciate thanks

    Read the article

  • C++ program to make linux Ubuntu clone windows partition?

    - by saad
    I want to write code in Dev C++ so that when i execute in Ubuntu 8 , it clones my windows 7 from D: partition to its child partitions E:,F: ... i have made my partitions of equal sizes and i have tested by manualy using ntfsclone ,so their will be no problem in cloning. this is part of kiosk system and i hope you understand what i am upto Some reference or help will be appreciated thanks

    Read the article

  • MYOB odbc connection problem

    - by Inam Jameel
    Hi guys, i recently got a prebuild application which uses MYOB odbc connection to myob file. the odbc connection works perfectly in that application i uses the same odbc connection string in other application but it failed to open in that application. the connection string is perfectly identical but it wont works the new application. Server explorer in the visual studio 2008 connects as well with the same connection string. is it a trusted application issue? because my new application is digitally signed at the moment OdbcConnection odbc = new OdbcConnection("Driver=MYOAU0901;TYPE=MYOB; UID=Administrator; PWD=; DATABASE=C:\\Premier125\\Clearwtr.MYO; NETWORK_PROTOCOL=NONET; DRIVER_COMPLETION=DRIVER_NOPROMPT;;KEY=****"); odbc.Open(); the key used in the connection string is also valid for sure kindly help me i have to deliver a prototype in 2 days the same connection string is works in one application but not in other application whats the problem?

    Read the article

  • Normalize or Denormalize in high traffic websites

    - by Inam Jameel
    what is the best practice for database design for high traffic websites like this one stackoverflow? should one must use normalize database for record keeping or normalized technique or combination of both? is it sensible to design normalize database as main database for record keeping to reduce redundancy and at the same time maintain another denormalized form of database for fast searching? or main database should be denormalize and one can make normalized views in the application level for fast database operations? or beside above mentioned approach? what is the best practice of designing high traffic websites???

    Read the article

  • How and where to store user uploaded files in high traffic web farm scenario website?

    - by Inam Jameel
    i am working on a website which deploy on web farms to serve high traffic. where should i store user uploaded files? is it wise to store uploaded files in the file system of the same website and synchronize these files in all web servers(web farm)? or should i use another server to store all uploaded files in this server to store files in a central location? if separate file server will be a better choice, than how can i pass files from web server to that file server efficiently? or should i upload files directly to that file server?

    Read the article

  • What is a postback?

    - by Scott Saad
    I'm making my way into web development and have seen the word postback thrown around. Coming from a non-web based background, what does a new web developer have to know about postbacks? (i.e. what are they and when do they arise?) Any more information you'd like to share to help a newbie in the web world be aware of postbacks would be most greatly appreciated.

    Read the article

  • improving conversions 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

  • Is .NET a write once, run anywhere (WORA) platform like Java claims to be?

    - by Scott Saad
    I remember Sun's slogan so vividly... "Write Once, Run Anywhere". The idea being that since programs are compiled into standard byte codes, any device with a Java Virtual Machine could run it. Over the years, Java seems to have made it onto many platforms/devices. Is this the intention or was it ever the intention of .NET. If so, what kind of efforts are being put forth to make this a reality?

    Read the article

  • How to restrain one's self from the overwhelming urge to rewrite everything?

    - by Scott Saad
    Setup Have you ever had the experience of going into a piece of code to make a seemingly simple change and then realizing that you've just stepped into a wasteland that deserves some serious attention? This usually gets followed up with an official FREAK OUT moment, where the overwhelming feeling of rewriting everything in sight starts to creep up. It's important to note that this bad code does not necessarily come from others as it may indeed be something we've written or contributed to in the past. Problem It's obvious that there is some serious code rot, horrible architecture, etc. that needs to be dealt with. The real problem, as it relates to this question, is that it's not the right time to rewrite the code. There could be many reasons for this: Currently in the middle of a release cycle, therefore any changes should be minimal. It's 2:00 AM in the morning, and the brain is starting to shut down. It could have seemingly adverse affects on the schedule. The rabbit hole could go much deeper than our eyes are able to see at this time. etc... Question So how should we balance the duty of continuously improving the code, while also being a responsible developer? How do we refrain from contributing to the broken window theory, while also being aware of actions and the potential recklessness they may cause? Update Great answers! For the most part, there seems to be two schools of thought: Don't resist the urge as it's a good one to have. Don't give in to the temptation as it will burn you to the ground. It would be interesting to know if more people feel any balance exists.

    Read the article

  • C++ classes with members referencing each other

    - by Saad Imran.
    I'm trying to write 2 classes with members that reference each other. I'm not sure if I'm doing something wrong or it's just not possible. Can anyone help me out here... Source.cpp #include "Headers.h" using namespace std; void main() { Network* network = new Network(); system("pause"); return; } Headers.h #ifndef Headers_h #define Headers_h #include <iostream> #include <vector> #include "Network.h" #include "Router.h" #endif Network.h #include "Headers.h" class Network { protected: vector<Router> Routers; }; Router.h #include "Headers.h" class Router { protected: Network* network; public: }; The errors I'm getting are: error C2143: syntax error : missing ';' before '<' error C2238: unexpected token(s) preceding ';' error C4430: missing type specifier - int assumed. I'm pretty sure I'm not missing any semicolons or stuff like that. The program works find if I take out one of the members. I tried finding similar questions and the solution was to use pointers, but that's what I'm doing and it does't seem to be working!

    Read the article

  • why do I need the @ for setting variable value

    - by Saad
    I'm a little confused about scope of variables, in ruby I wrote a test program: class Test attr_reader :tester def initialize(data) @tester = data end def getData tester end end puts Test.new(11).getData now this works fine, the attr_reader, but my confusion is that since I've define attr_reader :tester then why can't I go tester = data rather then @tester = data, because when retrieving the data in getData I only have to write tester and not @tester

    Read the article

1 2  | Next Page >