I relaly like C's LINE and FILE ... does lua provide something similar? (I find it useful for tracking down printf's ... to know which file and which line the message comes from).
Thanks!
I have a removable device setup so it autoruns when plugged into a Windows machine and pops up a message giving the owner's information, so it can be returned if lost. Is there a way to do this in Linux as well? It doesn't need to be complex, it can be an option in a right-click menu, or a splashscreen, or anything.
I have a Java class with a property like this
private Object myObj;
When I try to save the class using Hibernate annotations, I get the rather confusing error message "property mapping has wrong number of columns".
What is the correct approach to persisting a class containing a generic property such as this?
Hi,
Whenever I try to load the following part in tag on firfox browser, I get the message as "$ is not define". May I know the reason? I'm trying to load the jquery.js file before loading any custom script after CSS part.
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
With jQuery, how can I display a flash message at the top of the page in an easy way? Is there something built-in, or a plugin, or is it easy enough to do it yourself?
What I mean is like after a successful ajax post I would like to just say "hey, it went good" in a non-obtrusive way.
I'm using the colorbox plug in for several messages on my web page and I have one specific message that I want it to appear higher on the screen (so it won't hide the center of the page).
Is there a parameter that controls the colorbox location on load?
Thanks.
I am trying to install balder - the carrier wave tree
i am getting some errors including:
not seeing the form elements for adding photos.
getting an error message "command exiftool not found"
I think I've installed all the gems and software already.
Anyone here good with troubleshooting code? also - i've got some screenshots handy if you need them. stackoverflow wont let me post images yet :/
also, are there any other alternative photo galleries written for ROR?
I'm still trying to get to grips with PHP, and I'm trying to make a form that uploads a picture to a database. I don't have permissions for move_uploaded_file so I'm using the copy() as an alternative. Everywhere I've seen experiencing similar problems have all been with move_uploaded_file so I'm rather stuck.
Trying to copy the image from the desktop doesn't seem to be working, it's not throwing up any more PHP errors but is displaying the error message for if something goes wrong. The form sends data to two tables in the database but I'm mainly concerned with the upload not working. There's over 200 lines so I'll post a snippet of the upload code, thank you in advance:
function getExtension($str)
{
$i = strrpos($str,".");
if (!$i) { return ""; }
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return $ext;
}
//This variable is used as a flag. The value is initialized with 0 (meaning no error found) and it will be changed to 1 if an errro occures. If the error occures the file will not be uploaded.
$errors=0;
//checks if the form has been submitted
if(isset($_POST['submitted']))
{
//reads the name of the file the user submitted for uploading
$image=$_FILES['image']['name'];
//if it is not empty
if ($image)
{
//get the original name of the file from the clients machine
$filename = stripslashes($_FILES['image']['name']);
//get the extension of the file in a lower case format
$extension = getExtension($filename);
$extension = strtolower($extension);
//if it is unknown extension, class as an error and do not upload the file, otherwise continue
if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif"))
{
//print error message
echo '<h1>Unknown extension!</h1>';
$errors=1;
}
else
{
//get the size of the image in bytes
//$_FILES['image']['tmp_name'] is the temporary filename of the file in which the uploaded file was stored on the server
$size=filesize($_FILES['image']['tmp_name']);
//give an unique name, for example the time in unix time format
$image_name=time().'.'.$extension;
//the new name will be containing the full path where will be stored (images folder)
$newname="/home/k0929907/www/uploads/".$image_name;
//verify if the image has been uploaded, and print error instead
$copied = copy($_FILES['image']['tmp_name'], $newname);
if (!$copied)
{
echo '<h1>Copy unsuccessfull!</h1>';
$errors=1;
}
}
}
}
Warning: include(html\download.html) [function.include]: failed to open stream: No such file or directory in /home/jamia/public_html/download.php on line 4
this message is displayed when open any page.
it is index page.
I'm doing a steganography project where I read in bytes from a ppm file and add the least significant bit to an array. So once 8 bytes are read in, I would have 8 bits in my array, which should equal some character in a hidden message. Is there an easy way to convert an array of 0's and 1's into an ascii value? For example, the array: char bits[] = "0,1,1,1,0,1,0,0" would equal 't'.
I think i know roughly why i'm getting this message. I opened a VS2008 project in VS2010, realised my code wont work with .NET 4, so i re opened it in VS2008 but now it wont build.
Can someone advise me how i can get this back to building? I deleted the debug folder and built again but nothing has changed. I also cleaned the project and solution.
Please help
When looking up messages in a sasl log using rb:list() or rb:show(), rb seems to dump the output in the console and return 'ok'; is there any way to configure rb to get it to return the actual log message ?
Thanks
Hey, well right now I have a script to send text messages, and I'm looking to modify the Mail() function to also send attachments.
Does anyone have any ideas?
right now this is the format I'm using :
mail ($to, $subject, $message, $headers);
I am trying to replace the double quotes in a string with a single quote, got the following code but get error message saying "Object Required strLocation"
Sub UpdateAdvancedDecisions(strLocation)
Dim d
Dim strLLength
strLLength = Len(strLocation) - 1
For d = 0 To strLLength
alert strLocation
strValue = strLocation.Substring(2,3)
If strLocation.substring(d,d+1)=" " " Then
strLLength = strLLength.substring(0, d) + "'" + strLLength.substring(d + 1,strLLength.length)
Next
End Sub
After validation, i got error and return back to :action = :new.
Some field on form already filled, so i want to keep them filled afterr error message too.
How it can be done?
Thanks.
When i try to check Session["userId"] != null why i get this message Possible unintended reference comparrison; to get value comparrison; cast left hand side to string Any suggestion....
I have created a shopping cart site, and i have got two complains for the same issue, but i am not able to track the main problem...
They whenever they complete the process and reach at the last page they get the error message as "operation aboarded, Internet explorer can't open the page"
Could someone helo me out? what could be the reason behind this..
i tried to get the error in IE-6,7,8 but I didnt get any error...
?
Prior to submitting a form, I would like to check if a file has been attached and pop up a warning message saying that a file needs to be attached if it hasn't been. I was wondering how to accomplish this using JavaScript or Prototype or JQuery etc?
I've added I18n support for error messages:
Now you can define translations for the errors messages in e.g. your YAML locale file:
en:
paperclip:
errors:
attachment:
size: "Invalid file size"
content_type: "Unsupported content type"
presence: "Cant' be blank"
when I use
validates_attachemnt_zie :avatar
how to get error message?
I know this is a long shot, but I figured I'd ask the question anyway.
I have an HTTPS page and am dynamically creating a form. I want to POST the form to an HTTP page. Is this possible without the browser popping up a warning? When I do this on IE8, I get the following message:
Do you want to view only the webpage content that was delivered securely?
Essentially, I'm asking about the inverse of question 1554237.
Hi,
I am searching for the best way for track user on a web site based on asp.net.
We are using log4net to log some business actions (enter on this page, click on button, etc.). But for multiple users, log file cannot be read easily.
So I need add a property 'UserName' on the config file like this :
<conversionPattern value="%date [%thread] - %property{UserName} - %-5level - %logger - %message%newline"/>
Do you hae any idea about the way to set 'UserName' ?
thanks for your help
I want to have an admin page to manage user messages reported as 'spam'. I know how to use MySql and php to have a list of messages reported but I don't know what is the more safe way to access to this page. Local, https,... What strategy use big websites as Facebook, MySpace,... to verify that a message is a true spam and to delete it?
MYMESSAGE = "<div>Hello</div><p></p>Hello"
send_mail("testing",MYMESSAGE,"[email protected]",['[email protected]'],fail_silently=False)
However, this message doesn't get the HTML mime type when it is sent. In my outlook, I see the code...
i've written a program in Jython 2.5.1 which works fine on my Windows 7 machine, but on a japanese machine it throws an Exception saying "unknown encoding 'ms932'"
i found that codecs.java is the only module printing the unknown encoding 'xyz' message
this file loads aliases.py which does contain
# cp932 codec
'932' : 'cp932',
'ms932' : 'cp932',
'mskanji' : 'cp932',
'ms_kanji' : 'cp932',
The file cp932.py contains
import _codecs_jp, codecs
But.. _codecs_jp does not exist as is also discussed in this page
Does anyone have a clue where to go from here ?
http://web.archiveorange.com/archive/v/8tc1Zc2rV3qiUcy9zPlA
The use of JsHttpRequest for data transfering leads to IE notification about ActiveX.
• Are there any ways to circumvent this?
• Or are there any alternative ways of transfering data without page reloading, that do not lead to the appearance of this message?