Search Results

Search found 10841 results on 434 pages for 'air native extension'.

Page 98/434 | < Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >

  • DNS Problem in my notebook [closed]

    - by air
    i have windows 2003 server domain environment in my office. my server ip is: 192.168.1.2 if i put this IP in DNS of my laptop network card my folder SYNC works fine & also internet work fine in office. but internet did't work in my home for that i need to change DNS again to Auto & internet start working again. its too difficult to change cause some time i don't have administrative password. is there any solution to that? Thanks

    Read the article

  • Replacing substring in a string

    - by user177785
    I am uploading a image file to the server. Now after uploading the file to the server I need to rename the file with an id, but the extension of the file should be retained. Eg: if I upload the file image1.png then my server script should retain the extension .png. But I need to change the substring to some other substring (primary key of db). image1.png should be renamed to 123.png image2.jpg should be renamed to somevalue.jpg The image can be of any extension like .png, .jpg, .jpeg etc. I want to rename then in such a way that the image/file extension should be retained.

    Read the article

  • JFileChooser on OS X

    - by Hamza Yerlikaya
    JFileChooser looks nothing like the native widget. I seem to remember reading some hack to get it look like the native widget but searching for it know i can't seem to find it again i came across posts that suggest using java.awt.FileChooser but that class does not seem to be in the distribution. How can i make JFileChooser make look like the native widget?

    Read the article

  • Is there some API on BlackBerry for "smooth" image resizing?

    - by Arhimed
    To get image thumbnails on BlackBerry I use EncodedImage.scaleImage32(). It works Ok, but when I open native image viewer (from the Camera app) I see the difference in quality - native viewer thumbnails look nice (smooth, anti-aliased), while mine are a bit ugly. Looks like native viewer resizes images using some filter (bicubic or smth like that). How can I do the same? Is there some API for "smooth" resizing?

    Read the article

  • best way to prgram php and mysql query

    - by air
    most of times in our pages we need to print only 1 field value of table in loop. for example <?php for($i=1;$i<=mysql_num_rows($result);$i++) { echo $row['name']; $sql1="select industry from table_industry where profid='".$row['prof']."'"; $result1=mysql_query($sql1); $row1=mysql_fetch_array($result1); echo $row1['industry']; ?> } ?> above is one PHP code just for example where we think that $row['prof'] carry value of profession ID and we print profession of each person. for example we have 5000+ record in table and above loop will execute for 5000+ times what will be the best way to print value of industry field from table table_industry Same code which i write above ? any other php code suggestion for faster execution and less use of resources? Thanks

    Read the article

  • Problem with Copy-Item -force

    - by andemt
    Hi, This is part of my image-copy-script: Get-Childitem | where {$.Extension -eq ".png" -or $.Extension -eq ".gif" -or $_.Extension -eq ".jpg"} | Copy-Item -destination $dest -force It works fine, and it can overwrite files. Well, it can overwrite if the existing file have attribute R or A. Not when its blanked. Error in red text: "Copy-Item : The file '\server\d$\path\thumbs\007487l.jpg' already exists." Why?

    Read the article

  • Javascript Popup Windows

    - by sikas
    I have a popup window code that I have used before in login forms. The code displays an in-page popup. This is the code: <?php //In Page Popup Box with Faded Background by Jerry Low @crankberryblog.com //Find other useful scripts at the Crankberry Blog //SETTINGS $fade_amount = 60; //In Percentage $box_width = 400; $box_background = 'FFFFFF'; //Hex Color $box_border_width = 2; $box_border_color = '999999'; //Hex Color $close_box = 1; //Do You Want The Close Bar on Top 1 = Yes, 0 = No $extension = ""; // Other Variables that maybe needed, page number etc. //Begin Popup Box $left_margin = ( 0 - ($box_width*0.5) ); $page_url = basename($_SERVER['PHP_SELF']); if ($extension!="") $page_url .= '?' . $extension; if (isset($_GET['popup'])) { echo '<div class="popup" style="width:'.$box_width.'px; background: #'.$box_background.'; margin-left:'.$left_margin.'px;'; if ($box_border_width>1) echo ' border: '.$box_border_width.'px solid #'.$box_border_color.';'; echo '">'; //Close Box if ($close_box===1) echo '<div class="popup_close"><a href="'.$page_url.'">Close (x)</a></div>'; ?> <!–- START YOUR POPUP CONTENT HERE -–> Popup content goes in here! <!–- END OF YOUR POPUP CONTENT HERE -–> <?php echo '</div> <div class="fade" onclick="location.replace(\''.$page_url.'\');" style="opacity: 0.'.$fade_amount.'; -moz-opacity: 0.'.$fade_amount.';filter: alpha(opacity: '.$fade_amount.');"></div> <div class="fade_container">'; } ?> <a href="?popup=1<?php if ($extension!="") echo '&' . $extension; ?>">Activated Box</a> This code contains a link that reloads the page with parameters/arguments to show the popup. I want to update this code to make the popup appear/hide without This is what I have done so far, yet the popup doesn`t show. Now I want to update the code to work as follows. <link rel=StyleSheet href="css/popup.css" type="text/css" media=screen></link> <?php //In Page Popup Box with Faded Background by Jerry Low @crankberryblog.com //Find other useful scripts at the Crankberry Blog //SETTINGS $fade_amount = 60; //In Percentage $box_width = 400; $box_background = 'FFFFFF'; //Hex Color $box_border_width = 2; $box_border_color = '999999'; //Hex Color $close_box = 1; //Do You Want The Close Bar on Top 1 = Yes, 0 = No $extension = ""; // Other Variables that maybe needed, page number etc. //Begin Popup Box $left_margin = ( 0 - ($box_width*0.5) ); $page_url = basename($_SERVER['PHP_SELF']); if ($extension!="") $page_url .= '?' . $extension; { echo '<div id="pop_up" class="popup" style="visibility:hidden; width:'.$box_width.'px; background: #'.$box_background.'; margin-left:'.$left_margin.'px;'; if ($box_border_width>1) echo ' border: '.$box_border_width.'px solid #'.$box_border_color.';'; echo '">'; //Close Box if ($close_box===1) echo '<div class="popup_close"><a href="#" ChangeStatus()>Close (x)</a></div>'; ?> <!–- START YOUR POPUP CONTENT HERE -–> Popup content goes in here! <!–- END OF YOUR POPUP CONTENT HERE -–> <?php echo '</div> <div id="fade_div" class="fade" onclick="location.replace(\''.$page_url.'\');" style="visibility:hidden; opacity: 0.'.$fade_amount.'; -moz-opacity: 0.'.$fade_amount.';filter: alpha(opacity: '.$fade_amount.');"></div> <div class="fade_container">'; } ?> <a href="#" onClick="ChangeStatus()">Activated Box</a> <script> function ChangeStatus() { div = document.getElementById('fade_div').style.visibility; popup = document.getElementById('pop_up').style.visibility; alert(popup); if(popup == "hidden") { div = "visible"; popup = "visible"; } else { div = "hidden"; popup = "hidden"; } } </script> ignore the CSS files as it is working fine. I guess the problem is with the JS. Can anyone help me?

    Read the article

  • mysql php connection problem in windows 7

    - by air
    i install windows7 ultimate and php 5.3.1 and mysql server 5.1 mysql server work fine from mysql> and if see phpinfo(); i get the following table mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $ Persistent cache enabled put_hits 0 put_misses 0 get_hits 0 get_misses 0 size 2000 free_items 2000 references 2 but when i connect with following php command $db_host="localhost"; $db_name="mysql"; $db_user="root"; $db_pass="*****"; $dbc=mysql_connect($db_host,$db_user,$db_pass) OR DIE (mysql_error()); $dbs=mysql_select_db($db_name) OR DIE (mysql_error()); when i run page, page take long time in loading and then return nothing. and if i pass any query it return false, i think its connection problem. Thanks

    Read the article

  • Access denied to path , when uploading image to folder in server

    - by apekshabs
    Am getting error when you are going to upload the file on specified folder in the server. Here I am going to upload P6100083.jpg in storeimg folder. When I am going to upload I am getting the following error: Access to the path 'C:\inetpub\vhosts\bookmygroups.com\httpdocs\storeimg\P6100083.jpg' is denied. Can anyone help me... How to use permisiion and were to use... My code is while uploading image if (FileUpload1.HasFile) { float fileSize = FileUpload1.PostedFile.ContentLength; float floatConverttoKB = fileSize / 1024; float floatConverttoMB = floatConverttoKB / 1024; string DirName = "storeimg"; string savepath = Server.MapPath(DirName + "/"); DirectoryInfo dir = new DirectoryInfo(savepath); // string savepath = "C:\\Documents and Settings\\ssis3\\My Documents\\Visual Studio 2005\\WebSites\\finalbookgroups\\" + DirName + "\\"; if (fileSize < 4194304) { string filename = Server.HtmlEncode(FileUpload1.FileName); string extension = System.IO.Path.GetExtension(filename).ToUpper(); if (extension.Equals(".jpg") || extension.Equals(".JPG") || extension.Equals(".JPEG") || extension.Equals(".GIF")) { savepath += filename; FileUpload1.SaveAs(savepath); } } Thanks in advance

    Read the article

  • C++ app fails to initialize (0xc0000005), when using C# dll

    - by Simon
    Hi, I have a C# DLL, which I call from a native C++ programm. As I use Qt and /clr compiler option did not work I followed this tutorial for a bridge. So I have a VS2008 project (compiled with /clr), which links to the C# DLL and contains the bridge class and the native class, which exposes interfaces to my C++ programm. Another VS2008 project (no .net stuff) calls the native class (statically linked). I had some issues, but now the programm at least compiles. However, if I try to run this programm, I get a (0xc0000005) error on initialization, when I try to use the native class. As this happens on initialization, I don't even see, which DLLs fail to initialize. All DLLs should be in the right place. Any hints? Thank you.

    Read the article

  • why resubmit after refresh php page

    - by user2719452
    why resubmit after refresh php page? try it, go to: http://qass.im/message-envelope/ and upload any image now try click F5, after refresh page "resubmit" Why? I don't want resubmit after refresh page What is the solution? See this is my form code: <form id="uploadedfile" name="uploadedfile" enctype="multipart/form-data" action="upload.php" method="POST"> <input name="uploadedfile" type="file" /> <input type="submit" value="upload" /> </form> See this is php code upload.php file: <?php $allowedExts = array("gif", "jpeg", "jpg", "png", "zip", "pdf", "docx", "rar", "txt", "doc"); $temp = explode(".", $_FILES["uploadedfile"]["name"]); $extension = end($temp); $newname = $extension.'_'.substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyz", 7)), 4, 7); $imglink = 'attachment/attachment_file_'; $uploaded = $imglink .$newname.'.'.$extension; if ((($_FILES["uploadedfile"]["type"] == "image/jpeg") || ($_FILES["uploadedfile"]["type"] == "image/jpeg") || ($_FILES["uploadedfile"]["type"] == "image/jpg") || ($_FILES["uploadedfile"]["type"] == "image/pjpeg") || ($_FILES["uploadedfile"]["type"] == "image/x-png") || ($_FILES["uploadedfile"]["type"] == "image/gif") || ($_FILES["uploadedfile"]["type"] == "image/png") || ($_FILES["uploadedfile"]["type"] == "application/msword") || ($_FILES["uploadedfile"]["type"] == "text/plain") || ($_FILES["uploadedfile"]["type"] == "application/vnd.openxmlformats-officedocument.wordprocessingml.document") || ($_FILES["uploadedfile"]["type"] == "application/pdf") || ($_FILES["uploadedfile"]["type"] == "application/x-rar-compressed") || ($_FILES["uploadedfile"]["type"] == "application/x-zip-compressed") || ($_FILES["uploadedfile"]["type"] == "application/zip") || ($_FILES["uploadedfile"]["type"] == "multipart/x-zip") || ($_FILES["uploadedfile"]["type"] == "application/x-compressed") || ($_FILES["uploadedfile"]["type"] == "application/octet-stream")) && ($_FILES["uploadedfile"]["size"] < 5242880) // Max size is 5MB && in_array($extension, $allowedExts)) { move_uploaded_file($_FILES["uploadedfile"]["tmp_name"], $uploaded ); echo '<a target="_blank" href="'.$uploaded.'">click</a>'; // If has been uploaded file echo '<h3>'.$uploaded.'</h3>'; } if($_FILES["uploadedfile"]["error"] > 0){ echo '<h3>Please choose file to upload it!</h3>'; // If you don't choose file } elseif(!in_array($extension, $allowedExts)){ echo '<h3>This extension is not allowed!</h3>'; // If you choose file not allowed } elseif($_FILES["uploadedfile"]["size"] > 5242880){ echo "Big size!"; // If you choose big file } ?> if you have solution, please edit my php code and paste your solution code! Thanks.

    Read the article

  • Problem When Compressing File using vb.net

    - by Amr Elnashar
    I have File Like "Sample.bak" and when I compress it to be "Sample.zip" I lose the file extension inside the zip file I meann when I open the compressed file I find "Sample" without any extension. I use this code : Dim name As String = Path.GetFileName(filePath).Replace(".Bak", "") Dim source() As Byte = System.IO.File.ReadAllBytes(filePath) Dim compressed() As Byte = ConvertToByteArray(source) System.IO.File.WriteAllBytes(destination & name & ".Bak" & ".zip", compressed) Or using this code : Public Sub cmdCompressFile(ByVal FileName As String) 'Stream object that reads file contents Dim streamObj As Stream = New StreamReader(FileName).BaseStream 'Allocate space in buffer according to the length of the file read Dim buffer(streamObj.Length) As Byte 'Fill buffer streamObj.Read(buffer, 0, buffer.Length) streamObj.Close() 'File Stream object used to change the extension of a file Dim compFile As System.IO.FileStream = File.Create(Path.ChangeExtension(FileName, "zip")) 'GZip object that compress the file Dim zipStreamObj As New GZipStream(compFile, CompressionMode.Compress) 'Write to the Stream object from the buffer zipStreamObj.Write(buffer, 0, buffer.Length) zipStreamObj.Close() End Sub please I need to compress the file without loosing file extension inside compressed file. thanks,

    Read the article

  • how to get value in text field

    - by air
    i have one text field and setting its name & values from php like <input type="text" id="qtyProductID_' . $productID . '" size="3" value="' . $totalItems . '" > i also have image button for click event <a href=fun.php?action=update&productID=' . $productID . ' onClick="return false;"><img src="images/update.jpg" id="updateProductID_' . $productID . '"></a> now after click in JS file i want to get value of text field i click var productIDValSplitter = (this.id).split("_"); var productIDVal = productIDValSplitter[1]; var tqty = $('#qtyProductID_'.productIDVal[1]).attr('value'); alert(tqty); i am getting error i am looking for how to set the variable name in $('#qtyProductID_'.productIDVal[1]) Thanks

    Read the article

  • select top 50 records from sql

    - by air
    i have following database table name tbl_rec recno uid uname points ============================ 1 a abc 10 2 b bac 8 3 c cvb 12 4 d aty 13 5 f cyu 9 ------------------------- ------------------------- i have about 5000 records in this table. i want to select first 50 higher points records. i can't use limit statement as i am already using limit for paging. Thanks

    Read the article

  • PHP resized image functions and S3 upload functions - but how to merge the two?

    - by chocolatecoco
    I am using S3 to store images and I am resizing and compressing images before it gets uploaded using PHP. I'm using this class for storing the images to an S3 bucket - http://undesigned.org.za/2007/10/22/amazon-s3-php-class This all works fine if I'm not doing any file processing before the file is uploaded because it reads the file upload from the $_FILES array. The problem is I am resizing and compressing the image before storing to the S3 bucket. So I'm no longer able to read from the $_FILES array. The functions for resizing: public function resizeImage($newWidth, $newHeight, $option="auto") { // *** Get optimal width and height - based on $option $optionArray = $this->getDimensions($newWidth, $newHeight, $option); $optimalWidth = $optionArray['optimalWidth']; $optimalHeight = $optionArray['optimalHeight']; // *** Resample - create image canvas of x, y size $this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight); imagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $optimalWidth, $optimalHeight, $this->width, $this->height); // *** if option is 'crop', then crop too if ($option == 'crop') { $this->crop($optimalWidth, $optimalHeight, $newWidth, $newHeight); } } The script I am using to store the file after resizing and compressing to a local directory: public function saveImage($savePath, $imageQuality="100") { // *** Get extension $extension = strrchr($savePath, '.'); $extension = strtolower($extension); switch($extension) { case '.jpg': case '.jpeg': if (imagetypes() & IMG_JPG) { imagejpeg($this->imageResized, $savePath, $imageQuality); } break; case '.gif': if (imagetypes() & IMG_GIF) { imagegif($this->imageResized, $savePath); } break; case '.png': // *** Scale quality from 0-100 to 0-9 $scaleQuality = round(($imageQuality/100) * 9); // *** Invert quality setting as 0 is best, not 9 $invertScaleQuality = 9 - $scaleQuality; if (imagetypes() & IMG_PNG) { imagepng($this->imageResized, $savePath, $invertScaleQuality); } break; // ... etc default: // *** No extension - No save. break; } imagedestroy($this->imageResized); } with this PHP code to invoke it: $resizeObj = new resize("$images_dir/$filename"); $resizeObj -> resizeImage($thumbnail_width, $thumbnail_height, 'crop'); $resizeObj -> saveImage($images_dir."/tb_".$filename, 90); How do I modify the code above so I can pass it through this function: $s3->putObjectFile($thefile, "s3bucket", $s3directory, S3::ACL_PUBLIC_READ)

    Read the article

  • mysql join 3 tables and count

    - by air
    Please look at this image here is 3 tables , and out i want is uid from table1 industry from table 3 of same uid count of fid from table 2 of same uid like in the sample example output will be 2 records Thanks

    Read the article

  • Download Remote File

    - by Abs
    Hello all, I have a function that will be passed in a link. The link is to a remote image. I thought I could just use the extension of the file in the URL to determine the type of image but some URLs won't have extensions in the URL. They probably just push headers to the browser and therefore I do not have an extension to parse from the URL. How can I test if the URL has an extension and if not then read the headers to determine the file type? Am I over complicating things here? Is there an easier way to do this? I am making use of Codeigniter maybe there is something already built in to do this? All I really want to do is download an image from a URL with the correct extension. This is what I have so far. function get_image($image_link){ $remoteFile = $image_link; $ext = ''; //some URLs might not have an extension $file = fopen($remoteFile, "r"); if (!$file) { return false; }else{ $line = ''; while (!feof ($file)) { $line .= fgets ($file, 4096); } $file_name = time().$ext; file_put_contents($file_name, $line); } fclose($file); } Thanks all for any help

    Read the article

  • OS monitoring using JAVA

    - by Puneri
    I'm planning to implement a framework for monitoring OS level resources: process network stats cpu info etc using JAVA. I see there is SIGAR API by Spring, which is implemented in native language and JAVA API being provided on top. But I will prefer not to have native stuff in my framework, rather for each OS will write a Java Class which will fetch required OS info by running system commands via JAVA Runtime. So I would like to have inputs/suggestions that one may have seen of not doing this in JAVA and use native app/api/jni. Any example will help for sure. I agree each OS has different commands to get these stats, but will prefer to have a Java Class per OS than have/load native code.

    Read the article

< Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >