Search Results

Search found 1916 results on 77 pages for 'ref'.

Page 11/77 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Why the performance of following code is degrading when I use threads ?

    - by DotNetBeginner
    Why the performance of following code is degrading when I use threads ? **1.Without threads int[] arr = new int[100000000]; //Array elements - [0][1][2][3]---[100000000-1] addWithOutThreading(arr); // Time required for this operation - 1.16 sec Definition for addWithOutThreading public void addWithOutThreading(int[] arr) { UInt64 result = 0; for (int i = 0; i < 100000000; i++) { result = result + Convert.ToUInt64(arr[i]); } Console.WriteLine("Addition = " + result.ToString()); } **2.With threads int[] arr = new int[100000000]; int part = (100000000 / 4); UInt64 res1 = 0, res2 = 0, res3 = 0, res4 = 0; ThreadStart starter1 = delegate { addWithThreading(arr, 0, part, ref res1); }; ThreadStart starter2 = delegate { addWithThreading(arr, part, part * 2, ref res2); }; ThreadStart starter3 = delegate { addWithThreading(arr, part * 2, part * 3, ref res3); }; ThreadStart starter4 = delegate { addWithThreading(arr, part * 3, part * 4, ref res4); }; Thread t1 = new Thread(starter1); Thread t2 = new Thread(starter2); Thread t3 = new Thread(starter3); Thread t4 = new Thread(starter4); t1.Start(); t2.Start(); t3.Start(); t4.Start(); t1.Join(); t2.Join(); t3.Join(); t4.Join(); Console.WriteLine("Addition = "+(res1+res2+res3+res4).ToString()); // Time required for this operation - 1.30 sec Definition for addWithThreading public void addWithThreading(int[] arr,int startIndex, int endIndex,ref UInt64 result) { for (int i = startIndex; i < endIndex; i++) { result = result + Convert.ToUInt64(arr[i]); } }

    Read the article

  • php script redirecting code problem

    - by tibin mathew
    hi, i'm using a php script for redirection after detecting the search word to my websiter from the search engines . and my redirection code is working fine but for some keywods i wat to stay in the same page. for that lines of code i'm getting a warning message in that pages. Warning: headers already sent (output started at /home/friendsj/public_html/index.php:2) in /home/friendsj/public_html/index.php on line 20 below is the code i used in that pages $ref=$_SERVER['HTTP_REFERER']; if(strstr($ref,"test")) { $url="http://www.howtomark.com/robgoyette.html"; } elseif(strstr($ref,"mu+word+gmail")) { $url="http://www.howtomark.com/marketbetter.html"; } else { if(strstr($ref,"how+to+market+better")) { } } if($url !="") { header("Location:$url"); }

    Read the article

  • Page markup maintainability

    - by Tony
    Hi where js folder is under the root. if u put this JS ref in common\SomeControl.ascx, it will work fine if SomeControl is placed on ~/SomePage.aspx because SomePage is under the website root. How to put JS ref in SomeControl and allow it to be placed at any path on the website without losing the JS ref. Thanks

    Read the article

  • I'm writing a spellchecking program, how do I replace ch in a string?

    - by Ajay Hopkins
    What am I doing wrong/what can I do? import sys import string def remove(file): punctuation = string.punctuation for ch in file: if len(ch) > 1: print('error - ch is larger than 1 --| {0} |--'.format(ch)) if ch in punctuation: ch = ' ' return ch else: return ch ref = (open("ref.txt","r")) test_file = (open("test.txt", "r")) dictionary = ref.read().split() file = test_file.read().lower() file = remove(file) print(file) This is in Python 3.1.2

    Read the article

  • wordpress generating slow mysql queries - is it index problem?

    - by tash
    Hello Stack Overflow I've got very slow Mysql queries coming up from my wordpress site. It's making everything slow and I think this is eating up CPU usage. I've pasted the Explain results for the two most frequently problematic queries below. This is a typical result - although very occasionally teh queries do seem to be performed at a more normal speed. I have the usual wordpress indexes on the database tables. You will see that one of the queries is generated from wordpress core code, and not from anything specific - like the theme - for my site. I have a vague feeling that the database is not always using the indexes/is not using them properly... Is this right? Does anyone know how to fix it? Or is it a different problem entirely? Many thanks in advance for any help anyone can offer - it is hugely appreciated Query: [wp-blog-header.php(14): wp()] SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT 0, 6 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE wp_posts ref type_status_date type_status_date 63 const 427 Using where; Using filesort Query time: 34.2829 (ms) 9) Query: [wp-content/themes/LMHR/index.php(40): query_posts()] SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID NOT IN ( SELECT tr.object_id FROM wp_term_relationships AS tr INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy = 'category' AND tt.term_id IN ('217', '218', '223', '224') ) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT 0, 6 id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY wp_posts ref type_status_date type_status_date 63 const 427 Using where; Using filesort 2 DEPENDENT SUBQUERY tr ref PRIMARY,term_taxonomy_id PRIMARY 8 func 1 Using index 2 DEPENDENT SUBQUERY tt eq_ref PRIMARY,term_id_taxonomy,taxonomy PRIMARY 8 antin1_lovemusic2010.tr.term_taxonomy_id 1 Using where Query time: 70.3900 (ms)

    Read the article

  • Unable to execute native sql query

    - by Renjith
    I am developing an application with Spring and hibernate. In the DAO class, I was trying to execute a native sql as follows: SELECT * FROM product ORDER BY unitprice ASC LIMIT 6 OFFSET 0 But the system throws an exception. org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63) org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:544) com.dao.ProductDAO.listProducts(ProductDAO.java:15) com.dataobjects.impl.ProductDoImpl.listProducts(ProductDoImpl.java:26) com.action.ProductAction.showProducts(ProductAction.java:53) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) application-context.xml is show below <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" p:location="/WEB-INF/jdbc.properties" /> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}" p:username="${jdbc.username}" p:password="${jdbc.password}" /> <!-- Hibernate SessionFactory --> <!-- class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"--> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref local="dataSource"/> </property> <property name="configLocation"> <value>WEB-INF/classes/hibernate.cfg.xml</value> </property> <property name="configurationClass"> <value>org.hibernate.cfg.AnnotationConfiguration</value> </property> <!-- <property name="annotatedClasses"> <list> <value>com.pojo.Product</value> <value>com.pojo.User</value> <value>com.pojo.UserLogin</value> </list> </property> --> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">${hibernate.dialect}</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> </bean> <!-- User Bean definitions --> <bean name="/logincheck" class="com.action.LoginAction"> <property name="userDo" ref="userDo" /> </bean> <bean id="userDo" class="com.dataobjects.impl.UserDoImpl" > <property name="userDAO" ref="userDAO" /> </bean> <bean id="userDAO" class="com.dao.UserDAO" > <property name="sessionFactory" ref="sessionFactory" /> </bean> <bean name="/listproducts" class="com.action.ProductAction"> <property name="productDo" ref="productDo" /> </bean> <bean id="productDo" class="com.dataobjects.impl.ProductDoImpl" > <property name="productDAO" ref="productDAO" /> </bean> <bean id="productDAO" class="com.dao.ProductDAO" > <property name="sessionFactory" ref="sessionFactory" /> </bean> And DAO class is public class ProductDAO extends HibernateDaoSupport{ public List listProducts(int startIndex, int incrementor) { org.hibernate.Session session = getHibernateTemplate().getSessionFactory().getCurrentSession(); String queryString = "SELECT * FROM product ORDER BY unitprice ASC LIMIT 6 OFFSET 0"; List list = null; try{ session.beginTransaction(); org.hibernate.Query query = session.createQuery(queryString); list = query.list(); session.getTransaction().commit(); } catch(Exception e) { e.printStackTrace(); } finally { session.close(); } return list; } public List getProductCount() { String queryString = "SELECT COUNT(*) FROM Product"; return getHibernateTemplate().find(queryString); } } Any thoughts to fix it up?

    Read the article

  • Struts 2 security

    - by Dewfy
    Does Struts 2 has complete solution for simple login task? I have simple declaration in struts.xml: <package namespace="/protected" name="manager" extends="struts-default" > <interceptors> <interceptor-stack name="secure"> <interceptor-ref name="roles"> <param name="allowedRoles">registered</param> </interceptor-ref> </interceptor-stack> </interceptors> <default-action-ref name="pindex"/> <action name="pindex" > <interceptor-ref name="completeStack"/> <interceptor-ref name="secure"/> <result>protected/index.html</result> </action> </package> Accessing to this resource shows only (Forbidden 403). So what should I do on the next step to: Add login page (standart Tomcat declaration on web.xml with <login-config> not works) ? Provide security round trip. Do I need write my own servlet or exists struts2 solutions? Thanks in advance!

    Read the article

  • Cookie is setting twice (duplicated)

    - by Erik Larsson
    I'm new to cookies, and im trying to set a cookie where to store the referrer (the org ref). But when i try this function: function do_it_cookie() { // Check if cookie exists if (isset($_COOKIE['ref'])) { // It dose exist, do nothing or anything... } else { setcookie ('ref', $_SERVER['HTTP_REFERER'], time() + 60, '/'); header ("Location: http://www.nyttforetag.com/mind-your-own-business/"); } } I want to store the cookie on the user computer for 30 days, if the return i want to know the initial refereeing url. But when i use this and lets say i go to another page in my site and then go back to the homepage its sets a new cookie with the exact same name and with the ref of the previous page. Is there away to avoid this?

    Read the article

  • Insert XML node before specific node using c#

    - by sam
    This is my XML file <employee> <name ref="a1" type="xxx"></name> <name ref="a2" type="yyy"></name> <name ref="a3" type="zzz"></name> </employee> Using C#, I need to insert this node <name ref="b2" type="aaa"></name> between the "a2" and "a3" nodes. Any pointer how to sort this out?

    Read the article

  • im writing a spellchecking program, how do i replace ch in a string..eg..

    - by Ajay Hopkins
    what am i doing wrong/what can i do?? import sys import string def remove(file): punctuation = string.punctuation for ch in file: if len(ch) > 1: print('error - ch is larger than 1 --| {0} |--'.format(ch)) if ch in punctuation: ch = ' ' return ch else: return ch ref = (open("ref.txt","r")) test_file = (open("test.txt", "r")) dictionary = ref.read().split() file = test_file.read().lower() file = remove(file) print(file) p.s, this is in Python 3.1.2

    Read the article

  • Cookie is setting twice (dublicated)

    - by Erik Larsson
    I'm new to cookies, and im trying to set a cookie where to store the referer (the org ref). But when i try this function: function do_it_cookie() { // Check if cookie exists if (isset($_COOKIE['ref'])) { // It dose exist, do nothing or anything... } else { setcookie ('ref', $_SERVER['HTTP_REFERER'], time() + 60, '/'); header ("Location: http://www.nyttforetag.com/mind-your-own-business/"); } } I want to store the cookie on the user computer for 30 days, if the return i want to know the initial refereeing url. But when i use this and lets say i go to another page in my site and then go back to the homepage its sets a new cookie with the exact same name and with the ref of the previous page. Is there away to avoid this?

    Read the article

  • ActiveMq integration with Spring 2.5

    - by Tony
    I am using ActiveMq 5.32 with Spring 2.5.5. I use pretty generic configuration, as long as I include the jmsTransactionManager in DefaultMessageListenerContainer, Spring throw an error on start up: "Error creating bean with name 'org.springframework.jms.listener.DefaultMessageListenerContainer#0'" Without the transactionManager attribute , this works fine, but when I add 10 messages to the message queue, a transaction exception will occur. Part of my configurations : <bean class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="connectionFactory" ref="connectionFactory" /> <property name="destination" ref="emailDestination" /> <property name="messageListener" ref="emailServiceMDP" /> <property name="transactionManager" ref="jmsTransactionManager" /> </bean> <bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager"> <property name="connectionFactory" ref="connectionFactory" /> </bean> Does this version of Spring and Activemq has some know issues in integration ? Or do I need additional libs to get jmsTransactionManager to work ?

    Read the article

  • Calling all the 3 functions while using or operator even after returning true as a result.

    - by Shantanu Gupta
    I am calling three functions in my code where i want to validate some of my fields. When I tries to work with the code given below. It checks only for first value until it gets false result. I want some thing like that if fisrt function returns true then it should also call next function and so on. What can be used instead of Or Operator to do this. if (IsFieldEmpty(ref txtFactoryName, true, "Required") || IsFieldEmpty(ref txtShortName, true, "Required") || IsFieldEmpty(ref cboGodown, true, "Required")) { }

    Read the article

  • Unreachable code detected in case statement

    - by alex
    I have a code: protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { switch (keyData) { case Keys.Alt|Keys.D1: if (this._condition1) { return true; } else { return base.ProcessCmdKey(ref msg, keyData); } break; case Keys.Control |Keys.U: if (this._condition2) { return true; } else { return base.ProcessCmdKey(ref msg, keyData); } break; default: return base.ProcessCmdKey(ref msg, keyData); } return true; It gives me "unreachable code detected" warning on breaks. Is it good practice not to use break operator here ? I don't want to turn off "unreachable code detected" warning. PS: There are many case in my ProcessCmdKey method.

    Read the article

  • Help mod_rewrite to Zeus

    - by FFish
    I just found out my host is on ZEUS.. Please can somebody help me with my rewrites: domain.com/001234 redirects to domain.com/001234-some-keywords.html Apache: RewriteRule ^([0-9]{6}+)/?$ includes/redirect.php?ref=$1 [L] RewriteRule ^([0-9]{6})-.*?\.html$ templates/default/index.php?ref=$1 [L] tried this in Zeus: match URL into $ with ^([0-9]{6}+)/?$ if matched then set URL = includes/redirect.php?ref=$1 endif match URL into $ with ^id/([0-9]+)/?$ if matched then set URL = home/content.php?id=$1 endif

    Read the article

  • How to pass function reference into arguments

    - by Ockonal
    Hi, I'm using boost::function for making function-references: typedef boost::function<void (SomeClass &handle)> Ref; someFunc(Ref &pointer) {/*...*/} void Foo(SomeClass &handle) {/*...*/} What is the best way to pass Foo into the someFunc? I tried something like: someFunc(Ref(Foo));

    Read the article

  • Are reference attributes destroyed when class is destroyed in C++?

    - by Genba
    Suppose I have a C++ class with an attribute that is a reference: class ClassB { ClassA &ref; public: ClassB(ClassA &_ref); } Of course, the constructor is defined this way: ClassB::ClassB(ClassA &_ref) : ref(_ref) { /* ... */ } My question is: When an instance of class 'ClassB' is destroyed, is the object referenced by 'ClassB::ref' also destroyed?

    Read the article

  • Anything wrong with this MySQL quert? takes 10 seconds+ to load

    - by user345426
    I have a search that is taking 10 seconds+ to execute! Keep in mind it is also searching over 200,000 products in the database. I posted the explain and MySQL query here. 1 SIMPLE p ref PRIMARY,products_status,prod_prodid_status,product... products_status 1 const 9048 Using where; Using temporary; Using filesort 1 SIMPLE v ref PRIMARY,vendors_id,vendors_vendorid vendors_vendorid 4 rhinomar_rhinomartnew.p.vendors_id 1 1 SIMPLE s ref products_id products_id 4 rhinomar_rhinomartnew.p.products_id 1 1 SIMPLE pd ref PRIMARY,products,prod_desc_prodid_prodname prod_desc_prodid_prodname 4 rhinomar_rhinomartnew.p.products_id 1 1 SIMPLE p2c ref PRIMARY,ptc_catidx PRIMARY 4 rhinomar_rhinomartnew.p.products_id 1 Using where; Using index 1 SIMPLE c eq_ref PRIMARY PRIMARY 4 rhinomar_rhinomartnew.p2c.categories_id 1 Using where MySQL Query: select p.products_id, p.products_image, p.products_price, p.products_weight, p.products_unit_quantity, s.specials_new_products_price, s.status, pd.products_name, pd.products_img_alt from products p left join vendors v ON v.vendors_id = p.vendors_id left join specials s on s.products_id = p.products_id left join products_description pd on pd.products_id = p.products_id left join products_to_categories p2c on p2c.products_id = p.products_id left join categories c on c.categories_id = p2c.categories_id where ( ( pd.products_name like '%apparel%' ) or p2c.categories_id IN (773, 132, 135, 136, 119, 122, 124, 125, 126, 1749, 1753, 1747, 123, 127, 130, 131, 178, 137, 140, 164, 165, 166, 167, 168, 169, 832, 2045 ) or p.products_id = 'apparel' or p.products_model = 'apparel' or CONCAT(v.vendors_prefix, '-') = 'apparel' or CONCAT( v.vendors_prefix, '-', p.products_id ) = 'apparel' ) and p.products_status = '1' and c.categories_status = '1' group by p.products_id order by pd.products_name

    Read the article

  • How to pipe two CORE::system commands in a cross-platform way

    - by Pedro Silva
    I'm writing a System::Wrapper module to abstract away from CORE::system and the qx operator. I have a serial method that attempts to connect command1's output to command2's input. I've made some progress using named pipes, but POSIX::mkfifo is not cross-platform. Here's part of what I have so far (the run method at the bottom basically calls system): package main; my $obj1 = System::Wrapper->new( interpreter => 'perl', arguments => [-pe => q{''}], input => ['input.txt'], description => 'Concatenate input.txt to STDOUT', ); my $obj2 = System::Wrapper->new( interpreter => 'perl', arguments => [-pe => q{'$_ = reverse $_}'}], description => 'Reverse lines of input input', output => { '>' => 'output' }, ); $obj1->serial( $obj2 ); package System::Wrapper; #... sub serial { my ($self, @commands) = @_; eval { require POSIX; POSIX->import(); require threads; }; my $tmp_dir = File::Spec->tmpdir(); my $last = $self; my @threads; push @commands, $self; for my $command (@commands) { croak sprintf "%s::serial: type of args to serial must be '%s', not '%s'", ref $self, ref $self, ref $command || $command unless ref $command eq ref $self; my $named_pipe = File::Spec->catfile( $tmp_dir, int \$command ); POSIX::mkfifo( $named_pipe, 0777 ) or croak sprintf "%s::serial: couldn't create named pipe %s: %s", ref $self, $named_pipe, $!; $last->output( { '>' => $named_pipe } ); $command->input( $named_pipe ); push @threads, threads->new( sub{ $last->run } ); $last = $command; } $_->join for @threads; } #... My specific questions: Is there an alternative to POSIX::mkfifo that is cross-platform? Win32 named pipes don't work, as you can't open those as regular files, neither do sockets, for the same reasons. The above doesn't quite work; the two threads get spawned correctly, but nothing flows across the pipe. I suppose that might have something to do with pipe deadlocking or output buffering. What throws me off is that when I run those two commands in the actual shell, everything works as expected.

    Read the article

  • How to use a function for every C# WinForm instead of pasting .

    - by nXqd
    protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { { if (keyData == Keys.Escape) this.Close(); return base.ProcessCmdKey(ref msg, keyData); } } I discovered this snippet to close windows form by esc. I really want to implement this to every windows form. I try to create a new abstract class which inherit from Form and another windows form will inherit from this one . But it doesn't work this way . abstract class AbsForm: Form { protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { { if (keyData == Keys.Escape) this.Close(); return base.ProcessCmdKey(ref msg, keyData); } } } public partial class HoaDonBanSach : AbsForm { public HoaDonBanSach() { InitializeComponent(); } Thanks for reading this :)

    Read the article

  • Identifying if a user is in the local administrators group

    - by Adam Driscoll
    My Problem I'm using PInvoked Windows API functions to verify if a user is part of the local administrators group. I'm utilizing GetCurrentProcess, OpenProcessToken, GetTokenInformationand LookupAccountSid to verify if the user is a local admin. GetTokenInformation returns a TOKEN_GROUPS struct with an array of SID_AND_ATTRIBUTES structs. I iterate over the collection and compare the user names returned by LookupAccountSid. My problem is that, locally (or more generally on our in-house domain), this works as expected. The builtin\Administrators is located within the group membership of the current process token and my method returns true. On another domain of another developer the function returns false. The LookupAccountSid functions properly for the first 2 iterations of the TOKEN_GROUPS struct, returning None and Everyone, and then craps out complaining that "A Parameter is incorrect." What would cause only two groups to work correctly? The TOKEN_GROUPS struct indicates that there are 14 groups. I'm assuming it's the SID that is invalid. Everything that I have PInvoked I have taken from an example on the PInvoke website. The only difference is that with the LookupAccountSid I have changed the Sid parameter from a byte[] to a IntPtr because SID_AND_ATTRIBUTESis also defined with an IntPtr. Is this ok since LookupAccountSid is defined with a PSID? LookupAccountSid PInvoke [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] static extern bool LookupAccountSid( string lpSystemName, IntPtr Sid, StringBuilder lpName, ref uint cchName, StringBuilder ReferencedDomainName, ref uint cchReferencedDomainName, out SID_NAME_USE peUse); Where the code falls over for (int i = 0; i < usize; i++) { accountCount = 0; domainCount = 0; //Get Sizes LookupAccountSid(null, tokenGroups.Groups[i].SID, null, ref accountCount, null, ref domainCount, out snu); accountName2.EnsureCapacity((int) accountCount); domainName.EnsureCapacity((int) domainCount); if (!LookupAccountSid(null, tokenGroups.Groups[i].SID, accountName2, ref accountCount, domainName, ref domainCount, out snu)) { //Finds its way here after 2 iterations //But only in a different developers domain var error = Marshal.GetLastWin32Error(); _log.InfoFormat("Failed to look up SID's account name. {0}", new Win32Exception(error).Message); continue; } If more code is needed let me know. Any help would be greatly appreciated.

    Read the article

  • C++ reference variable again!!!

    - by kumar_m_kiran
    Hi All, I think most would be surprised about the topic again, However I am referring to a book "C++ Common Knowledge: Essential Intermediate Programming" written by "Stephen C. Dewhurst". In the book, he quotes a particular sentence (in section under Item 5. References Are Aliases, Not Pointers), which is as below A reference is an alias for an object that already exists prior to the initialization of the reference. Once a reference is initialized to refer to a particular object, it cannot later be made to refer to a different object; a reference is bound to its initializer for its whole lifetime Can anyone please explain the context of "cannot later be made to refer to a different object" Below code works for me, #include <iostream> using namespace std; int main(int argc, char *argv[]) { int i = 100; int& ref = i; cout<<ref<<endl; int k = 2000; ref = k; cout<<ref<<endl; return 0; } Here I am referring the variable ref to both i and j variable. And the code works perfectly fine. Am I missing something? I have used SUSE10 64bit linux for testing my sample program. Thanks for your input in advance.

    Read the article

  • Mysql - GROUP BY Avoid using tempoary

    - by jwzk
    The goal of this query is to get a total of unique records (by IP) per ref ID. SELECT COUNT(DISTINCT ip), GROUP_CONCAT(ref.id) FROM `sess` sess JOIN `ref` USING(row_id) WHERE sess.time BETWEEN '2010-04-21 00:00:00' AND '2010-04-21 23:59:59' GROUP BY ref.id ORDER BY sess.time DESC The query works fine, but its using a temporary table. Any ideas?

    Read the article

  • jQuery, wont change value but will change any othere attribute...

    - by Phil Jackson
    function send_mail( token, loader ) { $(".send_mail").bind( "click", function() { try{ var to = $(this).attr('ref'); var mail_form = $("#mail_form"); mail_form.find("li:eq(0) input").val("sdsds"); //mail_form.find("li:eq(0) input").attr("ref", "sdsds"); //mail_form.find("li:eq(0) input").attr("value", "sdsds"); $.fancybox(mail_form.html(), { 'autoDimensions' : false, 'width' : 360, 'height' : 200, 'transitionIn' : 'none', 'transitionOut' : 'none', 'scrolling' : 'no', 'showCloseButton' : false }); return false; }catch(err){alert(err);} }); } My problem being that the above will not work yet if I use //mail_form.find("li:eq(0) input").attr("ref", "sdsds"); it will change the ref and even //mail_form.find("li:eq(0) input").attr("value", "sdsds"); will not work... Any ideas whats happening here?

    Read the article

  • To bring the IE window in front of the Screen

    - by Parameswari
    I am creating new IE browser instance dynamically, and opening a aspx page from there. Everything works fine , but the browser is not popping in the Front of the screen .Able to see the Aspx page in the task bar when I click it from there it comes to the Front . How to bring that page in front of all the Screen as soon as IE is created. I have pasted the code I used to create new IE instance. public class IEInstance { public SHDocVw.InternetExplorer IE1; public void IEInstanceCls(string check) { IE1 = new SHDocVw.InternetExplorer(); object Empty = 0; string urlpath = " "; urlpath = "http://localhost/TestPage.aspx?"; object URL = urlpath; IE1.Top = 260; IE1.Left = 900; IE1.Width = 390; IE1.Height = 460; IE1.StatusBar = false; IE1.ToolBar = 0; IE1.MenuBar = false; IE1.Visible = true; IE1.Navigate2(ref URL, ref Empty, ref Empty, ref Empty, ref Empty); } } Help me to solve this problem. Thank You

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >