Daily Archives

Articles indexed Saturday April 24 2010

Page 7/78 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • any ideas how to make checked treeview inside multiselect jqeury?

    - by B_S
    i planned to make checked treeview inside a multiselect jquery. The left side was the checked treeview, if we choose the child, the one moving to the right side was the child and the parent title, and if we choose the parent, all of the child will be moving right. I found some of the example, but they're in vb, can jqeury make something like this?

    Read the article

  • Installing Recaptcha in Joomla 1.5 user registration

    - by Samuel
    I am trying to install ReCaptcha into the user registration of Joomla 1.5. This may just be an issue with Joomla but when i hit register nothing happens. I think it's doing some JavaScript form validation but there is nothing telling the user what went wrong. if, God forbid, they do fill out the form correctly Joomla will redirect the user to the homepage and give no notice of success. Is this a Joomla issue or is there something wrong with my install? Does anyone know of a plug-in or module for Joomla that would make this easier? Thanks in advance, Samuel UPDATE: Joomla does a lot of "stuff"/"something" to the $_POST and $_GET variables which was causing the reCaptcha to not function. This was for work which is past so I am not spending anymore time on it. Shameless Plug: use wordpress instead. this can be closed as I don't have time to verify which answer works

    Read the article

  • solr range query errors

    - by mquinsland
    http://localhost:8983/solr/select?wt=json&q=lat:[35%20to%2038] results in **org.apache.lucene.queryParser.ParseException: Cannot parse 'lat:[35 to 38]': Encountered " "38 "" at line 1, column 11. Was expecting: "]" This is a pretty basic range query and this error will prevent us from using SOLR for our projects

    Read the article

  • How to use Scala in IntelliJ IDEA (or: why is it so difficult to get a working IDE for Scala)?

    - by Alex R
    I recently gave up trying to use Scala in Eclipse (basic stuff like completion doesn't work). So now I'm trying IntelliJ. I'm not getting very far. I've been able to edit programs (within syntax highlighting and completion... yay!). But I'm unable to run even the simplest "Hello World". This was the original error: Scala signature Predef has wrong version Expected 5.0 found: 4.1 in .... scala-library.jar But that was yesterday with IDEA 9.0.1. See below... UPDATE Today I uninstalled IntelliJ 9.0.1, and installed 9.0.2 Early Availability, with the 4/14 stable version of the Scala plug-in. Then I setup a project from scratch through the wizards: new project from scratch JDK is 1.6.u20 accept the default (project) instead of global / module accept the download of Scala 2.8.0beta1 into project's lib folder Created a new class: object hello { def main(args: Array[String]) { println("hello: " + args); } } For my efforts, I now have a brand-new error :) Here it is: Scalac internal error: class java.lang.ClassNotFoundException [java.net.URLClassLoader$1.run(URLClassLoader.java:202), java.security.AccessController.doPrivileged(Native Method), java.net.URLClassLoader.findClass(URLClassLoader.java:190), java.lang.ClassLoader.loadClass(ClassLoader.java:307), sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301), java.lang.ClassLoader.loadClass(ClassLoader.java:248), java.lang.Class.forName0(Native Method), java.lang.Class.forName(Class.java:169), org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:72)] FINAL UPDATE I uninstalled 9.0.2 EA and reinstalled 9.0.1, but this time went with the 2.7.3 version of Scala rather than the default 2.7.6, because 2.7.3 is the one shown in the screen-shots at the IntelliJ website (I guess the screen-shots prove that they actually tested this version!). Now everything works!!!

    Read the article

  • questions on nfa and dfa..

    - by Loop
    Hi Guys... Hope you help me with this one.... I have a main question which is ''how to judge whether a regular expression will be accepted by NFA and/or DFA? For eg. My question says that which of the regular expressions are equivalent? explain... 1.(a+b)*b(a+b)*b(a+b)* 2.a*ba*ba* 3.a*ba*b(a+b)* do we have to draw the NFA and DFA and then find through minimisation algorithm? if we do then how do we come to know that which regular expression is accepted by NFA/DFA so that we can begin with the answer? its so confusing.... Second is a very similar one, the question asks me to show that the language (a^nb^n|n1} is not accepted by DFA...grrrrr...how do i know this? (BTW this is a set of all strings of where a number of a's is followed by the same number of b's).... I hope I explained clearly well....

    Read the article

  • Making a sqlite file stay existent between runs of the program

    - by Cocorico
    Hi! I'm having a problem with some sqlite code for an iPhone program in Xcode. I was opening my database like this: int result = sqlite3_open("stealtown.db", &database); Which is how they had it in a book I was looking at while I type the program. But then, that way of opening a database it only works when you run in simulator, not on device. So I finally figure out I need to do this: NSString *file = [[NSBundle mainBundle] pathForResource:@"stealtown" ofType:@"db"]; int result = sqlite3_open([file UTF8String], &database); And that works on device, EXCEPT one thing: Each time you launch the program, it starts as if you had never created the database, and when you stick an entry in the table, it's the ONLY entry in that table. When I used the first code on the simulator, I could open my program 6 times, each time adding 1 entry to a table, and at the end, I had 6 entries in that table. With the second code, I do exact same thing but each time there is only 1 entry in that table. Am I explaining this okay, I hope so, it's hard sometimes for me. Anyone maybe know why this would be?

    Read the article

  • Java Loop every minute.

    - by Robert
    I want to write a loop in Java that firs starts up and goes like this: while (!x){ //wait one minute or two //execute code } I want to do this so that it does not use up system resources. What is actually going on in the code is that it goes to a website and checks to see if something is done, if it is not done, it should wait another minute until it checks again, and when its done it just moves on. Is their anyway to do this in java? I googled it but didnt find anything. Thanks

    Read the article

  • Need to convert string/char to ascii values.

    - by SA
    Hi, I need to convert char to hex values. Refer to the Ascii table but I have a few examples listed below: char 1 = 31 2 = 32 3 = 33 4 = 34 5 = 35 A = 41 a = 61 etc Therefore string str = "12345"; Need to get the converted str = "3132333435"

    Read the article

  • Ruby efficient way of building an array from an array of arrays

    - by randombits
    I have an array of ActiveRecord objects, each one which has its own respective errors array. I want to flatten it all out and get only the unique values into one array. So the top level array might look like: foo0 = Foo.new foo1 = Foo.new foo2 = Foo.new foo3 = Foo.new arr = [foo0, foo1, foo2, foo3] Each one of those objects could potentially have an array of errors, and I'd like to get just the unique message out of them and put them in another array, say called error_arr. How would you do it the "Ruby" way?

    Read the article

  • What exactly does this PHP code do?

    - by Rob
    Alright, my friend gave me this code for requesting headers and comparing them to what the header should be. It works perfectly, but I'm not sure why. Here is the code: $headers = apache_request_headers(); $customheader = "Header: 7ddb6ffab28bb675215a7d6e31cfc759"; foreach ($headers as $header => $value) { // 1 $custom .= "$header: $value"; // 2 } $mystring = $custom; // 3 $findme = $customheader; // 4 $pos = strpos($mystring, $findme); if ($pos !== false) { // Do something } else{ exit(); } //If it doesn't match, exit. I commented with some numbers relating to the following questions: 1: What exactly is happening here? Is it setting the $headers as $header AND $value? 2: Again, don't have any idea what is going on here. 3: Why set the variable to a different variable? This is the only area where the variable is getting used, so is there a reason to set it to something else? 4: Same question as 3. I'm sorry if this is a terrible question, but its been bothering me, and I really want to know WHY it works. Well, I understand why it works, I guess I just want to know more specifically. Thanks for any insight you can provide.

    Read the article

  • Problem with Gregorian Calendar hour of day in java

    - by Leanne C
    hi, I'm using a Gregorian Calendar to set a specific date and time to an application using the set function of the Gregorian Calendar. When i use the getTime() method, it gives me the right output however when i try to access the Hour_Of_Day and Minute it gives a wrong number. Calendar time = new GregorianCalendar(); time.set(2010, Calendar.JANUARY, 1, 7, 20,0); hour = time.HOUR_OF_DAY; minute = time.MINUTE; The hour gives an output of 11 and the minute gives an a value of 12. Any suggestions on how to fix this? Thanks

    Read the article

  • Google App Engine JDO how to define instance fields ?

    - by Frank
    I have a class like this : import java.io.*; import java.util.*; public class Contact_Info_Entry implements Serializable { public static final long serialVersionUID=26362862L; String Contact_Id,First_Name="",Last_Name="",Company_Name="",Branch_Name="",Address_1="",Address_2="",City="",State="",Zip="",Country="",E_Mail="",Phone; int I_1,I_2; float F_1,F_2; boolean B_1,B_2; GregorianCalendar Date_1, Date_2; Vector<String> A_Vector=new Vector<String>(); public Contact_Info_Entry() { } ...... } If I want to translate it to a class for JDO, do I need to define each field by it self or can I do a group at a time ? For instance do I have to make it like this : @PersistenceCapable(identityType=IdentityType.APPLICATION) public class Contact_Info_Entry implements Serializable { @PrimaryKey @Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY) private Long id; @Persistent public static final long serialVersionUID=26362862L; @Persistent String Contact_Id; @Persistent String First_Name; @Persistent String Last_Name; ...... @Persistent int I_1; @Persistent int I_2; ... @Persistent float F_1; ... @Persistent boolean B_1; @Persistent boolean B_2; @Persistent GregorianCalendar Date_1; ... @Persistent Vector<String> A_Vector=new Vector<String>(); public Contact_Info_Entry() { } ...... } Or can I do a group at a time like this : @PersistenceCapable(identityType=IdentityType.APPLICATION) public class Contact_Info_Entry implements Serializable { @PrimaryKey @Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY) private Long id; @Persistent public static final long serialVersionUID=26362862L; @Persistent String Contact_Id,First_Name,Last_Name=""; ...... @Persistent int I_1=0,I_2=1; ... @Persistent float F_1; ... @Persistent boolean B_1,B_2; @Persistent GregorianCalendar Date_1; ... @Persistent Vector<String> A_Vector=new Vector<String>(); public Contact_Info_Entry() { } ...... } Or can I skip the "@Persistent" all together like this : import java.io.*; import java.util.*; @PersistenceCapable(identityType=IdentityType.APPLICATION) public class Contact_Info_Entry implements Serializable { public static final long serialVersionUID=26362862L; String Contact_Id,First_Name="",Last_Name="",Company_Name="",Branch_Name="",Address_1="",Address_2="",City="",State="",Zip="",Country="", E_Mail="",Phone; int I_1,I_2; float F_1,F_2; boolean B_1,B_2; GregorianCalendar Date_1, Date_2; Vector<String> A_Vector=new Vector<String>(); public Contact_Info_Entry() { } ...... } Which are correct ? Frank

    Read the article

  • Creating WCF DataContracts dynamically from code

    - by Fredrik Tonn
    Given the fact that I have a fully dynamic object model, that is, I have no concrete classes defined anywhere in code, but I still want to be able to create WCF DataContracts for them so I can use them in operations. How can I achieve this? My concrete class "Entity" implements ICustomTypeDescriptor which is used to present the various properties to the outside world, but my expeimentation with WCF suggests that WCF does not care about ICustomTypeDescriptor. Is this correct or have I missed something? Is this possible? It cannot be so that the only way to create a DataContract is to actually have a concrete harcoded class, can it?

    Read the article

  • Editing Mac OS X login items in Objective-C through AppleScript

    - by mon4goos
    In my Cocoa program, I want to examine what programs are registered to run at startup and modify that list as I feel appropriate. In order to be compatible with Tiger it seems like I need to work through AppleScript. I currently have the following code: NSDictionary* errorDict; NSAppleEventDescriptor* returnDescriptor = NULL; NSString *appleSource = @"tell application \"System Events\"\n\ get every login item\n\ end tell"; NSAppleScript *appleScript = [[NSAppleScript alloc] initWithSource: appleSource]; returnDescriptor = [appleScript executeAndReturnError: &errorDict]; If I run that command in AppleScript, I get back an array of login items. However, I can't figure out how to iterate through this array in Objective-C. More specifically, I want to examine the names and paths of the programs registered to run at startup. Any ideas?

    Read the article

  • "Request not supported" in IPCONFIG (WinXP SP3)

    - by pablog
    In a customer PC (Windows XP SP3), suddenly the network went down: the network adapter appears with an error mark. I replaced the network card, but the new one does the same thing. When I enter IPCONFIG, XP shows this error (in standard and safe mode): Internal error occurred Request not supported Unable to query host name If I start the system with a boot cd the PC runs fine, so the problem seems to be in the XP installation. I tried: uninstalling and reinstalling the network card in the Device Manager disabling and reenabling the card netsh int ip reset netsh winsock reset catalog and a couple of "reset" programs (WinsockxpFix.exe, etc) with no luck. Is there any way to fix it without reinstalling XP? TIA, Pablo

    Read the article

  • Creating a simple JQuery tooltip?

    - by Mike El Panther
    Has anybody here got any experience in creating simple tooptips using JQuery? I have created a table: <tr id="mon_Section"> <td id="day_Title">Monday</td>` <td id="mon_Row" onmousemove="calculate_Time(event)"></td> </tr>` the function "calculate_Time" will be called and this gets the X position of the mouse cursor and from the value, uses IF and ELSE-IF statements to calculate the values of other variables i have created: var mon_Pos; var hour; var minute; var orig; var myxpos; function calculate_Time(event) { myxpos = event.pageX; myxpos = myxpos-194; if (myxpos<60) { orig = myxpos; minute = myxpos; hour = 07; } else if (myxpos>=60 && myxpos<120) { orig = myxpos; minute=myxpos-60; hour=08; } } How do i go about creating a stylized tooltip containing the Hour and Minute variables that i created, I need the tooltip to be updated everytime the X position of the cursor changes. I know that with myxpos variable does change whenever the mouse is moved because i tried it out using an alert(myxpos) and as expected, if the mouse moves, a new alert box popups with a new value. I just cant work out how to place that value in a tooltip?

    Read the article

  • Blogger Template: how to change the color of the border css

    - by Lirik
    Hi, I'm trying to change the borders in the style sheet of the template on my blog, but I've never done anything with css so I'm a little bit at a loss... I want to keep the dark background, but I want to create a small border with a slightly different color around my postings. If my guess is correct, then I should modify some of these definitions: body { background:$bgcolor; margin:0; color:$textcolor; font: x-small "Trebuchet MS", Trebuchet, Verdana, Sans-serif; font-size/* */:/**/small; font-size: /**/small; text-align: center; } a:link { color:$linkcolor; text-decoration:none; } a:visited { color:$visitedlinkcolor; text-decoration:none; } a:hover { color:$titlecolor; text-decoration:underline; } a img { border-width:0; } Here is a pastie with the entire template I'm using: http://pastie.org/932535 Is there a quick way to achieve the desired effect? Your help is appreciated!

    Read the article

  • read http header info in ASIHttpRequest asynchronous

    - by user262325
    Hello everyone One of my project is to download several large size files using ASIHTTPRequest in asynchronous mode. I hope to read the http returned header info to get the size of files. I know [request respsonseHeaders] (requestFinished: delegate method ) can do that. I tested and found that requestFinished: is only triggered when it completed the download of a whole single file. But I hope to access the function [request respsonseHeaders] before ASIHTTPRequest starting to download files (just when ASIHTTPRequest got the returned header info). I can not find the triggered event for this. Welcome any comment Thanks interdev

    Read the article

  • Timeout settings for Remote Desktop Sessions to lock

    - by atroon
    Our office uses a Windows 2003 server to provide access to an accounting application. Recently I was asked to increase the amount of time it takes for the session to lock itself and require the entry of the user's password to resume. That seems to be about ten minutes, at present. I am familiar with group policy and have tweaked those settings to scavenge sessions (and thereby licenses) from sessions that have been disconnected (by the user closing the mstsc.exe client or by a network issue). That's simple and straightforward. But I can't find anything in GP to allow a longer time period before the RDP client window goes black and then, when clicked upon, requires a username and password to resume the session. I must admit this would be nice personally as well, since most of my time is spent documenting the application and/or monitoring its database, so I usually have a window open to the terminal server along with the rest of the staff in the accounting center, but I interact with it very little. I usually enter my password 10-15 times per workday, but I'm pretty good at it by now. ;) So, can this timeout period be adjusted, or are we out of luck?

    Read the article

  • wich adserver is the best?

    - by rroberto
    I am so sick of OpenX, please recommend me a new Adserver that i can install on my server. Doesnt matter if its not free, we want to make money so its an investment. Thanks a lot! LAMP environment btw.

    Read the article

  • O(log n) algorithm for merging lists and computing rank?

    - by Eternal Learner
    Given two sorted lists, each containing n real numbers, is there a O(log?n) time algorithm to compute the element of rank i (where i coresponds to index in increasing order) in the union of the two lists, assuming the elements of the two lists are distinct? I can think of using a Merge procedure to merge the 2 lists and then find the A[i] element in constant time. But the Merge would take O(n) time. How do we solve it in O(log n) time?

    Read the article

  • WordPress - Each page of paged posts all show same posts

    - by j-man86
    I set up a pagination function for my wordpress blog. When clicking to the next page, the URL is correct: "/page/1", "/page/2", "/page/3" etc, but the actual posts don't change from page to page (page 2 and page 3 still display the first page of posts). Here's the code I'm using for the loop: <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $sticky=get_option('sticky_posts'); $args=array( 'offset' => 1, 'category__not_in' => array(-6), 'paged'=>$paged, 'showposts' => 6, ); query_posts($args); if ( $wp_query->have_posts() ) : while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?> Any help/insight would be much appreciated. Thank you!

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >