How can i create a vanity url in codeigniter. Im having real trouble doing this in the framework. And there doesnt seem to be any good answers out there.
im trying to check if a given list is a subsequence of another list:
here are example of lists which gives true:
subseq "" "w"
subseq "w" "w"
subseq "ab" "cab"
subseq "cb" "cab"
subseq "aa" "xaxa"
not (subseq "aa" "xax")
not (subseq "ab" "ba")
i just come to this but in some cases it gives a wrong result
subseq :: Eq a => [a] -> [a] -> Bool
subseq [] [] = True
subseq [] ys = True
subseq xs [] = False
subseq (x:xs) (y:ys) = x == y || subseq xs ( 1 `drop` ys )
I am creating a booking module using MOSS 2007.What i would like to know is that is it possible to create a webart that will show only the Daily view ,which will be connected to the central Calender..
Basically what im trying to achieve is this.
Each Room must have its own webpart that shows the bookings only associated with that room,so ultimately you might have two rooms that are booked at 8:PM(Same Day) showing on the central Booking calender.....
Help would be appreciated
Im making an app, and i want it to make a sound when a activity is opened , the sound file is in R.raw.sound_file , if someone could do some example code to make my app play a sound that would be great :)
Im using updatepanel in my screen..
i have 2 pages
when i click submit button in page1 then it ill be redirect to page2 ....in page2 i have one back button..i wrote click event onclick="history.go(-1)"
when i click back it just redirect to page 1 but records already showned in page1 not displayed .how can i sove this problem?
cai i use any scriptmanager?
Basically what Im trying to make is a data structure where it has the users name, id, and datejoined. Then i want a "sub-structure" where it has the users "text" and the date it was modified. and the user will have multiple instances of this text.
class User(db.Model):
ID = db.IntegerProperty()
name = db.StringProperty()
datejoined = db.DateTimeProperty(auto_now_add=True)
class Content(db.Model):
text = db.StringProperty()
datemod= db.DateTimeProperty(auto_now_add = True)
Is the code set up correctly?
I've a model called broadcastinfo, It has fields viz.. info,userid...userid is excluded. when i add an new info, my broadcastinfo table should get the records of all userid from user table and the given message. Im trying this via signal.Any idea is highly appreciated.
Thanks
Im trying to get the redirect link from a site by using curl -I then grep to "location" and then sed out the location text so that I am left with the URL.
But this doesn't work, it will outputs the URL to screen and doesn't put it
test=$(curl -I "http://www.redirectURL.com/" 2> /dev/null | grep "location" | sed -E 's/location:[ ]+//g')
echo "1..$test..2"
Which then outputs:
..2http://www.newURLfromRedirect.com/bla
Whats going on?
Hi, im just writing my own replace method for any weird characters and i used the ASCI value 0, null to replace unwanted characters, i was hoping for them to be 'deleted', but this doesnt work. A gap just appears in the string.
What exactly does String.Replace() do when removing a character for ""? Does it shift them all down and then 'delete' the final character or something?
I am updating a website to add some mobile friendly pages.
At the moment we have one big css page with everything in. My idea is to put all the mobile specific css into a separate file and then link both sheets. The mobile css will overide anything in the default css (bigger buttons etc).
Im quite new to css, what is the best practice?
Hi,
i have this code:
if(sfContext::getInstance()->get('form_signin')){
//...
}
but im getting this error:
The "form_signin" object does not
exist in the current context.
Any right way to check if a variable saved in sfContext is set or not ?
Regards
Javi
im using netbeans to code a web application with symfony.
it seems that netbeans doesnt support symfony in auto completion.
could one fix this problem.
cause i want to be able to click on symfony's functions and get to the source, eg helper function and model methods and classes.
Im using c# .net windows form application. i have a SQL database with 5 tables. i need to populate a combobox with these table names. only names should be displayed.
I am using OSX 10.6 and it has cron built in. How can I write a cron job that will block my internet from 7pm to 7am every day?
Im sure this must be simple but I could only find one example online and it didn't work. It said to:
set /etc/hosts.allow flie to
be empty
set hosts.deny file to
ALL : ALL
I did this and google still came up.
Hi All,
I have multiple letters in html format in a folder and im list those letters in the gridview on ASP.NET page if user select couple of letters and click print i should me those letters
Now Question is how to print multiple html files on the event of button click.
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
if(petDetails.getDateOfDeath() != null){
String formatedDateOfDeath = formatter.format(petDetails.getDateOfDeath());
String formateDateOfBirth = formatter.format(petDetails.getDateOfBirth());
}
How can i calculate the age of death from the above. I dont want to use any externallibraries
EDIT: please look at what I've got so far.none of the other threads are like mine. most of them are about date from DOB to today and not in the format im using.
All I want to do is on .click() is .animate #slip, essentially Im changing the css at the moment from top: 10px to top: 0px
Instead of it being quite clunky i'd like to animate the movement on the change of CSS.
Currently use .toggleClass to achieve this:
$("#div1").click(function() {
$("#div2t").toggleClass('min');
});
How can I check if a user exists?
Im doing an installer for a mysql database, and I need to check if a user exits, if not create user, if yes delete user and create it again.
this so i can execute the script without worries.
thanks.
Hey all,
im building a webshop in Drupal and i was wondering if you could help me with the following problem:
I got one big image frame (500x500) and 5 little image thumbnails(95x95) underneath the big one.
How can i realise that if the visitor clicks on the thumbnail, the big image frame gets filled with that specific image?
I have a big problem. I want get information with an webservice in one URL.
But I'mm getting this error:
XMLHttpRequest cannot load ht*p://external_url_that_i_trid_to_get.
Origin ht*p://localhost:8888 is not allowed by Access-Control-Allow-Origin.
Im using this:
$.get(url_parsed,date_get,function(data) {
if (data.result == 'sucess') {
alert(data.data["title"]);
}
},"json");
How I can resolve this? Regards
Hey guys
how can i query my mysql database and fetch rows which are posted in earlier 3 days
i know how to fetch todays's rows but not 3 days ago
time will save in my table like this :
2010-01-20 19:17:49
and this is what i know :
SELECT id FROM pages WHERE date=now()
but i need to show posts in 3days
and im looking for a simple and straight solution ,because i know how to do so in long php codes
Im using tinymce for text formating. I have html code like <span class="ps_bonus_text_wide_t" style="font-family: Michroma;">my text</span>. when i select that text and class="ps_bonus_text_wide_t" i need to change it to <div class="effect"><span class="ps_bonus_text_wide_t" style="font-family: Michroma;">my text</span></div>. How i can to verify class="ps_bonus_text_wide_t" ?