php,sitemap,ping,successRelated issues-Collection of common programming errors
SoLoGHoST
php internationalization gettext
I am trying to set up a way to allow members to translate strings into other languages. You can see an example here: TRANSLATIONS TESTSomeone recommended that I use php’s native gettext() function for this, instead of what I am already using to load the language files, which is this:function loadLanguageFile($language, $file) {$temp = array();$data = file_get_contents(‘./’.$language.’/’.$file.’.’.$language.’.php’);$codes = array (‘/(\’\s*\.\s*\$)(.+?)(\s*\.\s*\’)/’,’/(=\s*\$)(.+?)(\s*\.\s*\’)/
sourav78611
php android json android-listview
I am new in android , right now I am facing some issue with list view, one list screen is there with some name in list and when i click on any one of those name it should pass that id to another activity and where it has to fetch some data from database according to code but my activity is getting stopped… so please anyone help me out here… alluseractivity is connected to list which is showing some list, its working but employeedetails that activity is having some problem…. i have given x
oussama.elhadri
php android mysql json android-asynctask
i get this error when I try to connect Mysql DataBase using the code below. the objective is to add a new product to database.04-08 14:13:10.440: E/AndroidRuntime(1568): FATAL EXCEPTION: AsyncTask #204-08 14:13:10.440: E/AndroidRuntime(1568): Process: com.example.androidmanifest, PID: 156804-08 14:13:10.440: E/AndroidRuntime(1568): java.lang.RuntimeException: An error occured while executing doInBackground()04-08 14:13:10.440: E/AndroidRuntime(1568): at android.os.AsyncTask$3.done(AsyncTas
user3312672
php android json web-applications
I am making a andriod app which performs CRUD operations on a localhost php database here is my code and the log cat. please help to fix the errorsJSONParser.javapackage com.example.androidhive;import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.List;import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import o
Lightness Races in Orbit
php mysql string strlen
<!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> <link rel=”stylesheet” href=”StylesTSL.css” type=”text/css” media=”screen”> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>Terraria Server List</title> </head> <body> <div id=”page”> <div id=”logobase”> <div class=”filler”>&l
Mark Nottingham
php android json
I am building an app that parsers json into a listview from a database. I have used a PHP script to encode the data from the database in the JSON format below:[{“id”:”1″,”artistname”:”Rihanna”},{“id”:”2″,”artistname”:”Katy Perry”},{“id”:”3″,”artistname”:”DJ Dibs”},{“id”:”4″,”artistname”:”Jamie Foxx”},{“id”:”5″,”artistname”:”Disclosure”}]Here is the parser class which returns the data above as a string:package com.example.jsontester;public class JsonParser {static InputStream is = null;static JSO
user3006788
php android mysql json error-handling
i am creating a simple android application that add user (register) and retrieve user(login)the first action work perfectly but the second force close and crush the application.can anyone help me???logCat04-02 08:24:18.532: E/JSON Parser(2380): Error parsing data org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject 04-02 08:24:18.536: W/dalvikvm(2380): threadid=12: thread exiting with uncaught exception (group=0xa4c06648) 04-02 08:24:18.568: E/AndroidR
dunc
php mysql wordpress
A short while ago, I asked a fairly lengthy question regarding a content filter for my website. The post can be found here, please feel free to have a read at your own leisure.I’ve accepted @DampeS8N ‘s answer because he answered well and sent me in the right direction.Unfortunately, the outcome of said question was that the content filter I’m using is simply too inefficient to run in the context of my application.Here’s the information:I have ~2000+ glossary terms* and ~1200+ species profiles**
Nick
java php android json
When I click login it just attemping to login and forced closed my appsThis is my logcat:12-13 00:19:08.809: E/JSON Parser(20761): Error parsing data org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject 12-13 00:19:08.809: W/dalvikvm(20761): threadid=9: thread exiting with uncaught exception (group=0x40018578) 12-13 00:19:08.829: E/AndroidRuntime(20761): FATAL EXCEPTION: AsyncTask #1 12-13 00:19:08.829: E/AndroidRuntime(20761): java.lang.RuntimeExceptio
Orochi1992
php android json exception httprequest
Hello I am working on a login activity but it always displays the following error:E/JSON Parser(12505): Error parsing data org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject 03-25 00:21:14.735: W/dalvikvm(12505): threadid=11: thread exiting with uncaught exception (group=0x41d83700) 03-25 00:21:14.775: E/AndroidRuntime(12505): FATAL EXCEPTION: AsyncTask #1 03-25 00:21:14.775: E/AndroidRuntime(12505): java.lang.RuntimeException: An error occured while
user2524219
php sitemap ping success
I have a php script that creates an xml sitemap. At the end, I useshell_exec(‘ping -c1 www.google.com/webmasters/tools/ping?sitemap=sitemapurl’);to submit the updated sitemap to Google Webmaster tools.Having read the Google documentation, I’m unsure whether I need to do this each time or not. Entering the link in the code manually, results in a success page from google, but using the ping command I receive no confirmation. I would also like to know if there is any way of checking if the command
VinayVeluri
php mediawiki sitemap
Hi I try to generate a sitemap with a new mediawiki installation.when using: php maintenance/generateSitemap.php \–fspath sitemap \–server http://mydomain.org \–urlpath http://mydomain.org/sitemap (with mydomain being my domain url)I get a parser error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in <b>mydomain/maintenance/generateSitemap.php</b> on line <b>37</b><br />Any idea what could be wrong?
Michael
asp.net security menu sitemap user
I’m doing some research on security and sitemaps in ASP.net and am unfortunately running short on time. I have not worked too much with ASP.net security so I’m not completely sure if I’m heading in the right direction.Here is my problem: I have a public website (i.e. on the internet) that will allow any user to sign up to. The website will be developed using ASP.net webforms. These users may create other users and assign these users different roles.Different roles have different restrictions and
GaGar1n
asp.net navigation sitemap sitemappath
I’m trying to build a dynamic site map on my site using SiteMapPath. Should be like this: Home > Products > %product_name% > Prices where %product_name% is set dynamically in the runtime, depends on user’s choice.I’ve read many articles on the theme and choose this http://harriyott.com/2007/03/adding-dynamic-nodes-to-aspnet-site.aspx. It dynamically changes the Web.sitemap XML file. The problem is that it still builds the sitemap only once in the beginning and then uses it on each page.How can
Ahmed
Stephen Ostermiller
google google-webmaster-tools apache sitemap linux
I have a website with httpd (front end) and Apache tomcat (back end).I’m trying to install Google Sitemap Generator and create sitemap for the website.I followed the following link for installation:http://googlesitemapgenerator.googlecode.com/svn/trunk/doc/gsg-installation.htmlBut I’m not able to load http://server:8181, it is showing a blank page.My system details are: CentOS release 5.4 (Final) httpd-2.2.3-65.el5.centos apache-tomcat-6.0.37I’m using mod_jk connectors for connecting Apache and
Piotr Czapla
asp.net asp.net-mvc sitemap
I’m building a regionalized site each region has it own sitemap and own content. The regions can be added at runtime. Is there any way to add a sitemap provider at runtime?I need multiple site map providers at once so that I can leverage the mvcsitemap without to many changes.
R Ajay
asp.net sitemap
I have an asp.net website with different user types like admin, registered user. Each user type has different menu options.I have created a common master page for all types of users, but designed different sitemap files for different user types.What I am trying to do is, after login according to the user type the sitemap should change in Master Page.Here is the code I tried in master page loading. It is showing me error like**The SiteMapProvider ‘Principal.sitemap’ cannot be found.**I tried with
Jesper
xml validation sitemap
I have made a sitemap that I basically print out from the DB.I get an error on google sitemap validation, but I really can’t see why. Hope someone can help.error from validation:—————————————————————-Schema validator crashed The maintainers of XSV will be notified, you don’t need to send mail about this unless you have extra information to provide. If there are Schema errors reported below, try correcting them and re-running the validation.Length: 76774
Craig
c# xml linq sitemap custom-attributes
I have a Web.sitemap file using the siteMapNode elements in XML. I have added custom attributes to each tag. I am trying to extract the value of the custom attribute id.I want to find a single siteMapNode in the SiteMapNodeCollection which matches the custom attribute id. I am able to achieve this using a foreach loop, but I want to use LINQ to make it short and sweet.–DOESN’T WORK– The function is as follows:private SiteMapNode FindNodeById(SiteMapNodeCollection nodes, int siteMapNodeId) {
crockpotveggies
java ping hosts-file
I have a play application connecting to a database at 1.2.3.4 but for some reason Play! (and other java apps too) cannot connect to it.I did try editing the hosts file and setting a name for the IP like app01 1.2.3.4 however it only worked on the box where the DB was hosted and it didn’t work for external machines. I can confirm that the right port is open in iptables and I’ve tried restarting it, too.If I ping postgres at port 4567 at 1.2.3.4 from the same box, it works. But setting the same IP
l008com
php ping icmp
I’m trying to do actual, genuine ping using ICMP packets, natively in PHP. Right now I’m using exec to run the ping command, but you never quite know what it’s going to output, which makes it very hard to format the results for web. Different network setups can result in some crazy output. So I wrote my own pinger using socket_create() (with help from the manual comments), but that also doesn’t work. Apparently you can’t create a raw socket unless your apache server is running as root. That’s no
Marino3d
java ping
So I have been using isReachable to “ping” an address in my java code. This block of code is what everyone seems to use:try{InetAddress address = InetAddress.getByName(“172.16.2.0”);// Try to reach the specified address within the timeout// periode. If during this periode the address cannot be// reach then the method returns false.boolean reachable = address.isReachable(10000);System.out.println(“Is host reachable? ” + reachable);} catch (Exception e){e.printStackTrace();}My issue is that no mat
Tibor
windows-7 ping google-public-dns
I have a weird problem on my Windows 7 (x64) computer. I seem to cannot ping the Google Public DNS on one of its addresses (while the other works fine). The peculiar thing is that it fails with the General failure. error message which usually means that there is a problem with a network adapter/base connectivity and not a timeout as one would expect.I checked my routing tables for any anomalies and I even flushed them but the problem seems unrelated. All the other hosts I tried ping fine (either
Hannes
vlan linux-networking ping gateway arp
contextThere are 2 servers: server1 – eth0 10.129.76.16eth0.2 192.168.0.103server2 – eth0 10.129.79.1eth0.2 192.168.62.101The 192.x.x.x addresses are connected to the same vlan (vlan2) and are able to see eachother. The 10.x.x.x addresses are connected to different vlan’s which are not able to see eachother.on request of David Swartz: the routing table on server 1 is:~$ sudo route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.129
Kara
php ping
so I got this code together to ping the Online Player Count/Max Player Slots for my server. I think I’ve got everything done correctly, but this error occurs…any suggestions on how to fix it? Here is the error: Parse error: syntax error, unexpected ‘<‘ in /home/u7335206/public_html/mc-vr.com/pc.php on line 21Here is my code:<?php require “MinecraftQuery.class.php”;// Variables for each of your servers: $server_info = array();try { // Getting Server Info: $query = new MinecraftQuery();
user2524219
php sitemap ping success
I have a php script that creates an xml sitemap. At the end, I useshell_exec(‘ping -c1 www.google.com/webmasters/tools/ping?sitemap=sitemapurl’);to submit the updated sitemap to Google Webmaster tools.Having read the Google documentation, I’m unsure whether I need to do this each time or not. Entering the link in the code manually, results in a success page from google, but using the ping command I receive no confirmation. I would also like to know if there is any way of checking if the command
Braiam
bash ping output
I’m trying to write a simple script to monitor my network status, without all of ping’s output:ping -q -c 1 google.com > /dev/null && echo online || echo offlineThe problem is that when I’m not connected, I’m still getting an error message in my output:ping: unknown host google.com offlineHow can I keep this error message out of my output?
Hauke Laging
shell-script scripting ping
I would like to be able to have a script that will:look at a list of IP addresses Ping one of the addresses Take the data and drop it in to a file Move on to the next IPSo far I have:cd /Path/to/addressees || exit 1 for targethost in a b c; do{ping {targethost}echo $’\n'”finished:} >”$log_file” 2>&1 doneWhen I run this I receive the errors:./ping_address: line 3: cd: /path/to/ip_adress: No such file or directory ./ping_address: line 7: unexpected EOF while looking for matching `”‘ ./
???
java ping bufferedreader runtime.exec
I managed to modify a program to ping peer computer and gets the ping counts. How can I parse out the time = ?ms from the ping count results, in real-time?Code:public static void main(String[] args) {String ip = “192.168.1.1 -n 10”;String pingResult = “”;String pingCmd = “ping ” + ip;try{Runtime r = Runtime.getRuntime();Process p = r.exec(pingCmd);BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));String inputLine;while ((inputLine = in.readLine()) != null) {System
user2524219
php sitemap ping success
I have a php script that creates an xml sitemap. At the end, I useshell_exec(‘ping -c1 www.google.com/webmasters/tools/ping?sitemap=sitemapurl’);to submit the updated sitemap to Google Webmaster tools.Having read the Google documentation, I’m unsure whether I need to do this each time or not. Entering the link in the code manually, results in a success page from google, but using the ping command I receive no confirmation. I would also like to know if there is any way of checking if the command
TallPaul
python return success
In general, let’s say you have a method like the below. def intersect_two_lists(self, list1, list2):if not list1:self.trap_error(“union_two_lists: list1 must not be empty.”)return Falseif not list2:self.trap_error(“union_two_lists: list2 must not be empty.”)return False#http://bytes.com/topic/python/answers/19083-standardreturn filter(lambda x:x in list1,list2)In this particular method when errors are found, I would not want to return the empty list in this case because that could have been the
ire_and_curses
open-source analytics metrics success
I’m curious to know what metrics open source project members track. Small projects may not bother with tracking any numbers, but I assume that active projects would track some numbers. There are two types of metrics I’m interested in:Internal development metrics – e.g. from the issue tracker or other development tools. External metrics – number of downloads, number of visitors to project site, etc.I would like to know if there are other useful metrics to track an OSS project.
JFK
javascript jquery ajax fancybox success
I am trying to craft an AJAX form to display a success/failure/share message via a Fancybox once a user submits their email address on a form. Currently, the code throws the response up to the top of the page.I have attempted a few variations from other answers provided here here, and here on stackoverflow, but to no avail, as upon insertion the entire form ceases to load. :SI shall be eternally thankful for any guidance anyone may provide.My current init.js is as follows:$(“#form”).submit(funct
Andy
ajax callback jsonp odata success
I’m developing an application for Netflix using their OData API. I’ve followed Stephen Walther’s blog entry on how to query the OData API. In it, he uses the following code:$.ajax({dataType: “jsonp”,url: query,jsonpCallback: “callback”,success: callback }); In my application, I need to use the OData’s paging links, to retrieve the full listings. My code is as follows:// create url and handle ajax call to Netflixfunction getTitles() {query = “http://odata.netflix.com/v2/Catalog” // netflix odata
Adrian
jquery xml ajax success
I’m trying to learn JQuery – and I have a small problem with ajax. I’m trying to populate a javascript array with values returned from an XML response from a page. Here’s my main page (ajax.html):<html> <head> <script type=”text/javascript” src=”jquery/jquery.js”></script> <script type=”text/javascript” src=”jquery/fiber.js”></script> </head> <body> <p>Ajax</p> <script> var ringType = new Array();</script> </body> <
user1279526
jquery ajax jquery-ajax file-upload success
I’m using jquery to upload images to a joomla site, but have problems with the file ajaxfileupload.js. The images upload just fine, but the function in “success” doesn’t get called. And I need it to work to show a confirmation that the upload is finished. I have tried using “complete” instead of “success” and then the code works, but it refreshes the page over and over agian. How can I make it work like it should? Here’s the code..upload: function (a) {if (jQuery(“#Filedata-” + a).val() == “”) {
plutov
php jquery ajax success
On server I am returning an array after some operations. I want to work with this array after successing of AJAX.var addPaymentType = function(){var data = new Object()data[“function”] = “add”;data[“payment_type_id”] = $(“#payment_types”).val();data[“data”] = $(“#saveform”).serializeArray();$.ajax({type: “POST”,url: location.href,data: data,dataType: “JSON”,success : function (data){console.debug(data[‘plan_pt_id’]);}}); };But data[‘plan_pt_id’] is undefined. If I return not an
EagleFox
c# ajax json extjs4 success
This is the json result I get from my controller{“data”:”Sunday”}so the data can say anything from Sunday, Monday and so on…On success I want to do this in ajax callsuccess: function(Response){var myresponse = Response.data;alert(myresponse); }it’s giving me undefined…
Web site is in building