With the tag is possible to add on you site a widget with the stream and fan.
In The stream are displayed only the owner of the page post.
There is no way to view even the fan post?
i have to convert 60px X 60px images to png for my web site with imagemagick.
convert image.jpg image.png
But it's return an image with 4kbyte size.
I want get a size around 1kbyte.
How can i do?
thanks
Hi in my db there is a field "date_start" type integer.
This is the part of form for this field
<div class="editor-label">
<%: Html.LabelFor(model => model.date_start) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(model => model.date_start, new { @class = "calendar" })%>
<%: Html.ValidationMessageFor(model => model.date_start) %>
</div>
In the form i want that the field's format is date type.
and memorize it in int type after calling a my function for the convertion.
How can i manage it?
thanks
I want to get the .next() and .prev() sibling of an HTML element without excluding TextNodes.
I basically need to understand if an element is directly sorrounded by <br> HTML elements.
This would return true:
<br>
<div></div>
<br>
This would return false:
<br>
Some text
<div></div>
<br>
BUT this needs to also return true:
<br>
<div></div>
<br>
The third example basically uses an empty TextNode, or blankspaces, or newlines.
What's the best way to do this?
there are strange characters at the beginning of a file I'm editing (using textmate..)
I don't know when they appeared, they're invisible in textmate but my script that reads the file goes crazy..
this is the first few chars in the file (as seen with od command):
0000000 177377 000120 000105 000117 000120 000114 000105 000072
the first 2 shouldn't be there I think.. maybe they were caused by some strange dropbox sync? Or something else.. but they tend to reappear (I don't yet know when..)
My question: what is that 177377 and a simple way to remove it in my ruby script?
thanks
hi! :)
i'm searching for a ready-for, opensource administration area, wich allow me to modify it.
the area could be already available for a gallery, uploading of images, user managment, news and so on...
anyone can help me? do you know something similar?
thanks a lot in advance!
Hi i have 2 div
<div style="width:50px;height:100px;overflow:auto" id="outer">
<div class="kind_div">hello</div>
</div>
i tried the draggable function of jquery ui:
$("div.kind_div").draggable({ cursor: 'crosshair', containment: 'document', appendTo: 'body' });
i can drag the kind_div but it remains into the outer div
I want drag it in all body of my page
how can i do?
thanks
Hi i have these classes:
class Core < ActiveRecord::Base
belongs_to :resource, :polymorphic => true
belongs_to :image, :class_name => 'Multimedia', :foreign_key => 'image_id'
end
class Place < ActiveRecord::Base
has_one :core, :as => :resource
end
If i try do launch this:
a = Place.find(5)
a.name ="a"
a.core.image_id = 24
a.save
name is saved. image_id no
i want save automatically all changes in records in relationship with place class at a.save command. is possible?
thanks
Haven't been able to find anything particular to this situation online so here i go...
I need to set/get the cookies stored at "first.com" while browsing "second.com", I have full access of "first.com" but i only have javascript access (can manipulate the DOM as i want) on "second.com".
My first approach was to create an iframe on second.com (with js) that loaded a page like "first.com/doAjax?setCookie=xxx" and that did an ajax call to say "first.com/setCookie?cookieData=xxx" which would set the cookie on "first.com" with the data we passed around.
That pretty much worked fine for setting the cookie on first.com from second.com - for getting a cookie I basically followed the same procedure, created the iframe that loaded "first.com/doAjax?getCookie" and that would do an ajax call to say "first.com/getCookie" which would read the cookie info on first.com and return it as a JSON object.
The problem is that I'm unable to bring that JSON cookie object back to "second.com" so I can read it, well maybe i could just bring it when the Ajax call is complete using "window.top" but there's timing issues because its not relative to when the iframe has been loaded. I hope i am clear and was wondering if there's an easier solution rather than this crazy iframe-ajax crap, also seems like this wont even work for getting cookies in SAFARI.
I have an HTML textarea:
<textarea>
Some text
Another text in another line
BOOM
Hello there.
</textarea>
I want to be able to vertically scroll to the word BOOM so that it is visible (it doesn't matter on which line it appears).
Is this possible?
I'm trying to deploy an application on Windows Server 2008 (SP2 x64) and Windows 7 (x64), using VS2005 Installer Project. The MSI version (I think) it the 2.0.
Everything works fine, except that some registry keys and some files are not copied on the install machine. The MSI system doesn't notify about nothing (and I don't know whether MSI logs its operations).
Are there incompatibilities between my MSI installer project and these new OSes? It seems to me that the OS protect itself for being modified in some part.
For example, I'm trying to set the registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\WinLogon\SpecialAccounts\UserList\User
but it is not created. In the same installer there are many other keys, which are created like expected (as they always did before on Windows XP and Windows Server 2003).
To provide another example, I'm trying to install the file
%SystemFolder%\oobe\info\backgrounds\backgroundDefault.jpg
(where %SystemFolder% is typically "C:\Windows\System32"), but the file is not copied at all!!!
What's going on?
I've found the backgroundDefault.jpg file is located in another directory: %SystemRoot%\SysWOW64\oobe\info.
But I've not specified nothing about a System (64 bit) folder. How can I copy the file in the right place?
Is it possible to draw an overlay (using OnPaint, for example) over a composite UserControl?
Actually the only painting I could get is over the UserControl, but it covered by Control instances positioned inside the UserControl.
I'm trying to detect console application from the list of the executables files installed on my computer.
How to implement it?
Every application has a "subsystem" (windows application, console application or library; specified to the linker as option, I think). How to detect it using only the executable file?
Are there alternative methods to detect the application characteristic? Additionally, are there any method for detecting the file is a really executable file?
Any issue for JAR executables?
This link shows you that jQuery uses (new Function("return " + data))(); for older browsers, to parse a JSON string instead of eval().
What are the benefits of this? What if the JSON string isn't safe?
I have to parse this string in C:
XFR 3 NS 207.46.106.118:1863 0 207.46.104.20:1863\r\n
And be able to get the 207.46.106.118 part and 1863 part (the first ip address).
I know I could go char by char and eventually find my way through it, but what's the easiest way to get this information, given that the IP address in the string could change to a different format (with less digits)?
What's your opinion about using #region folding using application semantic, instead of folding for "syntax".
For example:
#region Application Loop
#region User Management
#region This Kinf of stuffs
instead of
#region Private Routines
#region Public Properties
#region ThisRoutine // (Yes, I've seen this also!)
In this logic, I'm starting fold even routine bodies. I'm starting to love #region directive (even using #pragma region when using C++!).
Hi i'm using this for getting data:
Topic.find(:all, :include => ...,
:conditions => @core ? ["cores_topics.id = ? AND visible = 1 AND (distance < ? OR cores.id IN (?))",@core.id, @user_location[3].to_i, @user_friends] :
["visible = 1 AND (distance < ? OR cores.id IN (?))", @user_location[3].to_i, @user_friends],
...
how can i rewrite the conditions shorter?
thanks
Hello, I have a dialog form and when I open it I have the button "add a task", I would like to keep this "name", when I open the form from an empty case, but I want to have a button named "edit this task" when I open an already existing task.
I also want to send the form with this button when I push enter key, no matter where I am on the form.
Thank you.
I am pretty proficient with C, and freeing memory in C is a must.
However, I'm starting a new C++ project, and I've heard some things about how you don't need to free memory using shared pointers and other things.
Where should I read about this? Is this a valuable replacement for proper delete C++ functionality? How does it work?
I'm building a website photo gallery for a friend. Images are loaded as simple DOM image objects (<img src="" />), and the size of these images is based on the browser size. So I resize them with CSS.
This isn't an optimal solution since CSS resizing seems to change the quality of the image and pixelate it quite a bit. I was thinking of rendering the image with canvas and then resize it with that so that the quality remains effective, but I can't find any info about this online.
Any ideas?