why some thing like this
url="http:/"+"www.pathname.com"+"/"+"anotherString";
turns into http://www.pathname.com/anotherString.
Notice the // after the http:.
This shows how to have a static variable inside an object or context:
http://www.mail-archive.com/[email protected]/msg04764.html
But the scope is too large for some needs, is it possible to have a static variable inside an object function ?
Hi,
I'm working on a Rewriterule in order to have URLs like these: http://www.myhost.com/var1/var2/
RewriteRule ^(.*)\/(.*)\/$ index.php?var1=$1&var2=$2 [L]
What I would like to add is that when someone types myhost.com/var1/var2 (without the end slash), it still goes to the same page.
Is there a better way to do it than this?
RewriteRule ^(.*)\/(.*)\/$ index.php?band=$1&song=$2 [L]
RewriteRule ^(.*)\/(.*)$ index.php?band=$1&song=$2 [L]
1 and I've uploaded all the files onto the file server that I am using 000webhost.com however Im having a few problems with the modrewrite I keep getting re-directed to http://error404.000webhost.com/?
Does anyone know how to setup cakephp 2.1 on a shared area??
Im getting this error now: Fatal error: Call to undefined function pluginsplit() in /home/a4300629/public_html/lib/Cake/Cache/Cache.php on line 151 not really sure how this error has come about, any ideas?
Thanks in advance.
how i can handle this url in my website who is developed in mvc2
website.com/topic
website.com/topic/topic
are you give me some code to learn url routing in mvc
HI, I need to remove a querystring when a user clicks a particular LinkButton.
So for example if the querystring is http://UserProfileManager.com?UserID=1234 .... when the user clicks on the Linkbutton, I want the url to be http://UserProfileManager.com. The issue is that everything is on one page, and I am using
Any ideas would be appreciated.
I am trying to find a code that will do a popup at the initial start up on an installed app. Much like a changelog that is starting to appear in more and more apps.
I have found some similar codes, but being a beginner I haven't been able to figure out where to exactly put the code in and I always have tons of errors that still do not work once I try and fix them.
I am working in Eclipse with an android project, and I'm using a webview to show a website.
XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_height="fill_parent" android:layout_width="fill_parent" android:scrollbarAlwaysDrawVerticalTrack="false"/>
</LinearLayout>
Java File:
package com.A2Ddesigners.WhatThe;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.view.KeyEvent;
public class Whatthe extends Activity {
WebView webview;
/** Called when the activity is first created. */
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) {
webview.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webview = (WebView) findViewById(R.id.webview);
webview.setWebViewClient(new HelloWebViewClient());
webview.getSettings().setJavaScriptEnabled(true);
webview.setInitialScale(50);
webview.getSettings().setUseWideViewPort(true);
webview.loadUrl("http://mdsitest2.com/");
}
private class HelloWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
}
Hello,
I have a blog running on wordpress with the "All in One SEO" plugin. Everything seems in order including the source code.
here's the site: mmjincolorado.com
Why does the site result show up so bare where i search "mmjincolorado.com" in google? It doesn't pick up the title or description. No other pages show up either.
Thanks so much for your help,
zeemy
Hi,
Is it possible to generate android styled javadocs for my android project (like http://developer.android.com/reference/java/lang/String.html, instead of http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html)
Is it something regarding using of some custom doclet instead of standard doclet? If yes, then which one I have to use?
Hi,
I would like to open a webpage and run a javascript function from within a java app.
For example I would like to open the page www.mytestpage.com and run the following javascript code:document.getElementById("txtEmail").value="test@hotmail.com";submit();void(0);
This works in a browser...how can I do it programatically?
Thanks!
I have a question about third party created JQuery plug ins and API's and the methodology for understanding them. Recently I downloaded the JQuery Masonry/Infinite scroll plug in and I couldn't figure out how to configure it based on the instructions. So I downloaded a fully developed demo, then manually deleted everything that wouldn't break the functionality. The code that was left allowed me to understand the plug in much greater detail than the documentation.
I'm now having a similar issue with a plug in called JQuery knob.
http://anthonyterrien.com/knob/
If you look at the JQuery Knob readme file it says this is working code:
<input type="text" value="75" class="dial">
$(function() {
$('.dial')
.trigger(
'configure',
{
"min":10,
"max":40,
"fgColor":"#FF0000",
"skin":"tron",
"cursor":true
}
);
});
But as far as I can tell it isn't at all. The read me also says the Plug in uses Canvas. I am wondering if I am suppose to wrap this code in a canvas context or if this functionality is already part of the plug in.
I know this kind of "question" might not fit in here but I'm a bit confused on the assumptions around reading these kinds of documentation and thought I would post the query regardless. Curious to see if this is due to my "newbi" programming experience or if this is something seasoned coders also fight with.
Thank you.
Edit
In response to Tyanna's reply.
I modified the code and it still doesn't work. I posted it below. I made sure that I checked the Google Console to insure the basics were taken care of, such as not getting a read-error on the library.
<!DOCTYPE html>
<meta charset="UTF-8">
<title>knob</title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/hot-sneaks/jquery-ui.css" type="text/css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js"></script>
<script src="js/jquery.knob.js"></script>
<div id="button1">test </div>
<script>
$(function() {
$("#button1").click(function () {
$('.dial').trigger(
'configure',
{
"min":10,
"max":40,
"fgColor":"#FF0000",
"skin":"tron",
"cursor":true
}
);
});
});
</script>
Hi,
i tried redirecting some folders to the subdomains with the same names as the folders. I tried this way but it didn't work:
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(test1|test2)(.*?)$ http://$1.domain.com$2 [R=301,L]
I guess the problem is that the alternation of folders doesn't return a result that i can get into $1, right?
I'm not a PCRE expert so andy help would be appreciated.
I have a website that can be accessed from www.blahblah.com and special.blahblah.com. The www site always works but occasionly I get a 'Content controls have to be top-level controls in a content page or a nested master page that references a master page' error on the special site.
It's exactly the same code running in both situations and the offending page doesn't even have a master page. Why would it work all the time on one and fail sometimes on the other?
HI, I am trying to build an certification Test engine in my website techification.com
Can any one please help me, what are the things That i need to consider before I start design and implementation.
This application will be for all the users who are willing to take Sun certification or any certifications and they can come to techification.com and take the online exam and get evaluated before they take the actual Exam.
Given a url, and a query string, how can I get the url resulting from the combination of the query string with the url?
I'm looking for functionality similar to .htaccess's qsa. I realize this would be fairly trivial to implement completely by hand, however are there built-in functions that deal with query strings which could either simplify or completely solve this?
Example input/result sets:
Url="http://www.example.com/index.php/page?a=1"
QS ="?b=2"
Result="http://www.example.com/index.php/page?a=1&b=2"
-
Url="page.php"
QS ="?b=2"
Result="page.php?b=2"
Is it possible to set a cookie for http://www.example.com from a PHP file located at https://secure.example.com? I have some code that was given to me, that appears to try and fails at this. I was wondering if this is possible at all.
I'm trying to understand what exactly the above (in my question's Title) means? This is taken directly from the SpreeCommerce.com project:
If you’re an experienced Rails developer you may be wondering where your app directory is. Spree actually runs as an embedded Rails app inside of your gem. How do you customize things then? We’ll cover that later in extensions.
Source: http://spreecommerce.com/documentation/getting_started.html
Can someone further explain what exactly it means when a Rails app is run "inside of your gem"
hey guys
i need to create a download section on my website , but as i concern , i want my users can only download files with indirect links , to prevent them from sharing my files on my server
such as :
http://mysite.com/download/12.zip
to
http://mysite.com/download/12
is there a way in php to do so ?
There is a simple way with php, a simple script or URL manipulation to build a URL for the gravatar image corresponding to an email?
Ex. http://gravatar.com/avatars/avatar.php?email=myemail@myserver.com and this return a jpeg or png image.
If there is no simple way like the example, what is the easiest way you know to resolve a url of the gravatar corresponding to an email?. Thanks
I'm trying to stop a non-css animation:
http://jsbin.com/aqute4/4/edit
Button 1 starts the animation nicely, totally lost on how to stop it though, since .stop() seems to need a DOM element... rather than a random object.
Thanks in advance.
PS: Original code comes from: http://james.padolsey.com/javascript/fun-with-jquerys-animate/
In my application (https://market.android.com/details?id=com.cabot.beastly&feature=search_result), I am using facebook-android api to login and share to Facebook. It's works fine in emulator and Samsung Galaxy Tab when i tested. But some bugs are reporting by the client, facebook login doesn't load. I think they tested in a device with Android2.1. What are the reasons to don't load facebook login Dialog?. How can i find the reason for this bug?.
Hi..
I'm working on a crawler. Usually, when i type url1 in my browser, browser converts it to url2.
How can i do this in Python?
url1: www.odevsitesi.com/ara.asp?kelime=doganin dengesinin bozulmasi
url2: www.odevsitesi.com/ara.asp?kelime=do%F0an%FDn%20dengesinin%20bozulmas%FD
has anyone find out why FriendFeed advanced search result url doesn't have not search field parameter?
some example:
contains the words field, when you inputs a text "ok" and push search, then response url is
http://friendfeed.com/search?q=ok
if you also inputs a text into words in the title field, like texts "I'm", response url is
http://friendfeed.com/search?q=ok+intitle%3Ai%27m
well, pretty beautiful. not like other site response all field even you don't push a text into.
anyone know how to make this effect?
I am trying to map an entity as following
@OneToOne(mappedBy = "localizedLabel")
@JoinColumn(insertable = false, updatable = false)
@WhereJoinTable(clause = "locale='en_US'")
public Localization getEn_US() {
return en_US;
}
I can assure that the data will return only one or null if the not found, but hibernate seems to ignore my @Where clause:
ERROR com.eventtouch.bc.business.core.log.LoggingInterceptor - org.hibernate.HibernateException: More than one row with the given identifier was found: 4211, for class: com.eventtouch.bc.business.domain.LocalizedLabel
Any ideas on ho to map a @OneToOne relationship with @Where clause?
Thanks
Hello, I need to use .htaccess file to replace a world in URL
something like this:
example URL: www.hotourism.com/banknotes/banknotes/asia/vietnam/
redirect to: www.hotourism.com/countries-banknotes/banknotes/asia/vietnam/
how can I use mod_rewrite to redirect every URL containt "/banknotes/banknotes/" to the same URL after replacing that word?