Dev Shed Forums http://forums.devshed.com/ Dev Shed - Open Source web development forums. Topics covered include PHP, Apache, mySQL, Zope, Jserv, Java, Python, Zend, XML, DHTML, Javascript and more. en Fri, 22 Sep 2017 05:49:58 GMT vBulletin 60 http://forums.devshed.com/images/misc/rss.png Dev Shed Forums http://forums.devshed.com/ Urgent help require - Google webmaster showing less url submitted http://forums.devshed.com/search-engine-optimization/979074-urgent-help-require-google-webmaster-url-submitted-new-post.html Fri, 22 Sep 2017 04:08:29 GMT Hello webmaster, We have google webmaster tool, I update it weekly, We have more than 14000+urls submitted in google and indexed 11000+, But today I saw submitted urls 1469 indexed urls 11722 Why google showing less submitted urls as we have 14000+ actual urls in sitemap Hello webmaster,

We have google webmaster tool, I update it weekly, We have more than 14000+urls submitted in google and indexed 11000+, But today I saw
submitted urls 1469
indexed urls 11722

Why google showing less submitted urls as we have 14000+ actual urls in sitemap ]]>
Search Engine Optimization Ramaner http://forums.devshed.com/search-engine-optimization-108/urgent-help-require-google-webmaster-url-submitted-979074.html
what do you know the name of this control ? http://forums.devshed.com/net-development/979073-name-control-new-post.html Fri, 22 Sep 2017 02:08:11 GMT You see attached image. Do you know what controls in the control image that of Devexpress (red zone) ? you see attach file File sharing and storage made simple (http://www.mediafire.com/view/azxg6ai2px8b12a/Thuvienanh.jpg) You see attached image. Do you know what controls in the control image that of Devexpress (red zone) ? you see attach file File sharing and storage made simple ]]> .Net Development dongtrien http://forums.devshed.com/net-development-87/name-control-979073.html Can someone explain this expression? http://forums.devshed.com/regex-programming/979072-explain-expression-new-post.html Fri, 22 Sep 2017 02:06:31 GMT ^\s{2}.*$ ^\s{2}.*$ ]]> Regex Programming KrishC http://forums.devshed.com/regex-programming-147/explain-expression-979072.html list index out of range http://forums.devshed.com/python-programming/979071-list-index-range-new-post.html Thu, 21 Sep 2017 23:12:57 GMT I'm writing a program to find all of the prime numbers in a given range, and display them evenly through rows and columns, but I recently am stuck needing literally one if-statement and for some reason, I'm just blanking out.

Right before the "print(primes[row + 56 * col], "\t", end = "")" line, I need an if-statement. There are 556 elements in the list, and my table is 56 rows * 10 columns, which is 560. I need a way to just print out the last column even if the last lines in it have blank rows.

Code:

def findPrimes(n):
    """ Return a list of prime numbers between 1 to n. """
    prime_list = [2]
   
    for number in range(3, n, 2):
        if all(number % i != 0 for i in range(2, int(number ** .5) + 1)):
            prime_list.append(number)
           
    return prime_list

def displayTable(n):
    """ Makes a table of rows and columns to display a list. """
    primes = findPrimes(n)
    rows = 56
    columns = 10

    for row in range(rows):
        for col in range(columns):
            print(primes[row + 56 * col], "\t", end = "")
        print()

displayTable(4027)

# statistics
print("\nThe number of primes in the given range is: " + str(len(findPrimes(4027))))

]]>
Python Programming forumer444 http://forums.devshed.com/python-programming-11/list-index-range-979071.html
<![CDATA[Replace ' with " in text files]]> http://forums.devshed.com/regex-programming/979070-replace-text-files-new-post.html Thu, 21 Sep 2017 18:53:10 GMT I have 100's of lines of code such as these...

language("A","BUYER","WQUERYON",padr('Query On ',langwidth),"R",STA_DISPLANG) +" "+;
{|| language("A","BUYER","WPREMKICK",padr('Premium Kicker',langwidth),"R",STA_DISPLANG) } ;
language("A","BUYER","WSURCHARGE",padr('Surch/Disc.',langwidth),"R",STA_DISPLANG) ;

I need to replace all the single quotes in:

padr('Query On ',

with double quotes.

I don't want to change any other single quotes in the code except those occurring within the padr()

the length of the text between the two quotes is variable.

I'm using Multi-edit as my editor, so this is a one time search and replace. it has regex built-in..

I can use regular, UNIX or perl regex expressions.

please help before all my hair turns gray..:chomp::chomp: ]]>
Regex Programming bwolfsohn http://forums.devshed.com/regex-programming-147/replace-text-files-979070.html
Best Method for Obscuring Email Address from Spam Bot Scrapers? http://forums.devshed.com/javascript-development/979069-method-obscuring-email-address-spam-bot-scrapers-new-post.html Thu, 21 Sep 2017 18:02:29 GMT What's the best method out of these three to hide an email address yet still have it function but still display the correct email address to the user and have it function as a mailto: link when clicked on? (Using Wordpress site in this case)

2A. USING THE ‘ONCLICK’ EVENT

You can create a regular mailto hyperlink for your email address but replace some of the characters – like the dot and the @ sign – with text. Then add an onclick event to this hyperlink that will substitute the text with the actual symbols.

<a href = "mailto:johnATgmailDOTcom"
onclick = "this.href=this.href
.replace(/AT/,'@')
.replace(/DOT/,'.')"

Contact Me
2B. RANDOM ARRAY

Split your email address into multiple parts and create an array in JavaScript out of these parts. Next join these parts in the correct order and use the .innerHTML property to add the email address to the web page.


WORDPRESS + PHP
If you are on WordPress, you can also consider using the built-in antispambot() function to encode your email address. The function will encode the characters in your address to their HTML character entity (the letter a becomes a and the @ symbol becomes @) though they will render correctly in the browser.

<?php echo antispambot("john@abc.com"); ?> ]]>
JavaScript Development consultant1027 http://forums.devshed.com/javascript-development-115/method-obscuring-email-address-spam-bot-scrapers-979069.html
Content Marketing Strategy http://forums.devshed.com/search-engine-optimization/979066-content-marketing-strategy-new-post.html Thu, 21 Sep 2017 10:48:56 GMT Content Marketing is a best plan to market your brand and improve lead generation and your business as well. To know more of content marketing just follow this link (https://www.vps9.net/blog/content-marketing-makes-marketing-matter/). Content Marketing is a best plan to market your brand and improve lead generation and your business as well.
To know more of content marketing just follow this link. ]]>
Search Engine Optimization Merry J http://forums.devshed.com/search-engine-optimization-108/content-marketing-strategy-979066.html
EJB Bindings - Class Cast Exception http://forums.devshed.com/java-help/979065-ejb-bindings-class-cast-exception-new-post.html Thu, 21 Sep 2017 09:57:18 GMT Hi,

i'm having an issue with EJB bindings which i can not resolve. To make it short, i have one project which is deployed several times (political manner), so i do have EJBs with the same name.
I found 2 solutions, 1) defining a custom property on the JVM (which is not allowed internally) for long-form names, and 2) defining a binding file "ibm-ejb-jar-bnd.xml".

I have tried to replicate what this file does, and "hard code" the bindings directly on the application instance. While accessing the context-root, i get a ClassCastException :
Code:

DefaultDispat E com.opensymphony.xwork2.util.logging.commons.CommonsLogger error Exception occurred during processing request: Cannot cast class my.project.ejb.service.EJSLocal0SLCartService_14538494 to interface my.project.ejb.service.ICartService
java.lang.ClassCastException: Cannot cast class my.project.ejb.service.EJSLocal0SLCartService_14538494 to interface my.project.ejb.service.ICartService
at java.lang.Class.cast(Class.java:2632)
...

To distinguish between the instances that will be installed, i set a variable during compiling with Maven. So, the bindings will be adapted.

Local:
Code:

@Local
public interface ICartService {

Implementation:
Code:

@Stateless
public class CartService implements ICartService{
@EJB
private IAuditTrailService auditTrailSvc; // Other EJB

I do EJB injection. Can not use InitialContext as the bindings will be different from instance to instance.

Code:

binding file "ibm-ejb-jar-bnd.xml":
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar-bnd
xmlns="http://websphere.ibm.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-ejb-jar-bnd_1_0.xsd"
version="1.0">

<session name="CartService" simple-binding-name="ejb/app1/ICartService"/>
</ejb-jar-bnd>

I'm using EJB 3.1, Java 7, WAS 8.5.

Can somebody help me out ?

(I can change the application like i want, but do not have the possibility to change any configuration on the production server.)

Thanks ! ]]>
Java Help mike.figo http://forums.devshed.com/java-help-9/ejb-bindings-class-cast-exception-979065.html
Ctrlswitches : Fully Managed Dedicated Servers with Round-the-clock support http://forums.devshed.com/web-hosting-offers/979064-ctrlswitches-managed-dedicated-servers-round-clock-support-new-post.html Thu, 21 Sep 2017 09:48:41 GMT * Fully Managed Dedicated Servers by Ctrlswitches (https://www.ctrlswitches.com)* Performance driven managed dedicated servers (https://www.ctrlswitches.com/fully-managed-dedicated-servers), tailor-made hosting solution to meet your website requirements. All dedicated servers are Linux or Windows built, based on which flavor you choose. Linux Server is packaged with Free cPanel/WHM Panel... Fully Managed Dedicated Servers by Ctrlswitches

Performance driven managed dedicated servers, tailor-made hosting solution to meet your website requirements.

All dedicated servers are Linux or Windows built, based on which flavor you choose. Linux Server is packaged with Free cPanel/WHM Panel or Plesk Panel. Windows Server is bundled with Plesk Control Panel.

Dedicated Hosting Highlights
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Free SSD Cached RAID-10 HDD`s
* Free Domain Reseller account
* Jailed SSH Access
* Free cPanel/WHM Panel Access
* Unlimited FTP Accounts
* Supports Multiple PHP 5 versions
* Unlimited Email Accounts
* Easily Scalable Solutions
* Unlimited Individual cPanel Sub-Accounts

Best Single Core Servers Plan
`````````````````````````````
PLAN NAME : Startup Servers
CPU / SERVER : HP DL120G7 Intel G850
SSD : 2x1TB SATA2
RAM : 4 GB
NETWORK LINE : 100 Mbps
BANDWIDTH : 10 TB
PRICE : $ 139 /mo.
BUY SERVER NOW

Best Dual Core Servers Plan
`````````````````````````````
PLAN NAME : High Storage Servers
CPU / SERVER : HP DL180G6 2x Intel Xeon E5620
SSD : 4x1TB SATA2
RAM : 8 GB DDR3
NETWORK LINE : 100 Mbps
BANDWIDTH : 10 TB
PRICE : $ 240 /mo.
BUY SERVER NOW

Best Quad Core Servers Plan
`````````````````````````````
PLAN NAME : Enterprise Quad Servers
CPU / SERVER : Dell R910/4x Intel Xeon E7-4820
SSD : 2x300GB SAS 15k 2,5"
RAM : 32GB DDR3
NETWORK LINE : 100 Mbps
BANDWIDTH : 10 TB
PRICE : $ 899 /mo.
BUY SERVER NOW

> Explore more on Managed Dedicated Server Plans <

Addons
```````````
R1Soft CDP Backup Agent - 20 GB $26 /mo.
Kemp LM-2400 - $225 /mo.
Cisco ASA 5515 - $225 /mo.
IPMI/KVM Access - $15 /mo.

Payment Gateways Accepted : paypal, payza, payu, banktransfer, bitcoin.


Contact the Expert support : Live Chat | Email | Support ticket.


Thank You. ]]>
Web Hosting Offers ctrlswitches http://forums.devshed.com/web-hosting-offers-100/ctrlswitches-managed-dedicated-servers-round-clock-support-979064.html
<![CDATA[(something about django - don't hijack php threads!)]]> http://forums.devshed.com/python-programming/979067-django-dont-hijack-php-threads-new-post.html Thu, 21 Sep 2017 09:25:56 GMT I am trying to make a site where i can divide the site into different member categories like admin,moderators,helpers,users,etc with their own functionalities ... I have once used the Django framework, so my question is can i be able to do this task also using Django again, i mean, can Django fulfill this task's requirements easily so i may not need to roam to other languages or frameworks for this particular task?

P.S.: I know php(framework like laravel or others)can do this task but i was just trying to implement Django since i have used it once already. OR do you recommend frameworks like Rails(i have heard a lot about it specifically on field of web-development,can it do this task). ]]>
Python Programming hirephp http://forums.devshed.com/python-programming-11/django-dont-hijack-php-threads-979067.html
Keeping Bootstrap Modal Open And Open On Page http://forums.devshed.com/html-programming/979063-keeping-bootstrap-modal-page-new-post.html Thu, 21 Sep 2017 08:15:16 GMT Hi;

I use Bootstrap modal and want it to be open on page load.

I open it with this
Code:

$( document ).ready(function() { 
$('#login-modal').modal('show');
});

Currently, when I click anywhere on the page, it closes the modal. I don't want the user to be able to close it. Basically, I wanna make it compulsory to fill the
form inside the modal or leave the page.

How can I achieve that?

Thanks ]]>
HTML Programming English Breakfast Tea http://forums.devshed.com/html-programming-1/keeping-bootstrap-modal-page-979063.html
How to pass private test Cases ? http://forums.devshed.com/programming/979062-pass-private-test-new-post.html Thu, 21 Sep 2017 07:13:12 GMT I have written a program to find the factorial of a non-negative numberI it will be passed as the first command line parameter ) .I have to write the output to stdout formatted as an integer Without any other additional text assuming that You may assume that the input integer will be such that the output will not exceed the largest possible integer that can be stored in an int type variable... I have written a program to find the factorial of a non-negative numberI it will be passed as the first command line parameter )
.I have to write the output to stdout formatted as an integer Without any other additional text assuming that You may assume that the input integer will be such that the output will not exceed the largest possible integer that can be stored in an int type variable
.My code is

Code:

# include<stdio.h>
 # include<stdlib.h>
 int main( int argc , char *argv[])
 { int fact,i,n;
 fact=1;
 n=atoi(argv[1]);
 if(n==0)
  fact=0;
 else
 { for(i=1;i<=n;i++)
  { fact=fact*i;
    }
 }
printf("%d",fact);
}

I am running this code on a portal . There are 4 test cases 1 public test case and 3 private test cases . With this code I have successfully passed all the test cases except for 1 private test case . I want to know what are private test cases and how do I find out that what have I missed in my program ? ]]>
C Programming NanCruise http://forums.devshed.com/programming-42/pass-private-test-979062.html
10% OFF On Cheap Canada Cloud Linux VPS - Hostripples India! http://forums.devshed.com/web-hosting-offers/979061-10-cheap-canada-cloud-linux-vps-hostripples-india-new-post.html Thu, 21 Sep 2017 05:46:51 GMT The VPS Cloud models are ideal for hosting professional production environments or critical applications. A hardware SLA is just one of the guarantees in place to provide you high availability and stable service right from the word go. *CLOUD LINUX PLAN 1 - Rs 1500/Month* Guaranteed RAM : 2 GB HDD : 25 GB Raid 10 Bandwidth : Unlimited traffic CPU Cores : 1 vCores Root Access : YES ... The VPS Cloud models are ideal for hosting professional production environments or critical applications. A hardware SLA is just one of the guarantees in place to provide you high availability and stable service right from the word go.

CLOUD LINUX PLAN 1 - Rs 1500/Month
Guaranteed RAM : 2 GB
HDD : 25 GB Raid 10
Bandwidth : Unlimited traffic
CPU Cores : 1 vCores
Root Access : YES
IPv4 : 1 IP
IPv6 : 1 IP

BUY NOW!

CLOUD LINUX PLAN 2 - Rs 2500/Month
Guaranteed RAM : 4 GB
HDD : 50 GB Raid 10
Bandwidth : Unlimited traffic
CPU Cores : 2 vCores
Root Access : YES
IPv4 : 1 IP
IPv6 : 1 IP

BUY NOW!

CLOUD LINUX PLAN 3 - Rs 3500/Month
Guaranteed RAM : 8 GB
HDD : 100 GB Raid 10
Bandwidth : Unlimited traffic
CPU Cores : 4 vCores
Root Access : YES
IPv4 : 1 IP
IPv6 : 1 IP

BUY NOW!

Why choose Hostripples?
Maximum uptime
Easy usability
Value for money
High performance
24 x 7 customer service
Unmatched server performance


Visit:- Cheap Canada Cloud Linux VPS

It’s not that we are bragging about our services, our customers say it all!

Hurry up and get Hostripples – the one-stop solution for your web hosting requirements!

Hostripples - Affordable web hosting
Hostripples.in Cheap Hosting | Unlimited Bandwidth | Unlimited Space | Domain Name Registration

Connect with us: Facebook | Twitter | LinkedIn

Hostripples - Affordable web hosting
http://hostripples.in/
http://hostripples.com/
http://hostripples.co.uk/
https://myhostseo.com/
Hostripples.in Rs.35 Unlimited Hosting ]]>
Web Hosting Offers hi5s2arp http://forums.devshed.com/web-hosting-offers-100/10-cheap-canada-cloud-linux-vps-hostripples-india-979061.html
Calculate Compount Interest in Python http://forums.devshed.com/python-programming/979060-calculate-compount-python-new-post.html Wed, 20 Sep 2017 21:04:19 GMT Can some one help me with Compount interest program in python ? Here are my specs: User will input amount of initial deposit. They will also enter the number of years they want the CD for. The program will then ask the user if they are sure on the length of time chosen before continuing on. The application will print out each year’s interest accrued and have a running total of amount... Can some one help me with Compount interest program in python ?

Here are my specs:

User will input amount of initial deposit.
They will also enter the number of years they want the CD for.
The program will then ask the user if they are sure on the length of time chosen before continuing on.
The application will print out each year’s interest accrued and have a running total of amount in the CD.
The interest for this program will be compounded only once a year.
Depending on the length of their deposit, they will have a different interest rate.
The interest rates are below

CD Rates

1 year 1.15%
2 year 1.3%
3 year 1.5%
4 year 1.6%
5 year 1.85%
6 year 1.9%
7 year 1.95%
8 year 2.00%
9 year 2.15%
10 year 2.3 %

At the end of the CD’s term, it will display a sum of all interest accrued and total amount that is in the CD account.

any help is highly appreciated ]]>
Python Programming soumya123 http://forums.devshed.com/python-programming-11/calculate-compount-python-979060.html
Are there ad companies that advertise Android applications for free? http://forums.devshed.com/android-development/979059-ad-companies-advertise-android-applications-free-new-post.html Wed, 20 Sep 2017 17:05:21 GMT *Do you have companies that make free advertising to your app as a test or somthing like that? * Do you have companies that make free advertising to your app as a test or somthing like that?
]]>
Android Development HamzahAbdoh http://forums.devshed.com/android-development-165/ad-companies-advertise-android-applications-free-979059.html