Search Results

Search found 133 results on 6 pages for 'sajid ahmad'.

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

  • Finding latest successful logins and failed attempts to a CentOS server

    - by ahmad
    I'm looking for a log file or any service to report the latest login attempts which have failed due to username/password miss match. Is there such utility available for CentOS? (built-in is preferred) My second question, and more generally, I need a log file of penetration attempts to my server. Ideally, this log should contain all attempts including logins, httpd activities, and other conventional open ports.

    Read the article

  • Googlebot cant access my site webmaster tools reply Unreachable robots.txt

    - by Ahmad Ahmadi
    When I try to fetch my site as a googlebot in webmaster tools it return Unreachable robots.txt, after investigate I understood google bot can see my server: tcpdump | grep google it return that google can access my server with IP 66.249.81.172 or 66.249.75.111. but there is not any think in access log or error log or other apache logs. cat access_log | grep google or cat error_log | grep 66.249.81.172 Other bot (bing,...) can access apache but google cant. there is not any problem in my robots.txt or its permissions because as you know robots.txt is not necessary so I delete it but again webmaster tools returned Unreachable robots.txt not 404 not found! information about server: Server OS : CentOS 6 Web Server : Apache 2.x Firewall : IPTables is stoped SELinux is Disabled There is not any think else for security on my server. how can I investigate the problem and is there any other command that can help me to find the problem.

    Read the article

  • Detecting Request that uses invalid Encoding using Modsecurity

    - by Ali Ahmad
    I am trying write a virtual patch using modsecurity for my hosted web application using following rule i.e. <Location /index.php> SecDefaultAction phase:2,t:none,log,deny # Validate parameter names SecRule ARGS_NAMES "!^(articleid)$" \ "msg:'Unknown parameter: %{MATCHED_VAR_NAME}'" # Expecting articleid only once SecRule &ARGS:articleid "!@eq 1" \ "msg:'Parameter articleid seen more than once'" # Validate parameter articleid SecRule ARGS:articleid "!^[0-9]{1,10}$" \ "msg:'Invalid parameter articleid'" </Location> The problem is how can i reject requests that use invalid encoding as a global WAF configuration so that this patch cannot be circumvented.

    Read the article

  • memcache fast-cgi php apache 2.2 windows 7 creating problems

    - by Ahmad
    hi, i am trying to run memcache, fast-cgi with apache 2.2 + php on a windows 7 machine. if i dont use memcache everything works fine. the moment i disable extension=php_memcache.dll in php.ini everything returns to normal. once i start apache, the apache logs say: [Wed Jan 12 18:19:23 2011] [notice] Apache/2.2.17 (Win32) mod_fcgid/2.3.6 configured -- resuming normal operations [Wed Jan 12 18:19:23 2011] [notice] Server built: Oct 18 2010 01:58:12 [Wed Jan 12 18:19:23 2011] [notice] Parent: Created child process 412 [Wed Jan 12 18:19:23 2011] [notice] Child 412: Child process is running [Wed Jan 12 18:19:23 2011] [notice] Child 412: Acquired the start mutex. [Wed Jan 12 18:19:23 2011] [notice] Child 412: Starting 64 worker threads. [Wed Jan 12 18:19:23 2011] [notice] Child 412: Starting thread to listen on port 80. and after accessing the page [the page just has echo phpinfo()]. i get this error in the error.log [Wed Jan 12 18:20:54 2011] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error [Wed Jan 12 18:20:54 2011] [error] [client 127.0.0.1] Premature end of script headers: index.php i have php_memcache.dll in my ext directory and httpd.conf is like this: LoadModule fcgid_module modules/mod_fcgid.so FcgidInitialEnv PHPRC "c:/php" FcgidInitialEnv PATH "c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;" FcgidInitialEnv SystemRoot "C:/Windows" FcgidInitialEnv SystemDrive "C:" FcgidInitialEnv TEMP "C:/WINDOWS/Temp" FcgidInitialEnv TMP "C:/WINDOWS/Temp" FcgidInitialEnv windir "C:/WINDOWS" FcgidIOTimeout 64 FcgidConnectTimeout 32 FcgidMaxRequestsPerProcess 500 <Files ~ "\.php$>" AddHandler fcgid-script .php FcgidWrapper "c:/php/php-cgi.exe" .php </Files> so the problem has to be related to memcache coz if i disable it, fast-cgi seems to be working fine. any possible reasons for this?? the memcache service is running.. i can check it through control panel-services

    Read the article

  • Web Interfaces not opening even after Port Forwarding is said to be working!

    - by Ahmad
    I'm encountering this strange problem which has baffled me to the ground, and which I haven't encountered even after years of doing port forwarding .. ! I am hoping somebody here can help me solve this mystery .. :) My network configuration is as follows: I have a DSL modem (custom made and branded by my ISP) which is receiving a DSL stream ... it has an external IP which is visible to the world, say, 11.22.33.44 ... This modem has DHCP enabled, has an internal IP for itself, which is 192.168.1.1 .. it is connected to 2 laptops via and ethernet cable .. Laptop 1 has IP 192.168.1.2, and Laptop 2 has IP 192.168.1.3 ... On Laptop 1, two applications are running, jDownloader and Media Player Classic, which have their web interfaces on ports 8765 and 13579, respectively ... I can access both of these web interfaces from Laptop 2 by opening these addresses: 192.1681.2:8765 and 192.168.1.2:13579 ... both of their web interfaces open up, meaning the web interfaces are working fine .. Moving on, I now want to access these web interfaces from outside my network as well, and so I've configured port forwarding in my PTCL modem to forward all traffic on ports between 8000 and 14000 (both TCP and UDP) to IP 192.168.1.2 ... I have verified that port forwarding is working by testing it using PortForward.com's port checker tool, and this website too: [URL]http://www.yougetsignal.com/tools/open-ports/[/URL] When I use the website, if I'm running the applications on Laptop 2, the website reports that the port is open .. if I then close the application, the website reports the port is closed ... This makes sense as nothing is listening on my machine in the latter case .. Also, if I disable port forwarding in my modem, again, the website reports the port is closed ... so, the website's results seem to be okay ... Same of the above can be said when I'm used PortForward.com's port checker tool ... So again, everything okay so far ... Now, here comes the problem !! ... Despite the above tools reporting that port forwarding is working, I am unable to open the web interfaces from outside my network ... So for example, if I tried to browse 11.22.33.44:8765 or 11.22.33.44:13579, nothing opens in my browser ... But if I accessed these web server's locally from Laptop 3, by typing in 192.168.1.2:8765 or 192.168.1.2:13579, they opened ... So where is the problem here ?? The tools report unanimously that port forwarding is working, and yet I am unable to open the web interfaces from outside the network .. Also note that I have disabled the firewall from my computer, and have also made sure that any option in the above programs (whose web interfaces I am trying to open) that says only local connections are to be accepted, is disabled ... So whats the problem ... ?!! Any ideas ??

    Read the article

  • calculate AUC (GAM) in R [migrated]

    - by ahmad
    I used the following script to calculate AUC in R: library(mgcv) library(ROCR) library(AUC) data1=read.table("d:\\2005.txt", header=T) GAM<-gam(tuna ~ s(chla)+s(sst)+s(ssha),family=binomial, data=data1) gampred<- predict(GAM, type="response") rp <- prediction(gampred, data1$tuna) auc <- performance( rp, "auc")@y.values[[1]] auc roc <- performance( rp, "tpr", "fpr") plot( roc ) But when I was running the script, the result is: **rp <- prediction(gampred, data1$tuna) Error in prediction(gampred, data1$tuna) : Format of predictions is invalid. > > auc <- performance( rp, "auc")@y.values[[1]] Error in performance(rp, "auc") : object 'rp' not found > auc function (x, min = 0, max = 1) { if (any(class(x) == "roc")) { if (min != 0 || max != 1) { x$fpr <- x$fpr[x$cutoffs >= min & x$cutoffs <= max] x$tpr <- x$tpr[x$cutoffs >= min & x$cutoffs <= max] } ans <- 0 for (i in 2:length(x$fpr)) { ans <- ans + 0.5 * abs(x$fpr[i] - x$fpr[i - 1]) * (x$tpr[i] + x$tpr[i - 1]) } } else if (any(class(x) %in% c("accuracy", "sensitivity", "specificity"))) { if (min != 0 || max != 1) { x$cutoffs <- x$cutoffs[x$cutoffs >= min & x$cutoffs <= max] x$measure <- x$measure[x$cutoffs >= min & x$cutoffs <= max] } ans <- 0 for (i in 2:(length(x$cutoffs))) { ans <- ans + 0.5 * abs(x$cutoffs[i - 1] - x$cutoffs[i]) * (x$measure[i] + x$measure[i - 1]) } } return(as.numeric(ans)) } <bytecode: 0x03012f10> <environment: namespace:AUC> > > roc <- performance( rp, "tpr", "fpr") Error in performance(rp, "tpr", "fpr") : object 'rp' not found > plot( roc ) Error in levels(labels) : argument "labels" is missing, with no default** Can anybody help me to solve this problem? Thank you in advance.

    Read the article

  • Timely automatic unexpected reboot on ubuntu desktop

    - by ahmad
    We have a remote linux server (ubuntu desktop). The system log indicates the system has been restarted on the timely fashion. Here is a part of the last output: ut pts/0 192.169.50.2-sta Sat Nov 24 22:17 still logged in reboot system boot 2.6.32-21-generi Sat Nov 24 22:04 - 22:17 (00:13) ut pts/0 server.local Sat Nov 24 21:36 - crash (00:27) reboot system boot 2.6.32-21-generi Sat Nov 24 15:55 - 22:17 (06:21) reboot system boot 2.6.32-21-generi Fri Nov 23 18:02 - 22:17 (1+04:14) reboot system boot 2.6.32-21-generi Fri Nov 23 10:39 - 22:17 (1+11:38) reboot system boot 2.6.32-21-generi Fri Nov 23 04:18 - 22:17 (1+17:59) reboot system boot 2.6.32-21-generi Fri Nov 23 03:57 - 22:17 (1+18:20) reboot system boot 2.6.32-21-generi Thu Nov 22 20:38 - 22:17 (2+01:38) reboot system boot 2.6.32-21-generi Thu Nov 22 11:13 - 22:17 (2+11:03) reboot system boot 2.6.32-21-generi Thu Nov 22 08:12 - 22:17 (2+14:05) reboot system boot 2.6.32-21-generi Wed Nov 21 11:16 - 22:17 (3+11:00) reboot system boot 2.6.32-21-generi Tue Nov 20 22:36 - 22:17 (3+23:41) reboot system boot 2.6.32-21-generi Tue Nov 20 14:12 - 22:17 (4+08:05) reboot system boot 2.6.32-21-generi Tue Nov 20 11:32 - 22:17 (4+10:44) reboot system boot 2.6.32-21-generi Tue Nov 20 01:52 - 22:17 (4+20:25) reboot system boot 2.6.32-21-generi Tue Nov 20 00:22 - 22:17 (4+21:55) reboot system boot 2.6.32-21-generi Mon Nov 19 17:27 - 22:17 (5+04:50) It looks the system is set to be restarted at 22:17. Can anyone guide me why this happens? Thanks in advance.

    Read the article

  • How to clone a HDD and then use the clone with VMware (so that Windows works!)?

    - by Ahmad
    I have a system on which Windows 7 is installed, and I am trying to make a clone of its HDD image, which I then want to use in my main PC with VMware, so that I can boot Windows 7 off the cloned HDD. I used Ultimate Boot CD v5.1.1 with the system whose HDD I wanted to clone, and I cloned it using EaseUs Disk Copy, which comes with Ultimate Boot CD. The source HDD was 250 GB in size which had 3 partitions, while the USB HDD I attached to the system, which was supposed to be the destination/clone HDD, was 320 GB in size. I chose to create an exact replica, and so 250 GB worth of data (partitions, etc.) was copied exactly, and the rest of the space was un-allocated. I now connected this USB HDD to my main PC, fired up VMware Workstation 8 and defined a new Virtual Machine, and chose to boot off the USB HDD. Result is that when Windows is booting (from the cloned HDD inside VMware), I get the blue screen error before I reach the login screen. How can I change my methodology so that Windows even boots from the clone? I can change any tools I use, etc.

    Read the article

  • Macros in Excel 2010 hangs

    - by Ahmad
    I have a spreadsheet with several macros. Generally, when previously using Excel 2007, a user clicks a button and everything works as expected (calculations, some email sending & file I/O). Typically, the expected run-time is about 90 seconds. The spreadsheet is a xlsm file created with Excel 2007. With Excel 2010 however, the same user process results in a non-responsive excel and forces us to kill excel from the task manager. Some note that I have gathered so far in trying to debug this issue: When monitoring CPU usage, it seems that Excel does start the macro. CPU usage increases as expected to about 47% for a few seconds. Excel.exe than drops to 0% usage and I now have a non-responsive Excel (even after 1 hour). If I set debug break points across modules and different functions and step through the code (after clicking the button) , the process works as expected albeit much slower. To add, there were no exceptions. I am at a complete loss as to what the issue may be. I initially thought it may be the add in that is being used but that was debunked by point 2. This seems to be a very odd situation. I can provide more information if required, but I'm at wits end about the root cause could be. I need help in diagnosing and resolving this issue.

    Read the article

  • Partition/install issues

    - by jalal ahmad
    I am new to Ubuntu and tried to install 10.1 as dual boot option from a USB. At first I encountered the error when in partition dialogue of installation process that cannot find root directory. I did a search on Ubuntu forums and did this as in one of the posts. Make sure that the partition file system you wish to install Linux, Ubuntu or Backtrack on it is ext4, ext3 or ext2, and not FAT32 or NTFS. Then mount / on it: During the installation process press "change" on the partition you wish to use Make sure "do not use this partition" scroll is not chosen, scroll to ext4, ext3 or ext2 On the "mount" field write / Click ok, then next a message will appear saying something like "swap area was not defined, do you wish to continue or choose a swap area?", click "ok" and continue or click "go back" and choose another partition and click change, on the file system scroll choose "swap" and click "ok" and next All good but when I rebooted I could not find Windows vista as in dual boot option. Plus I could not see wireless networks and in the process of trying to find out what went wrong the soft switch somehow turned off and as I cannot boot in Windows I have no idea what to do. Again searching internet I found a post which said the dual boot problem can be overcome by installing gparted but when I tried I got the message Reading package lists... Done Building dependency tree Reading state information.. Done E: Couldn't find package gparted I thought I am going to copy my stuff from my hard disk and try to install Windows but I found out that I have two partitions which are different from what I had before installing Ubuntu. I now have filesystem partition1 119 GB ext4, swap partition 5 1.1 GB swap and extended partition 2 1.1 GB. And I cannot mount 119 GB where all my personal videos, photos are if still there. Now I cannot boot from Windows even. Need help on what to do? Best case scenario would be to be able to copy my stuff before I mess up the system further. Else a dual boot system and if not then how do I install vista again. I have Windows CD. Cheers guys and thanks in advance.

    Read the article

  • TORQUE: Find out why the job is queued?

    - by ahmad
    Under TORQUE-MAUI job scheduling system, there are several reasons to have a job stayed in Q state. Those that I know are: There are not enough resource to run the Queued job. The user is not allowed to have further running jobs. The user is not allowed to have further computation cores. Is there any other reason to have the queued job? Further information: I am asking the question because I have couple of queued jobs while some nodes are free, pbs_mom is on on them, and mauid limitations are generously large. Thanks in advance.

    Read the article

  • Tool for creating system image from DOS (should be USB bootable) ..?

    - by Ahmad
    I want to know if there's any decent tool which can be used to create the system image from DOS .. What I specifically want to do is to put the program in my FAT32 formatted USB, then boot the target computer from the USB so that the tool runs, and then it should be able to create a complete system image of the entire system, and store it on the USB itself .. Please note that I can ONLY do this from boot time because of other limitations .. I cannot go into any OS to do it from there .. So I need tools which can do this at boot time from DOS ..

    Read the article

  • Debugger for IE7

    - by Muhammad Sajid
    I m using PHP5 & during testing on IE7 if some thing does no work then i can not find the bug quickly as i can do in FF (by the help of Firebug). Is there any tool for code debugging in IE7 like in FireFox we have firebug ?

    Read the article

  • Uploading on Youtube via HTTP Post

    - by sajid.nizami
    I am following the steps provided on this link [http://code.google.com/apis/youtube/2.0/developers_guide_dotnet.html#Browser_based_Upload][1] Whenever I try to upload anything using this method, I get a HTTP 400 error saying that the next_url is not provided. Code is pretty simple and is a copy of Google's own code. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="BrowserUpload.aspx.cs" Inherits="BrowserUpload" %> <%@ Import Namespace="Google.YouTube" %> <%@ Import Namespace="Google.GData.Extensions.MediaRss" %> <%@ Import Namespace="Google.GData" %> <%@ Import Namespace="Google.GData.YouTube" %> <%@ Import Namespace="Google.GData.Client" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript"> function checkForFile() { if (document.getElementById('file').value) { return true; } document.getElementById('errMsg').style.display = ''; return false; } </script> </head> <body> <% YouTubeRequestSettings settings = new YouTubeRequestSettings("Danat", "API-KEY", "loginid", "password" ); YouTubeRequest request = new YouTubeRequest(settings); Video newVideo = new Video(); newVideo.Title = "My Test Movie"; newVideo.Tags.Add(new MediaCategory("Autos", YouTubeNameTable.CategorySchema)); newVideo.Keywords = "cars, funny"; newVideo.Description = "My description"; newVideo.YouTubeEntry.Private = false; newVideo.Tags.Add(new MediaCategory("mydevtag, anotherdevtag", YouTubeNameTable.DeveloperTagSchema)); FormUploadToken token = request.CreateFormUploadToken(newVideo); %> <form action="<%= token.Url %>?next_url=<%= Server.UrlEncode("http://www.danatev.com") %>" name="PostToYoutube" method="post" enctype="multipart/form-data" onsubmit="return checkForFile();" > <input id="file" type="file" name="file" /> <div id="errMsg" style="display: none; color: red"> You need to specify a file. </div> <input type="hidden" name="token" value="<%= token.Token %>" /> <input type="submit" value="go" /> </form>

    Read the article

  • Display label character by character using javascript

    - by Muhammad Sajid
    Hi, I am creating Hang a Man using PHP, MySQL & Javascript. Every thing is going perfect, I get a word randomly from DB show it as a label apply it a class where display = none. Now when I click on a Character that character become disable fine which i actually want but the label-character does not show. My code is: <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <?php include( 'config.php' ); $question = questions(); // Get question. $alpha = alphabats(); // Get alphabets. ?> <script language="javascript"> function clickMe( name ){ var question = '<?php echo $question; ?>'; var questionLen = <?php echo strlen($question); ?>; for ( var i = 0; i < questionLen; i++ ){ if ( question[i] == name ){ var link = document.getElementById( name ); link.style.display = 'none'; var label = document.getElementById( 'questionLabel' + i ); label.style.display = 'block'; } } } </script> <div> <table align="center" style="border:solid 1px"> <tr> <?php for ( $i = 0; $i < 26; $i++ ) { echo "<td><a href='#' id=$alpha[$i] name=$alpha[$i] onclick=clickMe('$alpha[$i]');>". $alpha[$i] ."</a>&nbsp;</td>"; } ?> </tr> </table> <br/> <table align="center" style="border:solid 1px"> <tr> <?php for ( $i = 0; $i < strlen($question); $i++ ) { echo "<td class='question'><label id=questionLabel$i >". $question[$i] ."</label></td>"; } ?> </tr> </table> </div>

    Read the article

  • Change array format in PHP.

    - by Muhammad Sajid
    I have an array like: Array ( [6] => Array ( [quantity] => 23 [orgId] => 6 [validity] => 20 ) [2] => Array ( [quantity] => 5 [orgId] => 2 [validity] => 2 ) [5] => Array ( [quantity] => 5 [orgId] => 5 [validity] => 4 ) [4] => Array ( [quantity] => 7 [orgId] => 4 [validity] => 10 ) ) and i want to show that like this: Array ( [0] => Array ( [quantity] => 23 [orgId] => 6 [validity] => 20 ) [1] => Array ( [quantity] => 5 [orgId] => 2 [validity] => 2 ) [2] => Array ( [quantity] => 5 [orgId] => 5 [validity] => 4 ) [3] => Array ( [quantity] => 7 [orgId] => 4 [validity] => 10 ) ) To do that i used array_push & some other technique but fail. can someone help me thanks.

    Read the article

  • Display lable character by character using javascript

    - by Muhammad Sajid
    Hi, I am creating Hang a Man using PHP, MySQL & Javascript. Every thing is going perfect, I get a word randomly from DB show it as a label apply it a class where display = none. Now when I click on a Character that character become disable fine which i actually want but the label-character does not show. My code is: <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <?php include( 'config.php' ); $question = questions(); // Get question. $alpha = alphabats(); // Get alphabets. ?> <script language="javascript"> function clickMe( name ){ var question = '<?php echo $question; ?>'; var questionLen = <?php echo strlen($question); ?>; for ( var i = 0; i < questionLen; i++ ){ if ( question[i] == name ){ var link = document.getElementById( name ); link.style.display = 'none'; var label = document.getElementById( 'questionLabel' + i ); label.style.display = 'none'; } } } </script> <div> <table align="center" style="border:solid 1px"> <tr> <?php for ( $i = 0; $i < 26; $i++ ) { echo "<td><a href='#' id=$alpha[$i] name=$alpha[$i] onclick=clickMe('$alpha[$i]');>". $alpha[$i] ."</a>&nbsp;</td>"; } ?> </tr> </table> <br/> <table align="center" style="border:solid 1px"> <tr> <?php for ( $i = 0; $i < strlen($question); $i++ ) { echo "<td class='question'><label id=questionLabel$i >". $question[$i] ."</label></td>"; } ?> </tr> </table> </div>

    Read the article

  • Show hide DIVs : jQuery

    - by Muhammad Sajid
    Hi, I have two links & I want to show / hide them one at a time, my code is : <!DOCTYPE html> <html> <head> <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"> // we will add our javascript code here $(document).ready(function() { $(function(){ $('#link').click(function(){ $('#colorDiv').slideToggle('slow'); return false; }); }); }); </script> <meta charset=utf-8 /> <title>JS Bin</title> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <style> #dv { width:100px; height:100px; border:1px solid; } </style> </head> <body> <table cellspacing="2"> <tr><td><a href="#" id="link">Color</a></td><td><a href="#" id="link">Car</a></td></tr> <tr><td><div id="colorDiv">Red</div></td><td><div id="carDiv">PRADO</div></td></tr> </table> </body> </html> by default first div should me shown. hanks.

    Read the article

  • Fetch all emails in PHP.

    - by Muhammad Sajid
    Hello. I want to fetch all my emails available in different online accounts eg:(gmail, yahoo, hotmail, aol, etc..) using PHP such that if necessary to reply any email then I could reply. How it is possible?

    Read the article

  • MySql Retrive data from same table.

    - by Muhammad Sajid
    Hi, I have a table which contains id, name, parentId of Top level Menus & their children like: -------------------------------------- id | name | parentId -------------------------------------- 1 | Color | 0 -------------------------------------- 2 | Flower | 0 -------------------------------------- 3 | Red | 1 -------------------------------------- 4 | pink | 1 -------------------------------------- 5 | Rose | 2 -------------------------------------- 6 | Lily | 2 -------------------------------------- And I want to fetch these record some thing that the resultant array must be like --------------------------------------------------------------- id | Pname | parentId | child | childId --------------------------------------------------------------- 1 | Color | 1 | Red | 3 --------------------------------------------------------------- 2 | Color | 1 | Pink | 4 --------------------------------------------------------------- 3 | Flower | 2 | Rose | 5 --------------------------------------------------------------- 4 | Flower | 2 | Lily | 6 --------------------------------------------------------------- my query was like: SELECT name AS Pname FROM myTbl WHERE id = (SELECT parentId FROM myTbl WHERE parentId = 1 ) but mysql say #1242 - Subquery returns more than 1 row Could anyone solve it. Thanks..

    Read the article

  • What transaction manager should I use for JBDC template When using JPA ?

    - by Sajid
    I am using standard JPA transaction manager for my JPA transactions. However, now I want to add some JDBC entities which will share the same 'datasource'. How can I make the JDBC operations transactional with spring transaction? Do I need to swith to JTA transaction managers? Is it possible to use both JPA & JDBC transactional service with same datasource? Even better, is it possible to mix these two transactions?

    Read the article

  • How to get <select> options either (value or text) using jQuery

    - by Muhammad Sajid
    Hello, i have a code for <select id='list'> <option value='1'>Option A</option> <option value='2'>Option B</option> <option value='3'>Option C</option> </select> and i want that how ever i select any option, it will show in an alert message. i have try <script type='text/javascript'> //var value = $("#list option[value=2]").text(); //var value = $("#list option:selected").text(); //var value = $('#list').val(); var value = $(this).val(); alert(value); </script> but fail.

    Read the article

  • Array filteration PHP

    - by Muhammad Sajid
    I have an array with values like: Array ( [0] => Array ( [parent] => Basic [parentId] => 1 [child] => Birthday [childId] => 2 ) [1] => Array ( [parent] => Basic [parentId] => 1 [child] => Gender [childId] => 3 ) [2] => Array ( [parent] => Geo [parentId] => 10 [child] => Current City [childId] => 11 ) [3] => Array ( [parent] => Known me [parentId] => 5 [child] => My personality [childId] => 7 ) [4] => Array ( [parent] => Known me [parentId] => 5 [child] => Best life moment [childId] => 8 ) ) And I want to filter this array such that their filtration based on parent index, and the final result would be like: Array ( [0] => Array ( [parent] => Basic [parentId] => 1 [child] => Array ( [0] => Birthday [1] => Gender ) ) [1] => Array ( [parent] => Geo [parentId] => 10 [child] => Array ( [0] => Current City ) ) [2] => Array ( [parent] => Known me [parentId] => 5 [child] => Array ( [0] => My personality [1] => Best life moment ) ) ) For that I coded : $filter = array(); $f = 0; for ($i=0; $i<count($menuArray); $i++) { $c = 0; for( $b = 0; $b < count($filter); $b++ ){ if( $filter[$b]['parent'] == $menuArray[$i]['parent'] ){ $c++; } } if ($c == 0) { $filter[$f]['parent'] = $menuArray[$i]['parent']; $filter[$f]['parentId'] = $menuArray[$i]['parentId']; $filter[$f]['child'][] = $menuArray[$i]['child']; $f++; } } But it results : Array ( [0] => Array ( [parent] => Basic [parentId] => 1 [child] => Array ( [0] => Birthday ) ) [1] => Array ( [parent] => Geo [parentId] => 10 [child] => Array ( [0] => Current City ) ) [2] => Array ( [parent] => Known me [parentId] => 5 [child] => Array ( [0] => My personality ) ) ) Could anyone point out my missing LOC?

    Read the article

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