Hey. I would like to understand what "class << self" stands for in the next example.
module Utility
class Options #:nodoc:
class << self
def parse(args)
end
end
end
end
Thx!
Hey guys!
I'm awful with computers! I'm trying to use Filezilla to connect to my server. When I do this, this is the message it give me verbatim:
Protocol error: Unknown protocol identifier (0x50 0x50 0x48). Most likely connected to the wrong port.
Connection to server closed.
but it's not the wrong port!... what am I doing wrong?
Hey guys,
I'm writing a search algorithm in C++, and one of the things I need to do is have a few if statements that check cells above, below, left of, and right of.
Each time a cell is found to be open and added to the stack, I want it added to a list of cells already checked.
I want to be able to say in the if loop if(thisCell is not in checkedCells).
Any simple ideas?
Thanks!
Hey all..
I noticed that an application I am maintaining was giving me a javascript error in IE8 and FF. The script was trying to get a collection of frame elements:
document.frames
This always returned 'undefined'. I placed a watch on the document object and noticed that this collection does not seem to be a member of the document object in IE8. I think this was always the case in FF but this same code works in older versions of IE. Has this been removed?
-Nick
Hey,
is there a way to find out the last time a contact was modified?
I can't seem to find a variable for it. The reason I'm asking is because I'd like to do a sync of the contacts to my web server and I don't feel like checking for each contact with a HTTP request if it needs updating.
So I was thinking to check the date of the last update to the date of the last sync.
Hey,
where would I place additions to stdlib classes in a rails project? Let's say something like:
class Date
def foo
'foo'
end
end
I thought about the initializer folder but it somehow felt wrong. Ideas?
hey Guys,
I wanted to know if there's a way I can bind an Asp.net Ajax event to two different JS functions ?
eg.
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (!prm.get_isInAsyncPostBack())
{
prm.add_initializeRequest(InitializeRequest);
prm.add_initializeRequest(InitializeRequest2);
}
function InitalizeRequest() { ... }
function InitalizeRequest2() { ... }
Hey there-
I need to have a tab interface that has a different "active" tab every time the page loads. There will be advertiser content in each of the 4 tabs, so this is a way to keep things "fair". I am familiar with the tabs part...just need pointed in the right direction getting different "active" tabs to display on page load.
Thanks!
i need an sms service that can gives me a phone number and then my customers can send me sms to that number. then posts the sms information to my website like http://xx.com/newsms.php?body=hey
Thanks
Hey guys,
I have a web service where people can edit their pages CSS, but I have a bar on the footer of that page that I want to make consistend on every page...
People are, right now, able to "remove" it with CSS and I really didn't want to go and parse the CSS to remove rules related to that bar... Is there a way to preserve the styles or re-aply them after load to keep the bar always visible?
Thanks in advanced!
Hey guys, quick question, all I want to do is resize an image to fit inside a small container when I run this function. Right now, only a portion of the image is shown inside the div. If anyone has any ideas, I would appreciate any advice.
$(this)
.css({
backgroundImage : 'url(' + src + ')', // set background image
backgroundPosition : 'center center', // position background image
backgroundRepeat : 'no-repeat' // don't repeat image
});
Hey Guys
Im thinking about making a suggestion box for my next iPhone app.
Whats the best way to go about this? I was thinking an ModalViewController, a text box that emails out?
Are there any other(better ways) to do it?
Any expertise would be appreciated
Cheers
Sam
Hey,
After reserving a ticket for an travel agency, I want generate a printable report using Crystal Report.
I'm looking for a way to do that.
Any video tutorial or something like that ?
Hey guys, I was just downloading a new distro of linux using uTorrent, and started to wonder how uTorrent (and other bittorrents) send files to eachother through NAT routers? They obviously use the trackers to get introduced, but how do they pass info to eachother?
Is there a whitepaper on this? I couldn't find one :/
Thanks,
Max
Hey Guys
I got some question about nested javascript objects (is it me, google or is javascript quite poorly documented?). Now, I got the following (nested) object:
obj: { subObj: { 'hello world' } };
next thing I do is to reference the subobject like this:
var s = obj.subObj;
now what I would like to do, is to get a reference to the object obj out of the variable s.
Something like:
var o = s.parent;
Is this somehow possible?
Hey all!
Is there a way to simulate opening/closing the 'hardware' keyboard in the emulator?
I have to test some changes that I capture using getResources().getConfiguration().keyboardHidden and this would help a fair lot :)
Thank you in advance!
Hey all,
I'm trying to set the title of the header of my entire UITableView, but am having no success.
For example, on this webpage:
http://www.iphonesdkarticles.com/2009/01/uitableview-sectioned-table-view.html
I am trying to replicate creating the "Countries" header programmatically. I have a UITableView that works and displays data. When I insert the following line:
self.navigationItem.title = @"Countries";
In my viewDidLoad method, nothing happens. Thoughts?
Hey,
I hope you can help me.
/config/routes.rb
resources :deadlines do
resources :comments
end
/model/comment.rb
class Comment < ActiveRecord::Base
belongs_to :post, :class_name = "Post", :foreign_key = "post_id"
end
/model/post.rb
class Post < ActiveRecord::Base
has_many :comments
end
When I want to visit: http://localhost:3000/posts/1/comments/new
it says: undefined method `comments_path' for #<#:0x4887138 in _form.html
I use 'formtastic' and the _form.html.erb looks like this:
<% semantic_form_for [@comment] do |form| %
<% form.inputs do %
<%= form.input :content %
<% end %
<% form.buttons do %
<%= form.commit_button %
<% end %
<% end %
Hey,
I'm building view hierarchies programmatically, without using a nib, for the master and the detail views in the UISplitViewController. My problem is that I do not know how large those views are. Well, of course, I know their hard-coded values... But I want to be a good citizen and not use hard-coded values and instead query them. Problem is that I have no idea how... Do you?
Thanks in advance,
/Steve
Hey guys,
In one of my pages, I use a Flex 4 app in a column on the left, and then normal HTML in a column to the right. Is there anyway I can make it so that the ratio between the two columns is the same no matter the resolution?
Thanks for reading.
hey folks,
I have this piece of code to test a shellcode but I don't understand it so can anyone explain it to me???
forget about the assembly shellcode, what i want to understand is the C code
char shellcode[] = "...";
int main(int argc, char **argv)
{
int (*func)();
func = (int (*)()) shellcode;
(int)(*func)();
}
I mean everything, what is the empty () ,please explain it as if you are explaining it to a beginner
thnx all
hey, i am trying to delete an image with the method:
(the file path is correct by 100%)
if(File.Exists(filePath))
File.Delete(filePath);
and i am getting the following exception :
An unhandled exception of type 'System.IO.IOException' occurred in mscorlib.dll
Additional information: The process cannot access the file 'C:\visual_programming\yad2\yad2\bin\Debug\images\1.jpg' because it is being used by another process.
thanks in advance for your help
Hey everybody,
I just recorded some song and cut it into two parts. The first part contains an intro and the second is supposed to loop. What I want to do now, is to have a simple graphical animation (5 keyframes or so) that loops as well, while the music plays along.
There's probably a simple solution to it, when you're familiar with AS. Unfortunately this is the first thing I've ever tried to do with Flash.
I'm using Flash CS4.
Greetings
Hey all!
I have a developer designing a financial application to be used on a mobile phone via the phones browser. Now each page is 150kb wich to my opinion is way to large. No images are used as it is mostlyhtml buttons and css and possibly javscript.
How can i minimise the page size?
Hey guys,
I wanted some help with trying to implement a simple polymorphic relationship using Entity Framework.
An example of a relationship I would like to implement:
Comment table
ItemType ('Video', 'User')
ItemID
Body
Video has many Comments
User has many Comments
No idea the best way to do this, I come from a Ruby on Rails way of thinking.