Search Results

Search found 130 results on 6 pages for 'asad butt'.

Page 2/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • overriding protected internal with protected!

    - by Asad Butt
    This is an extension for this question asked an hour ago. We cannot modify the access modifiers, when overriding a virtual method in derived class. Consider Control class in System.Web.UI namespace public class Control : IComponent, IDisposable,... { protected internal virtual void CreateChildControls() { } . . } Now Consider This public class someClass : System.Web.UI.Control { // This should not compile but it does protected override void CreateChildControls() { } // This should compile but it does not protected internal override void CreateChildControls() { } } can any body explain this ? Thanks

    Read the article

  • PSAD Firewall/ UDP flood?

    - by Asad Moeen
    Well I'm actually trying to block a UDP Flood on the Application port because the string "getstatus" is causing my application to make large output due to a small input to the attacker's IP. I installed PSAD firewall to do the job. psad -S shows 3000,000 logged packets at the application port and top ports in Scan but does not block the IP of the attacker however other IP Addresses with small number of connections are dropped. I'm thinking that since output is also being made to the attacker, this is why its not getting blocked because iptables rate-limiting is also exactly doing the same thing and not blocking the IP where outgoing connection is also made. Any guesses why it won't work?

    Read the article

  • Substiting a line through PHP in SSH

    - by Asad Moeen
    I've already setup SSH usage in PHP and most of the things work. Now what I want to do is that I'm looking to edit a line in a file and replace it back. It works directly on the server but can't seem to get it working with PHP files. Here is what I'm trying. $new_line1 = 'Line $I want to add - The $I has to go into the file as it is'; $new_line2 = 'Ending $text of the line - $text again goes into file; $query = "Addition to line"; $exec1= 'cd /root; perl -pe "s/.*/' ; $exec2= '/ if $. == 37" Edit.sh > Edited.sh'; $new="$exec1$new_line1$query$new_line2$exec2"; $edit="cd /root/mp; cp Edited.sh Edit.sh"; echo $ssh->exec($new); echo $ssh->exec($edit); Now the thing is that running the perl command directly in SSH works without any errors but when I run this through PHP I get the error: Substitution replacement not terminated at -e line 1. I want to know why would it work this way and not that?

    Read the article

  • Core principles, rules, and habits for CS students

    - by Asad Butt
    No doubt there is a lot to read on blogs, in books, and on Stack Overflow, but can we identify some guidelines for CS students to use while studying? For me these are: Finish your course books early and read 4-5 times more material relative to your course work. Programming is the one of the fastest evolving professions. Follow the blogs on a daily basis for the latest updates, news, and technologies. Instead of relying on assignments and exams, do at least one extra, non-graded, small to medium-sized project for every programming course. Fight hard for internships or work placements even if they are unpaid, since 3 months of work 1 year at college. Practice everything, every possible and impossible way. Try doing every bit of your assignments project yourself; i.e. fight for every inch. Rely on documentation as the first source for help and samples, Google, and online forums as the last source. Participate often in online communities and forums to learn the best possible approach for every solution to your problem. (After doing your bit.) Make testing one of your habits as it is getting more important everyday in programming. Make writing one of your habits. Write something productive once or twice a week and publish it.

    Read the article

  • IPtables - Accept Arbitrary Packets

    - by Asad Moeen
    I've achieved a lot on blocking attacks on GameServers but I'm stuck on something. I've blocked major requests of game-server which it aceepts in the form "\xff\xff\xff\xff" which can be followed by the actual queries like get status or get info to make something like "\xff\xff\xff\xff getstatus " but I see other queries if sent to the game-server will cause it to reply with a "disconnect" packet with the same rate as input so if the input rate is high then the high output of "disconnect" might give lag to the server. Hence I want to block all queries except the ones actual clients use which I suppose are in the form "\xff\xff\xff\xff" or .... so, I tried using this rule : -A INPUT -p udp -m udp -m u32 ! --u32 0x1c=0xffffffff -j ACCEPT -A INPUT -p udp -m udp -m recent --set --name Total --rsource -A INPUT -p udp -m udp -m recent --update --seconds 1 --hitcount 20 --name Total --rsource -j DROP Now where the rule does accept the clients but it only blocks requests in the form "\xff\xff\xff\xff getstatus " ( by which GameServer replies with status ) and not just "getstatus " ( by which GameServer replies with disconnect packet ). So I suppose the accept rule is accepting the simple "string" as well. I actually want it to also block the non-(\xff) queries. So how do I modify the rule?

    Read the article

  • PHP / SSH2 Multi-threading

    - by Asad Moeen
    I'm basically done using SSH2 with PHP. Some may already that while using it, the PHP code actually waits for all the listed commands to be executed in SSH and when everything is done, it then gives back the results. Where that is fine for the work I am doing, but I need some commands to be multi-threaded. $cmd= MyCommand; echo $ssh-exec($cmd); So I just want this to run in parallel 2 times. I googled some stuff but didn't get along with it. For a basic thing, I came across to this way posted by someone but it didn't work out for me. for ($i = 0; $i < 2; $i += 1) { exec("php test_1.php $i > test.txt &"); //this will execute test_1.php and will leave this process executing in the background and will go to next iteration of the loop immediately without waiting the completion of the script in the test_1.php , $i is passed as argument . } I tried to put it this way exec("echo $ssh-exec($cmd) $i test.txt &"); in the loop but either it never entered the loop or the echo $ssh-exec failed. I don't really need a very neat multi-threading. Even a single second delay would do good, thank you.

    Read the article

  • custom events in child userControls c# .net or Child to Parent Communication in UserControls

    - by Asad Malik
    Okay here is the scenario: I have a parent "SalesUC" UserControl which contains a "itemDetailsUC" UserControl, as well as a status label. (plz see sample below) What I want: If there occurs any exception in itemDetailsUC, it should be able to communicate the exception text to parent control (i.e. SalesUC). Remember: the "ItemDetailsUC" is also used in other controls that may or may not have status label. any suggestions, answers... please. Framework: .net 3.0/3.5 Language: c# Domain: Windows Application, WinForms, etc. Sample ScreenShot regards.

    Read the article

  • Alternative to Turbo C

    - by Asad Jibran Ahmed
    My university is hosting a Programming Competition, and have decided to support Turbo C (the 16-bit DOS version) as a valid programming environment. I have just read that PC^2, the software that is going to be used to auto-judge the competition, does not support 16-bit programs. So, is there any alternative to Turbo C that I can use. I need the same header files, and the compiler would need to support all the outdated C standards that Turbo C supports. But the output needs to be 32-bit. Is there any compiler that can satisfy these conditions?

    Read the article

  • Microsoft Quotation

    - by Asad Jibran Ahmed
    I don't know if this is the right place to ask this question, but I honestly have exhausted my self searching for the last hour. I am looking for a quotation made about Microsofts software. It goes something along the lines of: "They may make 2nd grade crappy software, but by God they know how to design interfaces" It was by a somewhat popular open source personality about the lack of good interface design in open source software. Does any one know the exact quotation? It will be a great help if someone can point me in the right direction.

    Read the article

  • Lambda Expressions

    - by Asad Khan
    Can somebody explain me lambda expressions & what they can be used for. I have googled for it & have a rough idea. most of the examples give c# code. How about lambda expressions in plain old C...?

    Read the article

  • Computer Quiz Management Software

    - by Asad Jibran Ahmed
    My university is holding a quiz contest in 2 weeks, and I need some sort of software (desktop or web based) that can be used to manage the quiz. I need functionality like an admin panel for adding teams, creating matches between 2 teams, adding questions and answers. I then need the software to automatically display the questions, accept answers, and display and store results. Is there any software (open source/freeware) that I can use for this task. If a pre-built software is not available, which language+library+platform would you suggest I make the software in. It can be either web based or a desktop app. But I need it by 2 weeks. Any suggestions?

    Read the article

  • Httaccess Rewriting URL issue: how to distinguish Listing and detail page

    - by Asad kamran
    I am developing an commerce site, Where users can post items in any categories( categories can be 2 to 4 levels) I want to generate URL for listing and details pages: Listing page will show list of items in inner category Detail Page will show all information for item in inner category (Inner category means Last Category in hierarchic i.e. in classified/autos4x4s/mitsubishi/lancer/ inner mean "lancer" Here are the Links i want to generate 1) www.example.com/classified/autos4x4s/mitsubishi/lancer/ (for Listing) 2) www.example.com/classified/autos4x4s/mitsubishi/lancer/2011/3/12/lanc er-2002-in-good-condition-14/ (for detail) I want to redirect to ads.php if just 4 categories exist in url and to detail.php if 6 items are passed(4 category name + 2 date and title) I write these rules: listing ads RewriteRule ^(.)/(.)/(.)/(.)/?$ ads.php?c1=$1&c2=$2&c3=$3&c4=$4 [NC,L] Detail pages RewriteRule ^(.)/(.)/(.)/(.)/(.)/(.)/?$ detail.php?c1=$1&c2=$2&c3=$3&c4=$4&dt=$5&at=$6 [NC,L] But all the sites page redirect to ads.php (Listing page) even home page. I changes the rules as follow: (Even though i donot want to Use Listing and Detail in start of url Why as i see on some site as i want:: dubai.dubizzle.com/classified/autos4x4s/mitsubishi/lancer/2011/3/12/l ancer-2002-in-good-condition-14/) Listing pages RewriteRule ^Listing/(.)/(.)/(.)/(.)/?$ ads.php?c1=$1&c2=$2&c3=$3&c4=$4 [NC,L] Detail pages RewriteRule ^Detail/(.)/(.)/(.)/(.)/(.)/(.)/?$ detail.php?c1=$1&c2=$2&c3=$3&c4=$4&dt=$5&at=$6 [NC,L] Now all other pages are fine, but when i pass www.example.com/classified/autos4x4s/mitsubishi/lancer/2011/3/12/lanc er-2002-in-good-condition-14/ it always goes to Listing page (ads.php) not to detail page. Any help would be appreciated.

    Read the article

  • Monochrome BitMap Library

    - by Asad Jibran Ahmed
    I am trying to create a piece of software that can be used to create VERY large (10000x10000) sized bitmaps. All I need is something that can work in monochrome, since the required output is a matrix containing details of black and white pixels in the bitmap. The closest thing I can think of is a font editor, but the size is a problem. Is there any library out there that I can use to create the software, or will I have to write the whole thing from the start?

    Read the article

  • Sqlite iPhone data insertion problem

    - by Asad Khan
    Hi I have a function which basically tries to insert some data returned from a REST call. - (void)syncLocalDatabase{ NSString *file = [[NSBundle mainBundle] pathForResource:@"pickuplines" ofType:@"db"]; NSMutableString *query = [[NSMutableString alloc] initWithFormat:@""]; sqlite3 *database = NULL; char *errorMsg = NULL; if (sqlite3_open([file UTF8String], &database) == SQLITE_OK) { for(PickUpLine *pickupline in pickUpLines){ [query appendFormat:@"INSERT INTO pickuplines VALUES(%d,%d,%d,'%@','YES')", pickupline.line_id, pickupline.thumbsUps, pickupline.thumbsDowns, [pickupline.line stringByReplacingOccurrencesOfString:@"'" withString:@"`"]]; NSLog(query); int result = sqlite3_exec(database, [query UTF8String], NULL, NULL, &errorMsg); if (result!=SQLITE_OK) { printf("\n%s",errorMsg); sqlite3_free(errorMsg); } //sqlite3_step([query UTF8String]); [query setString:@""]; }//end for }//end if [query release]; sqlite3_close(database); } everything seems fine query string in log statement is also fine but the data does not gets inserted. Where as a counterpart of this function for select statement works well. Here is the counter part - (void)loadLinesFromDatabase{ NSString *file = [[NSBundle mainBundle] pathForResource:@"pickuplines" ofType:@"db"]; sqlite3 *database = NULL; if (sqlite3_open([file UTF8String], &database) == SQLITE_OK) { sqlite3_exec(database, "SELECT * FROM pickuplines", MyCallback, linesFromDatabase, NULL); } sqlite3_close(database); } I have implemented callback & it works fine. I am a little new to Sqlite can someone please point out what am I doing wrong. Thanx

    Read the article

  • How can I find the size of Flash and RAM used by a firmware?

    - by Asad
    Hi Fellas, Please help me in finding the size of Flash (ROM) and RAM used by the firmware. The firmware is implemented using C++. Also I have Keil microvision4, will it be helpful to find the ROM and RAM size? Or do I need to look at the MAP(.M51) file of the firmware to find the memory sizes? Or is just looking at the size of hex files (.hex) enough for locating the size of ROM? Please suggest!

    Read the article

  • wordpress 500 - Internal server error

    - by asad
    Hello Folks , I installed the wordpress 2.9.2 a few days ago and it works correctly. today , i want to use permlink feature of wordpress. I know , must modify my .htaccess file on my site root. but on my sub-domain root there is no any .htaccess file . so i create my .htacess file with follow content on sub-domain root (near index.php file): <files .htaccess> order allow,deny deny from all </files> ServerSignature Off <files wp-config.php> order allow,deny deny from all </files> # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Options All -Indexes AddType x-mapp-php5 .php AddHandler x-mapp-php5 .php But after save it , i missed my blog . And i get follow error : 500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed. after this i remove the .htaccess file , but this was not correct. What i can do for it? Cheers

    Read the article

  • Objective C iPhone performance issue

    - by Asad Khan
    Ok guys I am developing an iPhone app I have a Model class which follows a Singleton design pattern. Now I have an NSArray in it which is initialized to around some 1000 NSStrings in the init method. Now I need to use this data in some view controller. so I import Model.h, I create an array of NSString objects in view controller & set the data to it. But now the problem is that now I have 2000 NSStrings currently allocated, which I believe is not a good thing on iPhone due to memory considerations. releasing model object wont help because I've overrided release method to release nothing according to the pattern & I cannot change the design now because now a lot of code works on the assumption of model being a singleton. & in future maybe the initial NSStrings may grow to 2000 or even more & then I'll have 4000 NSStrings allocated at one time .... I am a little confused on how to go about it any suggestions

    Read the article

  • How are classes more secure than structures ?

    - by Asad Hanif
    Structure's member are public by default ans class's members are private by default. We can access private data members through a proper channel (using member function). If we have access to member functions we can read/write data in private data member, so how it is secure...we are accessing it and we are changing data too.....

    Read the article

  • Printing prn file in window service.

    - by Asad
    I am unable to print prn file on network printer from .Net window Service. I use File.Copy method but it does not work. I use cmd.exe through Process.Start method but it does not work. But If I copy the same code in windows form application then it works fine. Can anybody help me.

    Read the article

  • How classes are secure than structures ?

    - by Asad Hanif
    Structure's member are public by default ans class's members are private by default. We can access private data members through a proper channel (using member function). If we have access to member functions we can read/write data in private data member, so how it is secure...we are accessing it and we are changing data too.....

    Read the article

  • Windows update deleting Sticky Notes (StikyNot.exe)?

    - by Chris Hulan
    Got a win7 computer for xmas and like the Sticky Notes But twice now, after running an automatic update, the sticky notes disappeared Managed to navigate system restore and recover it, but what a pain in the butt. The update seems to be deleting the exe, but I haven't been able to find any info on why. Anyone else experience this? Any ideas how to prevent it happening again? Cheers

    Read the article

  • Is this XSLT correct for the XML file which I have developed?

    - by atrueguy
    This is my XML file. I need to develop a xslt for this. <?xml version="1.0" encoding="ISO-8859-1"?> <!--<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">--> <!-- Generator: Arbortext IsoDraw 7.0 --> <svg width="100%" height="100%" viewBox="0 0 214.819 278.002"> <g id="Standard_x0020_layer"/> <g id="Catalog"> <line stroke-width="0.353" stroke-linecap="butt" x1="5.839" y1="262.185" x2="209.039" y2="262.185"/> <text transform="matrix(0.984 0 0 0.93 183.515 265.271)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174">© 2009 k Co.</text> <text transform="matrix(0.994 0 0 0.93 7.235 265.3)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174">087156-8-</text> <text transform="matrix(0.995 0 0 0.93 21.708 265.357)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174" font-weight="bold">AB</text> <path stroke-width="0.088" stroke-linecap="butt" stroke-dasharray="2.822 1.058" d="M162.037 107.578L174.439 100.417L180.698 104.03"/> <g id="AUTOID_20445" class="52971"> <line stroke-width="0.088" stroke-linecap="butt" x1="68.859" y1="43.621" x2="65.643" y2="45.399"/> <text transform="matrix(0.944 0 0 0.93 69.165 43.356)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="2.775" font-weight="bold">52971</text> </g> </g> </svg> I have developed a XSLT for this in this way, but I am failing to produce the desired output can any one help me in this. <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:svg="http://www.w3.org/2000/svg"> <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="simple" page-height="11in" page-width="8.5in"> <fo:region-body margin="0.7in" margin-top="1.15in" margin-left=".8in"/> <fo:region-before extent="1.5in"/> <fo:region-after extent="1.5in"/> <fo:region-start extent="1.5in"/> <fo:region-end extent="1.5in"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="simple"> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:instream-foreign-object> <svg:svg xmlns:svg="http://www.w3.org/2000/svg" height="100%" width="100%" viewBox="0 0 214.819 278.002"> <xsl:for-each select="svg/g"> <svg:g style="stroke:none;fill:#000000;"> <svg:path> <xsl:variable name="s"> <xsl:value-of select="translate(@d,' ','')"/> </xsl:variable> <xsl:attribute name="d"><xsl:value-of select="translate($s,',',' ')"/></xsl:attribute> </svg:path> </svg:g> </xsl:for-each> <xsl:for-each select="svg/g"> <svg:line x1 = "{$x1}" y1 = "{$y1}" x2 = "{$x2}" y2 = "{$y2}" style = "stroke-width: 0.088; stroke: black;"/> <line xmlns="http://www.w3.org/2000/svg" x1="{$x1}" y1="{$y1}" x2="{$x2}" y2="{$y2}" stroke-width="0.088" stroke="black" fill="#000000" /> </xsl:for-each> </svg:svg> </fo:instream-foreign-object> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> Please help me in this

    Read the article

  • Installation after boot shows no display

    - by matthias
    I just booted 12.04 for installation from USB-stick. But there is a problem with the display. After boot I see a rectangle on the lower left corner of the screen, after a while I see "Ubuntu 12.04 ..." loading from USB-Stick, the Ubuntu-Desktop starts fine, clicking on Ubuntu-Install seems to work ... till identification, then Installation-window closed and ... nothing more happens. So I want to try Installation direct from the Menu at the beginning - before Ubuntu-12.04-loading. Butt I cannot see any menus at that time. I think there is an graphic-problem? How can I get the installation by menus, how would the Installation via Desktop going to work? Bye Matthias

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >