hi i was going to start leaning php and i cant setup a server is there a good emulator that will show me what im writing without having to run or be part of a server
Does anyone knows if it is possible to define/declare on your own custom attribute a restriction to the field type it may apply on?
There are a flags that do restrict the usage of the attribute:
[AttributeUsage(
AttributeTargets.Property,
AllowMultiple = false)]
Im looking for something like:
UseOnlyOnType = typeof(string)
Any ideas?
do you got the solution for your problem ?
im working on the exact same thing and cant get it to work...
if u could post the solution, it would be much appreciated :o
greetingz
msn: [email protected]
steam : [email protected]
as title said, Im trying to change only the first occurrence of word.By using
sed 's/this/that/' file.txt
though i'm not using g option it replace entire file. How to fix this.?
UPDATE:
$ cat file.txt
first line
this
this
this
this
$ sed -e '1s/this/that/;t' file.txt
first line
this // ------> I want to change only this "this" to "that" :)
this
this
this
Im using linq-sql .I have 3 tables. e.g
Project, People and a ProjectsPeople(fk's ProjectID and PeopleID) (junction) Table.
given a set of peopleIDArray (an array of ints as people ID's)
how can i get only Projects that have atleast one of the peopleId's associated with them?
i.e there will be atleast one (may be more) record in the ProjectsPeople table that will have a ProjectId and an id from the peopleIDArray )
thanks
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.
Hi all,
In my project im using numeric up down extender, when i run my program numeric up down extender was displayed in firefox but not in Internet explorer 8. Give me a solution.
I dont see any direct mention on using multiple slugs (or any behavior for that matter) for single model. Is there a way to use the sluggable behavior to generate two separate slugs for a model?
For example i need to generate two slugs for every record a product_id consisting of a slugified company name and sku and a distributor_id consisting of a different slugified company name.
Obviously i could write this myself fairly easily, im just wondering if this can be done quickly with Sluggable.
Im using following CSS to set a background-image for my menu
#menuContainer
{
background:url('../images/main-bg.png') repeat-x;
}
My CSS is inside
~/styles/site.css
and my image is inside
~/images/main-bg.png
The problem is this works perfectly in Chrome but it's not working in Firefox.
But if change the URL to
#menuContainer
{
background:url('images/main-bg.png') repeat-x;
}
It starts working in Firefox and in Chrome it doesn't work.
Can anyone please help?
Hello Im currently writing a product syncronisation script for magento. I know how to add a new product with a given atribute set. However one of the atributes i am using is a size field. When a new size is encounterd I want to add this option to the attribute, I am wondering how to do this please?
id like it so when i check out a file no one else can edit it until i check it back in. is there a version control that allows me to do this? i currently use subversion and i know it has the 'lock' feature but i want it to do that automatically without me having to request it on each file im working on.
Ok what i need is help..haha ok im making a music app with a paino but i need to be able to hold the sound long or short. So like if i hold a button it will start playing the sound but if i let go it stops WITH A FADE so how ever long i hold the button down that is how long the sound will play (that is ntill the sound ends)
Hi there,
Im developing a 3d Viewer in vb.net and xna. Its working very well.
I have now a windows form and a xna render window, but i would like to render it inside a panel in the windows form.
I have searching for info, but its so hard to addapt it into my application.
How can i do it?
Here is the application
Thank you.
Image: img299.imageshack.us/img299/384/87117064.jpg
Im using c# .net windows form application. I have two comboboxes A and B .I have pouplated A with some values. Now if i select any one value from A, I should be able to populate B with all the items of A except the selected item .
I have a swc(degrafa) that I have been referencing externally in another folder on my computer. When I tried to move the swc to the libs folder I was no longer able to access the swc from my application. Is there a step im missing?
I am trying to split up a string by caps using Javascript,
Examples of what Im trying to do:
"HiMyNameIsBob" -> "Hi My Name Is Bob"
"GreetingsFriends" -> "Greetings Friends"
I am aware of the str.split() function, however I am not sure how to make this function work with capital letters.
I've tried:
str.split("(?=\\p{Upper})")
Unfortunately that doesn't work,
any help would be great.
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?
Hi all, im trying to get image size(DIMENSIONS) of hundreds of remote images and getimagesize is way too slow. ive done some reading and found out the quickest way would be to use get_file_contents to read a certain aount of bytes from the images and examining the size within the binary data. Anyone attempted this before? How would i examine different formats. Seen any library for this? please let me know
hi. im new in MATLAB.
i think its a simple question.
i want:
a=1.154648126486416
to become
a=1.154
and not
a=1.54000000000
how do i do that without useing format('bank').
thanks.
Hi! I am trying to make app that displays an RSS feed, with text and images into a table, but I am really struggeling with it!
I found a really good [sample code-project][1] that i can really recommend-- but im struggeling getting it to display images in the tablecells instead of only text
I would be reeeeally happy with any help!!
Thanks
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 :)
I have a url which looks like this
https://test.high.com/people/11111111-name-firstname-_custa/deals/new
Now i need to match document.URL
if im on that Page if so i will alert a message.
The important part is /deals/new
How can i match that in Javascript?
Hi,
im using $this-widgetSchema-setFormFormatterName('list'); this way
below to render my form as a list but it is still a table. Any idea?
public function configure()
{
parent::configure();
$this->widgetSchema->setFormFormatterName('list');
}
}
Any idea?
Javi