What hidden features of HTTP do you think are worth mentioning?
By hidden features I mean features that already are part of the standard but widely rather unknown or unused.
Just one feature per answer please.
Hi everyone,
I am currently working on a project and i would like my users to be able to backup/restore theirs accounts.
I am looking for a rails plugin/gem that would easily do that, ie :
current_user.backup()
= backup_file
current_user.restore(backup_file)
= database import/replace
I don't know if my question is very clear, but i would like to backup every user's related object (posts, comments, etc) and to be able to restore them from a backup file.
Thanks per advance,
Cédric.
class User
has_many :comments
end
class Comment
belongs_to :user
named_scope :recent, :order => 'comments.created_at DESC'
named_scope :limit, lambda { |limit| {:limit => limit}}
named_scope :by_unique_users
end
what would I put in the :by_unique_users so that I can do Comment.recent.by_unique_users.limit(3), and only get one comment per user
Hi all,
I have set up AuthLogic almost exactly as per the AuthLogic example app at http://github.com/binarylogic/authlogic_example.
After someone logs in as User, they can click on links that send them away into the system and away from the users controller. This is an incredibly noob question, but how can I access that User's ID and other attributes from anywhere else, such as an unrelated view or unrelated controller?
An example of what I'd like to do:
#matchings controller
@matching = Matching.find_by_user_id(user.id)
Is there a way to limit the url of saved credentials in browsers?
For example, if I save a username and password for http://www.website.com/login can I make it so that the rest of the forms in the site don't use these details? http://www.website.com/members, http://www.website.com/admin etc...
I'm aware of the autocomplete attribute but I don't want to turn off autocomplete entirely. I would like it if the browser remembered the login details per form or url.
There are identical classes of java WebServices API & IMPL in those packages groups, only package names are different.
http://mvnrepository.com/artifact/javax.xml
http://mvnrepository.com/artifact/com.sun.xml
Which ones should I use in my code? I would prefer NON-com.sun.* as per java conventions, but still my dependencies ( e.g. Spring ) are using implementations from com.sun.* OR I can't find an implementation package in javax.xml
Does anyone have any experience on this?
Is it possible to get the page size (from e.g. a PDF document page) using GhostScript? I have seen the "bbox" device, but it returns the bounding box (it differs per page), not the TrimBox (or CropBox) of the PDF pages. (See http://www.prepressure.com/pdf/basics/page_boxes for info about page boxes.) Any other possibility?
Hello.
I am programming web interface which communicates with cisco switches via telnet. I want to make such system which will be storing one telnet connection per switch and every script (web interface, cron jobs, etc.) will have access to it. This is needed to make a single query queue for each device and prevent huge cisco processor load caused by several concurent telnet connections.
How do I can do this?
Hi,
Just wondering if anyone has a good solution to utlise ValidatorCallout with a CheckListBox ?
The only solution I could see was creating a custom RequiredFieldValidator as per http://www.4guysfromrolla.com/ASPScripts/PrintPage.asp?REF=%2Fwebtech%2Ftips%2Ft040302-1.shtml.
If anyone has any good solution, it would be appreciated if you could share it.
thanks
Can I quickly disable and enable intellisence (and any other features employing on-the-fly interpretation of the code being edited) for a particular file in Visual Studio 2010? It works to slow on my laptop sometimes, causing the text I type to appear with one symbol per 3 seconds speed.
Hi,
As per my understanding a simple TCP server will be coded as follows.
socket() - bind() - listen() - accept() - read() - write()
The clients will be written as follows.
socket() - bind()(Optional) - connect() - write() - read()
Please note the order difference in read() and write() calls between client and server program.
Is it a requirement to always read() before write() in a server program and if, then why?
Thanks,
Naga
In Salesforce you can set up various workflow processes or build API apps that send email. For most standard Salesforce orgs, there is a limit of 1000 emails per day. (e.g. see here)
I can't find any info on what happens after you reach the limit.
e.g. what sort of errors occur, and are administrators automatically notified?
I am using Community Server 2007 Express engine (1000+ unique hosts per day) and have some problems with hosting provider.
How can I optimize engine to decrease server loads?
Error I tried this page to run on local, it is running perfectly fine but showing me a warning on uploading. What might be the reason.
I used session as per given in w3schools..
The session_start() function must
appear BEFORE the tag
Hi All,
I am a beginner in ada and i had come across a piece of code which is shown below:
procedure Null_Proc is
begin
null;
end;
Now as per my knowledge the procedure in ada doesn't return anything.My doubt is what does this procedure Null_proc do?I mean i am not clear with the definition of the procedure.
Thanks and regards
Maddy
Hi,
How to print a webpage in two columns or one column as per the user input/choice.
And when a take a print out I'm getting the website url on the top left side, How can we stop printing this?
Regards
As per my question here...
http://www.jetbrains.net/devnet/message/5261667#5261667
Is it possible to use TeamCity with an Idea 9 project project that has 3 .iml modules where 2 are Java based and 1 in an Android module?
I don't know why I'm experiencing so much trouble with this, but I would like to have an array that basically represents a layer number and x,y coordinates so I could essentially say,
int i = array[layer,x,y] and get the corrisponding value per layer. I create the array..
int[,,] myarray
...initialize it
myarray = new int[0,width, height];
...and it blows up when try and grab a value.
int n = myarray[0,1,1]
What am I missing?
Hello Experts,
I have a flat text file data which I import into MSSQL table.
It creates and table with specified name along with multiple columns as per data file.
now I need a query which will return the data and its count. e.g.
data file :
BREAD,MILK
BREAD,DIAPER,BEER,EGGS
MILK,DIAPER,BEER,COKE
BREAD,MILK,DIAPER,BEER
BREAD,MILK,DIAPER,COKE
BREAD,ICE,MANGO
JUICE,BURGER
Result should be
BREAD | 5
MILK | 4
DIAPER| 4
and so on.
In Python, is there a mean to enforce the use of spaces or tabs indentation with a per file basis ?
Well, perhaps "enforce" is too strong, its more like "recommands".
I keep getting files with mixed indentation and this is annoying... (to say the least) Python itself can tell when there is a problem, but I am searching something to do that at the editor level, like it exists for the charset.
There are great .NET libraries and components. What is, for your opinion the most useful, effective, well wrriten open source C# library you've ever seen?
Mines, is the great Html Agility Pack.
Please post one library per answer.
There is a byte at a specific index in a byte string which represents eight flags; one flag per bit in the byte. If a flag is set, its corresponding bit is 1, otherwise its 0. For example, if I've got
b'\x21'
the flags would be
0001 0101 # Three flags are set at indexes 3, 5 and 7
# and the others are not set
What would be the best way to get each bit value in that byte, so I know whether a particular flag is set or not? (Preferably using bitwise operations)
I've got a user control thats used twice on the same page, each have the ability to be updated (a dropdown list gets a new item) and I'm not sure what might be the best way to handle this.
One concern - this is an older system (~4+ years, datasets, .net2) and it is amazingly brittle. I did manage to have it run on 3.5 with no problems, but I've had a few run-ins with the javascript validation (~300 lines per page) throwing up all over the place when I change/add/modify controls in the parent.
Please help me use/create Concurrent LinkedHashMap.
As per my belief, if I use Collections.synchronizedMap(), I would have to use synchronized blocks for getter/setter.
If I use ConcurrentSkipListMap, is there any way to implement a Comparator to store sequentially.
I would like to use java's built in instead of third party packages.
Thanks
how can i manipulate pixel values of a loaded image then save portion of that image into a new image(1 image per word).i found several example regarding saving or loading image but i cant understand how can i save image portion???i am trying to do it with java