Search Results

Search found 539 results on 22 pages for 'ali ahmad'.

Page 7/22 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • php connecting to mysql server(localhost) very slow

    - by Ahmad
    actually its little complicated: summary: the connection to DB is very slow. the page rendering takes around 10 seconds but the last statement on the page is an echo and i can see its output while the page is loading in firefox (IE is same). in google chrome the output becomes visible only when the loading finishes. loading time is approximately the same across browsers. on debugging i found out that its the DB connectivity that is creating problem. the DB was on another machine. to debug further. i deployed the DB on my local machine .. so now the DB connection is at 127.0.0.1 but the connectivity still takes long time. this means that the issue is with APACHE/PHP and not with mysql. but then i deployed my code on another machine which connects to DB remotely.and everything seems fine. basically the application uses couple of mod_rewrite.. but i removed all the .htaccess files and the slow connectivity issue remains.. i installed another APACHE on my machine and used default settings. the connection was still very slow. i added following statements to measure the execution time $stime = microtime(); $stime = explode(" ",$stime); $stime = $stime[1] + $stime[0]; // my code -- it involves connection to DB $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $totaltime = ($mtime - $stime); echo $totaltime; the output is 0.0631899833679 but firebug Net panel shows total loading time of 10-11 seconds. same is the case with google chrome i tried to turn off windows firewall.. connectivity is still slow and i just can't quite find the reason.. i've tried multiple DB servers.. multiple apaches.. nothing seems to be working.. any idea of what might be the problem?

    Read the article

  • "Exception in thread "main" java.lang.NoSuchMethodError Do i miss library in the installed JDk?

    - by Ahmad
    Hello every body I was using the JDK very well writing the code then i use "javac" to compile it then "java" to run it But Recently when i write a code and compile it then if i try to run it this exception appears to me "Exception in thread "main" java.lang.NoSuchMethodError " at first i thought there is something wrong in my code , i searched in the internet for a solving for this problem but i didn't find anything may help me Then i try to run the "HelloWorld" example i made it before, it runs i copied the code and pasted it in another file and changed the name to "HelloWorld2" and compile it by "javac" and tried to run it by "java" the same exception appears i was surprised why? it is the same code then i used the "javap" which decompile the code with both i found this difference in the first one (the old one) "public static void main(java.lang.String[])"; but in the second (the new one) "public static void main(String[])"; without java.lang then i compiled the old one which works and runs by "javac" and when i try to run it, it didn't run and give me the same exception i tried with some of my old codes it run and when i compile it by "javac" it doesn't work I searched to find a solution to this problem and i found nothing

    Read the article

  • if statement inside array : codeigniter

    - by ahmad
    Hello , I have this function to edit all fields that come from the form and its works fine .. function editRow($tableName,$id) { $fieldsData = $this->db->field_data($tableName); $data = array(); foreach ($fieldsData as $key => $field) { $data[ $field->name ] = $this->input->post($field->name); } $this->db->where('id', $id); $this->db->update($tableName, $data); } now I want to add a condition for Password field , if the field is empty keep the old password , I did some thing like that : function editRow($tableName,$id) { $fieldsData = $this->db->field_data($tableName); $data = array(); foreach ($fieldsData as $key => $field) { if ($data[ $field->name ] == 'password' && $this->input->post('password') == '' ) { $data[ 'password' ] => $this->input->post('hide_password'), //'password' => $this->input->post('hide_password'), } else { $data[ $field->name ] => $this->input->post($field->name) } } $this->db->where('id', $id); $this->db->update($tableName, $data); } but I get error ( Parse error: syntax error, unexpected T_DOUBLE_ARROW in ... ) Html , some thing like this : <input type="text" name="password" value=""> <input type="hidden" name="hide_password" value="$row->$password" /> umm , any help ? thanks ..

    Read the article

  • [Qt/C++] Need help in optimizing a drawing code ...

    - by Ahmad
    Hello all ... I needed some help in trying to optimize this code portion ... Basically here's the thing .. I'm making this 'calligraphy pen' which gives the calligraphy effect by simply drawing a lot of adjacent slanted lines ... The problem is this: When I update the draw region using update() after every single draw of a slanted line, the output is correct, in the sense that updates are done in a timely manner, so that everything 'drawn' using the pen is immediately 'seen' the drawing.. however, because a lot (100s of them) of updates are done, the program slows down a little when run on the N900 ... When I try to do a little optimization by running update after drawing all the slanted lines (so that all lines are updated onto the drawing board through a single update() ), the output is ... odd .... That is, immediately after drawing the lines, they lines seem broken (they have vacant patches where the drawing should have happened as well) ... however, if I trigger a redrawing of the form window (say, by changing the size of the form), the broken patches are immediately fixed !! When I run this program on my N900, it gets the initial broken output and stays like that, since I don't know how to enforce a redraw in this case ... Here is the first 'optimized' code and output (partially correct/incorrect) void Canvas::drawLineTo(const QPoint &endPoint) { QPainter painter(&image); painter.setPen(QPen(Qt::black,1,Qt::SolidLine,Qt::RoundCap,Qt::RoundJoin)); int fx=0,fy=0,k=0; qPoints.clear(); connectingPointsCalculator2(qPoints,lastPoint.x(),lastPoint.y(),endPoint.x(),endPoint.y()); int i=0; int x,y; for(i=0;i<qPoints.size();i++) { x=qPoints.at(i).x(); y=qPoints.at(i).y(); painter.setPen(Qt::black); painter.drawLine(x-5,y-5,x+5,y+5); **// Drawing slanted lines** } **//Updating only once after many draws:** update (QRect(QPoint(lastPoint.x()-5,lastPoint.y()-5), QPoint(endPoint.x()+5,endPoint.y()+5)).normalized()); modified = true; lastPoint = endPoint; } Image right after scribbling on screen: http://img823.imageshack.us/img823/8755/59943912.png After re-adjusting the window size, all the broken links above are fixed like they should be .. Here is the second un-optimized code (its output is correct right after drawing, just like in the second picture above): void Canvas::drawLineTo(const QPoint &endPoint) { QPainter painter(&image); painter.setPen(QPen(Qt::black,1,Qt::SolidLine,Qt::RoundCap,Qt::RoundJoin)); int fx=0,fy=0,k=0; qPoints.clear(); connectingPointsCalculator2(qPoints,lastPoint.x(),lastPoint.y(),endPoint.x(),endPoint.y()); int i=0; int x,y; for(i=0;i<qPoints.size();i++) { x=qPoints.at(i).x(); y=qPoints.at(i).y(); painter.setPen(Qt::black); painter.drawLine(x-5,y-5,x+5,y+5); **// Drawing slanted lines** **//Updating repeatedly during the for loop:** update(QRect(QPoint(x-5,y-5), QPoint(x+5,y+5)).normalized());//.adjusted(-rad,-rad,rad,rad)); } modified = true; int rad = (myPenWidth / 2) + 2; lastPoint = endPoint; } Can anyone see what the issue might be ?

    Read the article

  • Send mail to multiple recipient

    - by Ahmad Maslan
    Hi, i have already research on using the mail() to send to multiple recipient's but i just cant get it to work. What im trying to do is, for every order that i have, order 1,2,3, each having their own email addresses, when i change their order status from pending to confirm, the mail() will use that id to refer to the db table and send the email of those 3 orders. But for my case, it mailed just the latest order which is order 3. This is the form that i use to change the order status. <form action="results-action" method="post" enctype="multipart/form-data"> <fieldset> <table id ="table_id" class="display"> <thead> <tr><td><h2>Pending Order</h2></td></tr> <tr> <th scope="col">Order ID</th> <th scope="col"> </th> <th scope="col">Name</th> <th scope="col">Address</th> <th scope="col">Product Name</th> <th scope="col">Produt Quantity</th> <th scope="col">Price</th> <th scope="col">Order status</th> </tr> </thead> <tbody> <?php while ($row = mysqli_fetch_array($result)) { ?> <tr> <td><input type="text" value='<?=$row['virtuemart_order_id']?>' name="orderid" id="virtuemart_order_id"></td> <td><input type="hidden" value='<?=$row['virtuemart_product_id']?>' name="productid" id="virtuemart_product_id"></td> <td><?=$row['first_name']?></td> <td><?=$row['address_1']?></td> <td><?=$row['order_item_name']?></td> <td><?=$row['product_quantity']?></td> <td><?=$row['product_final_price'] ?></td> <td><select name='change[<?=$row['virtuemart_order_id']?>]'> <option value='C'> Confirmed</option> <option value='X'> Cancelled</option></select></td> </tr> <?php } ?> </tbody> </table> </fieldset> <fieldset> <table> <tr> <td><input type="submit" value="Update status" name="update status"> </td> </tr> </table> </fieldset> </form> This is the php, using the order id from the form to select the email addresses. <?php $orderid = $_POST['orderid']; // build SQL statement to select email addresses $query3 = "SELECT email from ruj3d_virtuemart_order_userinfos where virtuemart_order_id = '$orderid'"; // execute SQL statement $result3 = mysqli_query($link, $query3) or die(mysqli_error($link)); $subject = "Order confirmed by Home and decor"; $message = "Hello! This is a message to inform that your order has been confirmed"; $from = "[email protected]"; $headers = "From: $from"; while($row3 = mysqli_fetch_array($result3)){ $addresses[] = $row3['email']; } $to = implode(",", $addresses); mail($to, $subject, $message, $headers); ?>

    Read the article

  • Magento table rates custom options

    - by Usman Ahmad
    in Tablerate.php I want to change the calculation. So for some Products with custom options like width, height the shipping cost must change. I tried with this method to find out if one product in cart has width or height greater than 60cm (example). But currently I have no Idea how to get custom option values... this code working well. foreach ($request->getAllItems() as $item) { echo 'Name: '.$item->getName(). '<br/> SKU:'.$item->getSku(). '<br/> ProductID: '.$item->getProductId(). '<br/> Price: '.$item->getPrice().'<br/>'; } Thanks

    Read the article

  • parsing multiple child with sax parser in Android

    - by Ahmad Naqibul Arefin
    I can parse xml file with sax parser, but when I need to add child attribute under a attribute then how I can get the value? my xml file is here: <?xml version="1.0" encoding="UTF-8"?> <marketlist> <market> <name restricted="yes">boss</name> <motorway>M6</motorway> <junction>J3</junction> <petrol_hour> <mon>7am - 8pm</mon> <tues>7am - 8pm</tues> </petrol_hour> </market> I want to parse and get mon and tues values. Any suggesstion? My android code for parsing is here: public void endElement(String uri, String localName, String qName) throws SAXException { elementOn = false; /** * Sets the values after retrieving the values from the XML tags * */ if (localName.equalsIgnoreCase("name")) data.setMarketName(elementValue); else if (localName.equalsIgnoreCase("motorway")) data.setMotorway(elementValue); else if (localName.equalsIgnoreCase("junction")) data.setJunction(elementValue);

    Read the article

  • iOS dynamic object creation

    - by Abdul Ahmad
    I've worked with Xcode and iOS on a few personal projects and have always used non-object-oriented designs for everything... just because I've been doing mostly learning/experimenting with things. Now I've been trying to implement some object oriented design into one game I've made previously. The idea is, I have a space ship that can shoot bullets. In the past I basically added the UIImageView to the storyboard and then connected it to the .h file and from there did things on it like move it around or whatever (using CGPointMake). The idea now is to make a method (and a whole other class soon) that will create a UIImageView programmatically, allocate it, add it to the superview etc... I've got this working so far, easy stuff, but the next part is a bit harder. Where do I store this local variable "bullet"? I've been saving it to an NSMutableArray and doing the following: (actually here are the methods that I have) -(void)movement { for (int i = 0; i < [array1 count]; i ++) { UIImageView *a = [array1 objectAtIndex:i]; a.center = CGPointMake(a.center.x + 2, a.center.y); if (a.center.x > 500) { [array1 removeObjectAtIndex:i]; [a removeFromSuperview]; } } } -(void)getBullet { UIImageView *bullet = [[UIImageView alloc] initWithFrame:CGRectMake(ship.center.x + 20, ship.center.y - 2, 15, 3)]; bullet.image = [UIImage imageNamed:@"bullet2.png"]; bullet.hidden = NO; [self.view addSubview:bullet]; [array1 addObject:bullet]; } (by the way, array1 is declared in the .h file) and theres a timer that controls the movement method timer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(movement) userInfo:nil repeats:YES]; first question is: what is the correct way of doing this? Storing a bullet for example until it is removed from the superview, should I store it another way? and another question is, when I remove a UIImageView from the superview, does that remove it from memory so its not using up system resources? Thank you for the help! (will update if I Think of other questions

    Read the article

  • How can I use from ismember

    - by ahmad hosseini
    Assuming A=[32512199.30 5401000.29 347.33 32512199.69 5401000.45 347.39 32512199.67 5401001.32 353.58 32512199.96 5401001.50 346.99 32512196.71 5401001.69 346.62 ] and B=[32512199.30 5401000.29 347.33 32512199.69 5401000.45 347.39 32512199.67 5401001.32 347.00 32512198.85 5401000.91 347.25 32512196.71 5401001.69 346.87 ] I want using ismember extract the rows that have same X and Y and different Z. X is first column, Y is the second and Z is third. in A and B I want extract from A 32512199.67 5401001.32 353.58 and 32512196.71 5401001.69 346.62 OR from B 32512199.67 5401001.32 347.00 and 32512196.71 5401001.69 346.87 How can I do it?

    Read the article

  • iptables DNS resolution

    - by Favolas
    I have a virtual machine with Fedora 19 acting as a router. This machine as an interface (p8p1) with the IP 172.16.1.254 that is connected to another machine (IP 172.16.1.1) that's simulating the external network. I've installed snort 2.9.2.2, applied the snortsam-2.9.2.2.diff.gz patch and installed snortsam 2.70 on the routermachine In snort.conf besides altering some RULE_PATH I believe I've only added the following line to the file. output alert_fwsam: 127.0.0.1:898/password After doing this two comands: ifconfig p8p1 promisc /usr/local/snort/bin/snort -v -i p8p1 If I ping from the external network to the router IP, I can see the info about the pings. One of the rules that I have is icmp-info.rules that as this single line: alert icmp $EXTERNAL_NET any -> $HOME_NET any (msg:"ICMP-INFO Echo Reply"; icode:0; itype:0; classtype:misc-activity; sid:408; rev:6;fwsam: src, 5 minutes;) snortsam.conf as this data: defaultkey password accept localhost keyinterval 30 minutes dontblock 192.168.1.1 # rede local rollbackhosts 50 rollbackthreshold 20 / 30 secs rollbacksleeptime 1 minute logfile /var/log/snort/snortsam.log loglevel 3 daemon nothreads # linha importante para gerar os bloqueios via iptables iptables p8p1 LOG bindip 127.0.0.1 Now I run this command: /usr/local/snort/bin/snort -u snort -i p8p1 -c /etc/snort/snort.conf -l /var/log/snort -Dq Terminal gives this message: Spawning daemon child... My daemon child 2080 lives... Daemon parent exiting (0) and when I runsnortsam in terminal i got this: SnortSam, v 2.70. Copyright (c) 2001-2009 Frank Knobbe . All rights reserved. Plugin 'fwsam': v 2.5, by Frank Knobbe Plugin 'fwexec': v 2.7, by Frank Knobbe Plugin 'pix': v 2.9, by Frank Knobbe Plugin 'ciscoacl': v 2.12, by Ali Basel <[email protected]> Plugin 'cisconullroute': v 2.5, by Frank Knobbe Plugin 'cisconullroute2': v 2.2, by Wouter de Jong <[email protected]> Plugin 'netscreen': v 2.10, by Frank Knobbe Plugin 'ipchains': v 2.8, by Hector A. Paterno <[email protected]> Plugin 'iptables': v 2.9, by Fabrizio Tivano <[email protected]>, Luis Marichal <[email protected]> Plugin 'ebtables': v 2.4, by Bruno Scatolin <[email protected]> Plugin 'watchguard': v 2.7, by Thomas Maier <[email protected]> Plugin 'email': v 2.12, by Frank Knobbe Plugin 'email-blocks-only': v 2.12, by Frank Knobbe Plugin 'snmpinterfacedown': v 2.3, by Ali BASEL <[email protected]> Plugin 'forward': v 2.8, by Frank Knobbe Parsing config file /etc/snortsam.conf... Linking plugin 'iptables'... Checking for existing state file "/var/db/snortsam.state". Found. Reading state file. Starting to listen for Snort alerts. and snortsam.log as an entry like this 2013/10/25, 10:15:17, -, 1, snortsam, Starting to listen for Snort alerts. Now, from the external machine I do ping 172.16.1.254 and it starts showing the info and an alert file is created in /var/log/snort/ that as the info about the PINGS. Something like: [**] [1:408:6] ICMP-INFO Echo Reply [**] [Classification: Misc activity] [Priority: 3] 10/25-10:35:16.061319 172.16.1.254 -> 172.16.1.1 ICMP TTL:64 TOS:0x0 ID:38720 IpLen:20 DgmLen:84 Type:0 Code:0 ID:1389 Seq:1 ECHO REPLY Also, if I run instead /usr/local/snort/bin/snort snort -v -i p8p1 i got this message: Running in packet dump mode --== Initializing Snort ==-- Initializing Output Plugins! Snort BPF option: snort pcap DAQ configured to passive. The DAQ version does not support reload. Acquiring network traffic from "p8p1". ERROR: Can't set DAQ BPF filter to 'snort' (pcap_daq_set_filter: pcap_compile: syntax error)! Fatal Error, Quitting.. So, this are my questions: Shouldn't snortsam block the PING? Is that DAQ error causing the problem? If so, How can I solve it?

    Read the article

  • Ubuntu Server - Power failure leads to boot failure

    - by Ali Nadalizadeh
    I have installed Ubuntu Server 10.04.1 LTS on an ext4 partition. Whenever my system looses power suddenly, It doesn't boot into the normal procedure to fix the problems automatically, but switches to the busy box shell (where it says Kernel Panic : No init found) So I guess kernel is refusing to mount the filesystem when it is not clean, since when I boot up using a Live CD and fsck it, it boots up correctly. How can I force kernel to mount the filesystem, even if it is not clean ?, so that automated fsck on system startup fixes the problems... (or it's a grub problem ?) K-V : 2.6.32-26-generic-pae #48-Ubuntu SMP

    Read the article

  • Internet Sharing on Mac Behind Proxy

    - by Ali Kazmi
    Hi, I have enabled the internet sharing via Airport on Mac mini successfully. I can connect to the Wifi network from my iPhone but can't browse the internet. The problem might be that the Mac mini uses a proxy to connect to the internet. Is there a way to make this work?

    Read the article

  • Atheros LAN card driver, Linux compiling problem

    - by Ali Qocayev
    I have installed openSUSE 11.4 to my new workstation. It says that there is Attansic ETHERNET controller on board. But no devices seen. I typed: lspci and it returned: atheros communications device 1083. I have downloaded drivers. I'm trying to compile the driver. But I get the error: **Makefile:94: Linux kernel source not configured - missing autoconf.h. Stop** But I see autoconf.h presents on my system. What should I do ?

    Read the article

  • Server can't set IP after power outage

    - by Ali
    The power went out all of a sudden and when we tried to restart everything when it came back on - our server can't be assigned an IP? We got an error stating that the IP for the server was already in use by another system. We then shut down all systems and restarted the server but then for some reason the server was assigned an IP but no one could connect to it - after restarting the server after setting it to have a dynamically assigned ip - the server now has no ip - just 0.0.0.0 - running an ipconfig/renew or ipconfig /release has no effect.. what should we do!!

    Read the article

  • Is there a vmware appliance for software development?

    - by Ali Shafai
    I use Assembla.com and it does everything I need, SVN, bug tracking, ticketing... the only thing I don't like is that the server is not mine, I'm putting all my company property on a server in the coulds. I was wondering if there is an virtual machine to download and put on my server to serve all Assembla does?

    Read the article

  • How to interpret output from Linux 'top' command?

    - by Ali
    Following a discussion made HERE about how PHP-FPM consuming memory, I just found a problem in reading the memory in top command. Here is a screenshot of my top just after restarting PHP-FPM. Everything is normal: about 20 PHP-FPM processes, each consuming 5.5MB memory (0.3% of total). Here is the aged server right before restart of PHP-FPM (one day after the previous restart). Here, we still have about 25 PHP-FPM with double memory usage (10MB indicating 0.5% of total). Thus, the total memory used should be 600-700 MB. Then, why 1.6GB memory has been used?

    Read the article

  • Tried to join a workgroup but now can't loginto system

    - by Ali
    Help - I tried to join a workgroup but now all of a sudden I can't log into my system. I get an account not found error - also for some reason when I click the options button on the log in screen I can't see the domain option at all.. whats going on! I can't even log in using the adminstrator login or anything!!

    Read the article

  • Auto-detect proxy settings on network

    - by Ali Lown
    I am having problems trying to run web browser software on the local network through the proxy. When running off the profile drive which is on a network share, the system is unable to auto-detect proxy settings. When running off the local C drive, the browsers are able to correctly autodetect the settings. The error from the browser is about it being unable to fetch the proxy configuration file. Is this some form of authentication preventing it retreiving the settings when running of the network location? PS. Would this be better off on superuser?

    Read the article

  • Unable to resolve hostname on a proxy network

    - by ali
    I can browse sites using firefox configured with proxy 172.1.6.0.6:3128 resolv.conf domain pudhcp.ac.in search pudhcp.ac.in nameserver 172.16.0.7 I checked with Windows and I found the same DNS server settings 127.0.0.1 bt 127.0.1.1 bt Above is the hosts file I modified the top line from localhost to bt still not working bt is the hostname Still I can't ping to google.com - it is showing unable to resolv hostname I tried all solutions,I guess proxy is used even for DNS resolution root@bt:~# dhclient There is already a pid file /var/run/dhclient.pid with pid 7157 killed old client process, removed PID file Internet Systems Consortium DHCP Client V3.1.1 Copyright 2004-2008 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Listening on LPF/eth1/5c:ac:4c:b1:0c:7c Sending on LPF/eth1/5c:ac:4c:b1:0c:7c Listening on LPF/eth0/60:eb:69:18:4d:3d Sending on LPF/eth0/60:eb:69:18:4d:3d Sending on Socket/fallback DHCPREQUEST of 172.16.6.87 on eth0 to 255.255.255.255 port 67 DHCPACK of 172.16.6.87 from 172.16.6.1 bound to 172.16.6.87 -- renewal in 79432 seconds.

    Read the article

  • I need access control within the same network/VLAN

    - by Sadiq ali
    Hi, I have a single network/VLAN and I want to block some traffic and allow some traffic in my network, is this possible using a L2 or L3 switch? If so which switches support this feature and what would be the commands to configure this? I have already tried this using access lists by applying it to an ethernet port but if I apply it on one port it will automatically work on incoming traffic on that port but I mean it to work on only outgoing traffic as per my ACL. Do you have any suggestions please?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >