Daily Archives

Articles indexed Friday June 18 2010

Page 20/76 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • How to get the list in second image ?

    - by rajesh
    Hi, actually i have 2 images ,when we click on one image it generates pop window containing n no of list. if i click on any link 2 parameters are passed to function one for url and other image path and now i have another image ,what i want to do is if i click on that image it will generate a list which has a content of first image after clicking any link of first image means if i click image1 image2 1 2 3 now if i click 1 then result must be like this image1 image2 1 1 2 3 Please help thanks.

    Read the article

  • CSS style refresh in IE after dynamic removal of style link

    - by rybz
    Hi! I've got a problem with the dynamic style manipulation in IE7 (IE8 is fine). Using javascript I need to add and remove the < link / node with the definition of css file. Adding and removing the node as a child of < head / works fine under Firefox. Unfortunately, after removing it in the IE, although The tag is removed properly, the page style does not refresh. In the example below a simple css (makes background green) is appended and removed. After the removal in FF the background turns default, but in IE stays green. index.html <html> <head> </head> <script language="javascript" type="text/javascript"> var node; function append(){ var headID = document.getElementsByTagName("head")[0]; node = document.createElement('link'); node.type = 'text/css'; node.rel = 'stylesheet'; node.href = "s.css"; node.media = 'screen'; headID.appendChild(node); } function remove(){ var headID = document.getElementsByTagName("head")[0]; headID.removeChild(node); } </script> <body> <div onClick="append();"> add </div> <div onClick="remove();"> remove </div> </body> </html> And the style sheet: s.css body { background-color:#00CC33 } Here is the live example: http://rlab.pl/dynamic-style/ Is there a way to get it working?

    Read the article

  • Silverlight Socket Constantly Returns With Empty Buffer

    - by Benny
    I am using Silverlight to interact with a proxy application that I have developed but, without the proxy sending a message to the Silverlight application, it executes the receive completed handler with an empty buffer ('\0's). Is there something I'm doing wrong? It is causing a major memory leak. this._rawBuffer = new Byte[this.BUFFER_SIZE]; SocketAsyncEventArgs receiveArgs = new SocketAsyncEventArgs(); receiveArgs.SetBuffer(_rawBuffer, 0, _rawBuffer.Length); receiveArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ReceiveComplete); this._client.ReceiveAsync(receiveArgs); if (args.SocketError == SocketError.Success && args.LastOperation == SocketAsyncOperation.Receive) { // Read the current bytes from the stream buffer int bytesRecieved = this._client.ReceiveBufferSize; // If there are bytes to process else the connection is lost if (bytesRecieved > 0) { try { //Find out what we just received string messagePart = UTF8Encoding.UTF8.GetString(_rawBuffer, 0, _rawBuffer.GetLength(0)); //Take out any trailing empty characters from the message messagePart = messagePart.Replace('\0'.ToString(), ""); //Concatenate our current message with any leftovers from previous receipts string fullMessage = _theRest + messagePart; int seperator; //While the index of the seperator (LINE_END defined & initiated as private member) while ((seperator = fullMessage.IndexOf((char)Messages.MessageSeperator.Terminator)) > 0) { //Pull out the first message available (up to the seperator index string message = fullMessage.Substring(0, seperator); //Queue up our new message _messageQueue.Enqueue(message); //Take out our line end character fullMessage = fullMessage.Remove(0, seperator + 1); } //Save whatever was NOT a full message to the private variable used to store the rest _theRest = fullMessage; //Empty the queue of messages if there are any while (this._messageQueue.Count > 0) { ... } } catch (Exception e) { throw e; } // Wait for a new message if (this._isClosing != true) Receive(); } } Thanks in advance.

    Read the article

  • Regex validate dates like "Sun, 20 Jun 10"

    - by Trindaz
    Hi, I'm working on a regular expression that will only return true when a date string is in a format something like 'ddd, dd mmm yy'. Valid matches would be values like "Sun, 20 Jun 10" or "Mon, 21 Jun 10" but not "Sunday, 20 Jun 10" or "20 Jun 10". This will be used with mb_ereg in PHP. My attempts so far have only got me half way there. Any help appreciated! Thanks, Dave

    Read the article

  • CSS JQuery Tools Slider Z-Index Layering Issue

    - by korymath
    I have a complex layering situation for the website: http://andstones.ca/contact/ where I use a large background image for the content to scroll in and out of... Only problem is the transparent image covers up the content and makes links unclickable? Any idea for a fix that keeps the slider looking the way it does now? Thanks, Kory

    Read the article

  • MVC Helper Extension issue

    - by BeCool
    Hi, I need to implement a HtmlHelper extension in my MVC project simply just to output some string but ONLY in the DEBUG mode, not in REALEASE. My first attempt would be: [Conditional("DEBUG")] public static string TestStringForDebugOnly(this HtmlHelper helper, string testString) { return testString; } But obviously that would give a compile error: "The Conditional attribute is not valid because its return type is not void." So my understanding is once you set [Condition] attribute, it doesnt allow to return anything? why? What is other way to implement this kind of function? anyone help would be much appreciated. Thanks!

    Read the article

  • Replace beginning words

    - by Newbie
    I have the below tables. tblInput Id WordPosition Words -- ----------- ----- 1 1 Hi 1 2 How 1 3 are 1 4 you 2 1 Ok 2 2 This 2 3 is 2 4 me tblReplacement Id ReplacementWords --- ---------------- 1 Hi 2 are 3 Ok 4 This The tblInput holds the list of words while the tblReplacement hold the words that we need to search in the tblInput and if a match is found then we need to replace those. But the problem is that, we need to replace those words if any match is found at the beginning. i.e. in the tblInput, in case of ID 1, the words that will be replaced is only 'Hi' and not 'are' since before 'are', 'How' is there and it is not in the tblReplacement list. in case of Id 2, the words that will be replaced are 'Ok' & 'This'. Since these both words are present in the tblReplacement table and after the first word i.e. 'Ok' is replaced, the second word which is 'This' here comes first in the list of ID category 2 . Since it is available in the tblReplacement, and is the first word now, so this will also be replaced. So the desired output will be Id NewWordsAfterReplacement --- ------------------------ 1 How 1 are 1 you 2 is 2 me My approach so far: ;With Cte1 As( Select t1.Id ,t1.Words ,t2.ReplacementWords From tblInput t1 Cross Join tblReplacement t2) ,Cte2 As( Select Id, NewWordsAfterReplacement = REPLACE(Words,ReplacementWords,'') From Cte1) Select * from Cte2 where NewWordsAfterReplacement <> '' But I am not getting the desired output. It is replacing all the matching words. Urgent help needed*.( SET BASED )* I am using SQL Server 2005. Thanks

    Read the article

  • How to save the view count of a question in memory?

    - by Freewind
    My website is like stackoverflow, there are many questions. I want to record how many times a question has been visited. I have a column called "view_count" in the question table to save it. If a user visits a question many times, the view_count should be increased only 1. So I have to record which user has visited which question, and I think it is too much expensive to save this information in the database because the records will be huge. So, I would like to keep the information in memory and only persist the number to the database every 10 minutes. I have searched about "cache" in Rails, but I haven't found an example. I would like a simple sample of how to do this, thanks for help~

    Read the article

  • PicklingError: Can't pickle suds.sudsobject.User: attribute lookup suds.sudsobject.User failed

    - by apoorva
    Hi.. I have a django application... I am accessing the web service using the SOAP suds client... I need to create a user object from the entries entered in the GUI... This user object is to be passed to a method... But i get the following error: PicklingError: Can't pickle suds.sudsobject.User: attribute lookup suds.sudsobject.User failed What is the cause for this error to occur???

    Read the article

  • Android - Run in background - Service vs. standard java class

    - by Chris
    In Android, if I want to do some background work, what is the difference between Creating a Service to do the work, and having the Activity start the Service VS. Creating a standard java class to do the work, and having the Activity create an object of the class and invoke methods, to do the work in separate threads Thanks Chris

    Read the article

  • Report article to admin in joomla

    - by moustafa
    Hi there, Is there any such feature in Joomla 1.5 that allows users to report a particular published article to the moderator. In some instances, the article may be offensive to some viewers in one way or the other. There could be a link Report to moderator which shall inform the moderator about that particular article. I understand that the admin or the moderator shall approve the article before posting. I would also like my registered users to be able to report. Is there any plugin that does this trick?

    Read the article

  • DD-WRT RIP2 Router mode configuration

    - by Eduardo
    Can anybody tell me why my wireless router only redirects traffic to ADSL modem when it is on Gateway mode? These are the configurations when it is on RIP2 Router mode: ADSL Modem: ------------ LAN IP: 10.1.1.1 Subnet mask: 255.0.0.0 RIP v2 enabled in both directions Route: destination: 192.168.1.0 Subnet mask: 255.255.255.0 Gateway: 10.1.1.2 Wireless Router (DD-WRT) ------------------------ WAN IP: 10.1.1.2 WAN Subnet mask: 255.0.0.0 LAN IP: 192.168.1.1 LAN Subnet mask: 255.255.255.0 Operating mode: RIP2 Router Static Route: Destination LAN NET: 10.0.0.0 Subnet Mask: 255.0.0.0 Gateway: 10.1.1.1 Interface: LAN & WLAN

    Read the article

  • Surefire Ways to Boost Your Search Engine Rankings

    To succeed in business today, it's not enough to have what is regarded as the traditional elements of a business. With technology advancing at such a pace, new requirements have been added for you and your business to succeed - an online presence. Customers now expect that a business can be found on the internet with an online presence, so they can visit and make inquiries and do business.

    Read the article

  • What is session management in Java ?

    - by Sarang
    I have faced this question in my Interview as well. I do have many confusion with Session Scope & it management in java. In web.xml we do have the entry : <session-config> <session-timeout> 30 </session-timeout> </session-config> What does it indicate actually ? Is is scope of whole project ? Another point confusing me is how can we separate the session scope of multiple request in the same project? Means if I am logging in from a PC & at the same time I am logging in from another PC, does it differentiate it ? Also, another confusing thing is the browser difference. Why does the different Gmails possible to open in different browsers ? And Gmail can prevent a session from Login to Logout. How is it maintained with our personal web ?

    Read the article

  • What programming language is the most English-like?

    - by asmeurer
    I'm mainly a Python programmer, and it is often described as being "executable pseudo-code". I have used a little bit of AppleScript, which seems to be the most English-like programming language I have ever seen, because almost operators can be words, and it lets you use "the" anywhere (for example, this stupid example I just came up with: firstnumber = 1 secondnumber = 2 if the firstnumber is equal to the secondnumber then set the sum to 5 end if is a valid AppleScript program. Are there any programming languages that are even more English-like than these?

    Read the article

  • Packaging an application that uses the ImageMagick C API

    - by John Gardeniers
    I've created a little Windows app that uses the ImageMagick C API but have run into a bit of a brick wall. The app works fine and I'm ready to share it with a few others in our organisation but I can't find documentation on distributing such an app without installing ImageMagick on the target machine. Does anyone here have information, or a link to information, that details how to package this up for distribution? What DLLs are required and which one(s) need to registered with Windows? The target users will be on a mix of XP and Win7.

    Read the article

  • android imageview onClickListener animation

    - by Javadid
    hi. I guess this is kind of a idiotic question but i have tried setting onClicklistener on an ImageView and it has worked. But the problem is that the user cannot sense the click. I mean if some of u have worked on other mobile environs(like apple iphone) then wen we click on a Image in other environs then it gives an effect on the image so that the user can understand that the image has been clicked. I have tried setting alpha using "setalpha" method but it doesnt work. Though the same thing is working fine on onFocusListener implementation. Can some1 suggest a different way to modify the image on click... I am new to android so havent learnt the nuances of simple animation also... if there is any simple animation i can use for the same then plzz plzzz let me know... Thanx...

    Read the article

  • Ajax and PHP problem not sending mail

    - by Dumbledore of flash
    Hi all , I have a problem here, I have two files form.php and index.php , my form.php has an ajax to fetch data from index.php , also my index.php has a mail function which is running perfectly when we run index.php directly, but when i form.php to fetch data from index.php this mail function is not running ..... can any body tell me whats the problem why ajax does not make my index.php send mail ?????

    Read the article

  • Wordpress creating plugin for most viewed posts problem?

    - by user303832
    Hello,I just want to create plugin that will when visitor(user,visitor,...) visit some post,remember what post,and to increment counter of that post,I wrote this code,but sometimes,counter is incremented,even post isn't viewed,or post with other Id is added to a table.Can someone help me with this,please.I know that there are plugins for this that I'm trying to do,but still want to write this plugin. function IncrementPostCount($the_content) { global $post; global $wpdb; if(($post->post_status == 'publish') && (int)$post->ID) { if(is_single()) { // just for single post - not for page $postID = (int)$post->ID; $postTitle = urlencode($post->post_title); $postLink = urlencode(get_permalink($post->ID)); $oneRow = $wpdb->get_row("SELECT * FROM wp_postovi WHERE postAjDi='$postID'"); if(empty ($oneRow)) { $postCounter = 1; $data_array = array( 'readnTimes' => $postCounter, 'linkPost'=>$postLink, 'TitlePost'=>$postTitle, 'postAjDi'=>$postID); $wpdb->insert('wp_najcitaniji_postovi', $data_array); } else { $postCounter = intval($oneRow->readnTimes) + 1; $data_array = array('readnTimes' => $postCounter); $where_array = array('postAjDi'=>intval($oneRow->postAjDi)); $wpdb->update('wp_postovi',$data_array,$where_array); } return $the_content; } return $the_content; } } add_filter('the_content','IncrementPostCount'); Sorry on my bad english,tnx in advance.

    Read the article

  • Generating random numbers in C

    - by moonstruckhorrors
    While searching for Tutorials on generating random numbers in C I found This Topic When I try to use the rand() function with parameters, I always get the random number generated 0. When I try to use the rand() function with parameters, I always get the value 41. And whenever I try to use arc4random() and random() functions, I get a LNK2019 error. Here's what I'm doing: #include <stdlib.h> int main() { int x; x = rand(6); printf("%d", x); } This code always generate 41. Where am I going wrong?? P.S. : I'm running Windows XP SP3 and using VS2010 Command Prompt as compiler. P.P.S. : Took me 15 minutes to learn how to format properly.

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >