Search Results

Search found 440 results on 18 pages for 'jake mach'.

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

  • Apply CSS style to anchor problem

    - by Jake
    Using jquery I have a clicking tab mechanism that are nothing but anchor tags that return false but call javascript functions to run some events on the page. The problem is I am using jquery to apply an opacity style to the active anchor. and the other sibling anchor get a lesser opacity view. My code looks like this $("#menutab li a").click(function(){ $(this).animate({opacity:'1'},1000); $(this).siblings().animate({opacity:'.25'},1000); } I would think this code would act only on the clicked element and apply that css style to that element and the other style to the other anchor tags except the clicked one. It kind of does that, but also what it does is leave the earlier clicked element to opacity =1, so if I click an element it sets it opacity to 1 and then if I click another one it sets it opacity to 1 while leave the earlier clicked one to 1 also instead of setting it to .25 like the others. Edit: I changed the above code to: $("#menutab ul li").click(function(){ $(this).children().animate({opacity:'1'},1000); $(this).siblings().children().animate({opacity:'.25'},1000); }); and now I get the desired effect, except that when the first anchor in the list is clicked doesn't follow the event rules, When the first one is clicked its as if, the click event is not triggered, because no opacity style changes. which I don't understand.

    Read the article

  • How do i program a simple IRC bot in python?

    - by Jake
    Hi every one. I need help writing a basic IRC bot that just connects to a channel.. is anyone able to explain me this? I have managed to get it to connect to the IRC server but i am unable to join a channel and log on. The code i have thus far is: import sockethost = 'irc.freenode.org' port = 6667 join_sock = socket.socket() join_sock.connect((host, port)) <code here> Any help would be greatly appreciated.

    Read the article

  • Technique to remove common words(and their plural versions) from a string

    - by Jake M
    I am attempting to find tags(keywords) for a recipe by parsing a long string of text. The text contains the recipe ingredients, directions and a short blurb. What do you think would be the most efficient way to remove common words from the tag list? By common words, I mean words like: 'the', 'at', 'there', 'their' etc. I have 2 methodologies I can use, which do you think is more efficient in terms of speed and do you know of a more efficient way I could do this? Methodology 1: - Determine the number of times each word occurs(using the library Collections) - Have a list of common words and remove all 'Common Words' from the Collection object by attempting to delete that key from the Collection object if it exists. - Therefore the speed will be determined by the length of the variable delims import collections from Counter delim = ['there','there\'s','theres','they','they\'re'] # the above will end up being a really long list! word_freq = Counter(recipe_str.lower().split()) for delim in set(delims): del word_freq[delim] return freq.most_common() Methodology 2: - For common words that can be plural, look at each word in the recipe string, and check if it partially contains the non-plural version of a common word. Eg; For the string "There's a test" check each word to see if it contains "there" and delete it if it does. delim = ['this','at','them'] # words that cant be plural partial_delim = ['there','they',] # words that could occur in many forms word_freq = Counter(recipe_str.lower().split()) for delim in set(delims): del word_freq[delim] # really slow for delim in set(partial_delims): for word in word_freq: if word.find(delim) != -1: del word_freq[delim] return freq.most_common()

    Read the article

  • Botan linking error on Windows MSVC

    - by Jake Petroules
    I am trying to compile a library linking to the version of Botan from the Qt Creator sources with MSVC 2008 but am receiving the following error. MinGW compiles and links it fine. What is the issue? databasecrypto.obj:-1: error: LNK2019: unresolved external symbol "public: static unsigned int const Botan::Pipe::DEFAULT_MESSAGE" (?DEFAULT_MESSAGE@Pipe@Botan@@2IB) referenced in function "private: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl DatabaseCrypto::b64_encode(class Botan::SecureVector<unsigned char> const &)" (?b64_encode@DatabaseCrypto@@CA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$SecureVector@E@Botan@@@Z) /*! Encodes the Botan byte array \a in as a base 64 string. \param in The Botan byte array to encode. */ std::string DatabaseCrypto::b64_encode(const SecureVector<Botan::byte> &in) { Pipe pipe(new Base64_Encoder); pipe.process_msg(in); return pipe.read_all_as_string(); // <-- default parameter here is Botan::Pipe::DEFAULT_MESSAGE }

    Read the article

  • Why isn't this simple PHP Forloop working?

    - by Jake
    First here's the code: <?php $qty = $_GET['qty']; for($i=0; $i < $qty; $i++) { setcookie('animals', $_COOKIE['animals'].'(lion)', time()+3600); } ?> Here's what I'm trying to do: I want to set the value of the "animals" cookie to "(lion)". The number of instances of "(lion)" that should be in the cookie is determined by the "qty" GET parameter's value. So for example if the pages url is: http://site.com/script.php?qty=10 then the value of the cookie should be: (lion)(lion)(lion)(lion)(lion)(lion)(lion)(lion)(lion)(lion) but now it just sets the value once despite the setcookie function being inside the loop, why isn't it working?

    Read the article

  • Database Design: A proper table design for large number of column values.

    - by Jake
    I wish to perform an experiment many different times. After every trial, I am left with a "large" set of output statistics -- let's say, 1000. I would like to store the outputs of my experiments in a table, but what's the best way...? Option 1 Have a table with 1000 columns. Seems like a bad idea. What if the number of statistics one day exceeds the maximum number of columns? Option 2 Have a table with three columns. Let's say, ID, StatisticType, and StatisticValue. That way, you can have as many statistics as you want. However, reading a single experiments statistics becomes more complicated. Moreover, what if different statistics are different data types?? Any suggestions?

    Read the article

  • Developing Qt applications in Unix systems using Qt Creator

    - by Jake Petroules
    I'm developing a Qt application in Linux using Qt Creator (2.1 RC). I've created 2 projects, and used the wizard to add the library project to the application project. However when I run it, I receive the error: /home/jakepetroules/silverlock/silverlock-build-desktop/desktop/silverlock: error while loading shared libraries: libsilverlocklib.so.1: cannot open shared object file: No such file or directory Is there some qmake variable I can set so that Qt Creator will set up the environment properly to run? It's quite annoying to have to copy all the files to another directory with a launcher script just to be able to test the build. On Windows it works perfectly - Qt Creator automatically adds the directories containing the DLLs to the PATH when it runs your application (where running it from Explorer would say DLL not found). Mac OS X is even worse, having to run install_name_tool on everything... So how can I set up my qmake files so everything works right from the run button in Qt Creator? Kind of hard to debug without this ability, too.

    Read the article

  • ASP.NET and SQL server with huge data sets

    - by Jake Petroules
    I am developing a web application in ASP.NET and on one page I am using a ListView with paging. As a test I populated the table it draws from with 6 million rows. The table and a schema-bound view based off it have all the necessary indexes and executing the query in SQL Server Management Studio with SELECT TOP 5 returned in < 1 second as expected. But on the ASP.NET page, with the same query, it seems to be selecting all 6 million rows without any limit. Shouldn't the paging control limit the query to return only N rows rather than the entire data set? How can I use these ASP.NET controls to handle huge data sets with millions of records? Does SELECT [columns] FROM [tablename] quite literally mean that for the ListView, and it doesn't actually inject a TOP <n> and does all the pagination at the application level rather than the database level?

    Read the article

  • Trouble defining a variable in PHP?

    - by Jake
    Alright, so a content page uses this: $tab = "Friends"; $title = "User Profile"; include '(the header file, with nav)'; And the header page has the code: if ($tab == "Friends") { echo '<li id="current">'; } else { echo '<li>'; } The problem is, that the if $tab == Friends condition is never activated, and no other variables are carried from the the content page, to the header page. Does anyone know what I'm doing wrong? Update: Alright, the problem seemed to disappear when I used ../scripts/filename.php, and only occurred when I used a full URL? Any ideas why?

    Read the article

  • How can I move the clear button in a UITextField?

    - by Jake
    For some reason, when I add a UITextfield as a subview of the contentview of a tablecell, the clearbutton does not align with the text typed in the field, and appears a bit underneath it. Is there any way I can move the text of the clearbutton to stop this from happening? Thanks for any help,

    Read the article

  • rename an html page according to an image within it

    - by Jake
    Hi, firstly I'll give some background regarding the situation. I have a website containing approximately 56k pages each page contain a mapped sketch of a machine part. this machine part is made out of smaller parts which are outlined in the image and hold a certain number. when you hover over the numbers a box with the part item code shows up. I order parts according to this item codes but recently a lot of the items codes have changed, therefore I am looking for a solution. now I own a database with data on all the 56k parts and I want to link the relevant webpage to each record according to the name of the part(a column in my database), the problem is that the webpages names has no logic name that could connect with the part name in any way but the image that is displayed in the page has the exact name of the part. I want to rename all the html files I has according to the Images displayed within them. how can I achieve that without renaming all the 56k pages manually? additionally how can I add the links to all the 56k pages automatically to my database after all the above is done? Thank you for your patience I know it was long.

    Read the article

  • access JRUN jndi environment vaiables from coldfusion (java)

    - by jake
    I want to put some instance specific configuration information in JNDI. I looked at the information here: http://www.adobe.com/support/jrun/working_jrun/jrun4_jndi_and_j2ee_enc/jrun4_jndi_and_j2ee_enc03.html I have added this node to the web.xml: <env-entry> <description>Administrator e-mail address</description> <env-entry-name>adminemail</env-entry-name> <env-entry-value>[email protected]</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> In coldfusion I have tried several different approaches to querying the data: <cfset ctx = createobject("java","javax.naming.InitialContext") > <cfset val = ctx.lookup("java:comp/env") > That lookup returns a jrun.naming.JRunNamingContext. If i preform a lookup on ctx for the specific binding I am adding I get an error. <cfset val = ctx.lookup("java:comp/env/adminemail") > No such binding: adminemail Preforming a listBindings returns an empty jrun.naming.JRunNamingEnumeration. <cfset val = ctx.listBindings("java:comp/env") > I only want to put a string value (probably several) into the ENC (or any JNDI directory at this point).

    Read the article

  • What type of web service should I put together?

    - by Jake
    I want to write a web service using Visual Studio. The service needs to support some type of authentication, and should be able to receive commands via simple HTTP GET requests. The input would only be a method call with some parameters, and the responses will be simple status/error codes. My instinct would be to go with an ASP.NET Web Service, but this isn't an option in C# 4.0 and it makes me wonder if I should be using something that's more up-to-date. I've looked into WCF, but it seems like this requires a running application on the client-side - is there a way to query a WCF host by just accessing a URL? The authentication is also an important piece. Developing my own little authentication system seems like a bad idea - I've read that it's too easy to mess up. What would be the standard way of authenticating with a web service like this? I'd love to look up all of the specifics on this and learn it myself, but I really don't even know where to begin. Some direction would be greatly appreciated!

    Read the article

  • MySQL default value based on view

    - by Jake
    Basically I have a bunch of views based on a simple discriminator column (eg. CREATE VIEW tablename AS SELECT * FROM tablename WHERE discrcolumn = "discriminator value"). Upon inserting a new row into this view, it should insert "discriminator value" into discrcolumn. I tried this, but apparently MySQL doesn't figure this out itself, as it throws an error "Field of view viewname underlying table does not have a default value". The discriminator column is set to NOT NULL of course. How do I mend this? Perhaps a pre-insert trigger? UPDATE: Triggers won't work on views, see below comment. Would it work to create a trigger on the table which uses a variable, and set that variable at establishing the connection? For each connection the value of that variable would be the same, but it could differ from other connections. EDIT: This appears to work... Setup: CREATE TRIGGER insert_[tablename] BEFORE INSERT ON [tablename] FOR EACH ROW SET NEW.[discrcolumn] = @variable Runtime: SET @variable = [descrvalue]; INSERT INTO [viewname] ([columnlist]) VALUES ([values]);

    Read the article

  • Is there a good way to copy a Gtk widget?

    - by Jake
    Is there a way, using the Gtk library in C, to clone a Gtk button (for instance), and pack it somewhere else in the app. I know you can't pack the same widget twice. And that this code obviously wouldn't work, but shows what happens when I attempt a shallow copy of the button: GtkButton *a = g_object_new(GTK_TYPE_BUTTON, "label", "o_0", NULL); GtkButton *b = g_memdup(b, sizeof *b); gtk_box_pack_start_defaults(GTK_BOX(vbox), GTK_WIDGET(b)); There is surrounding code which creates a vbox and packs it in a window and runs gtk_main(). This will result in these hard to understand error messages: (main:6044): Gtk-CRITICAL **: gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed (main:6044): Gtk-CRITICAL **: gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed ** Gtk:ERROR:/build/buildd/gtk+2.0-2.18.3/gtk/gtkwidget.c:8431:gtk_widget_real_map: assertion failed: (GTK_WIDGET_REALIZED (widget)) Along the same lines, if I were to write my own GObject (not necessarily a Gtk widget), is there a good way to write a copy constructor. Im thinking it should be an interface with optional hooks and based mostly on the properties, handling the class's hierarchy in some way. I'd want to do this: GtkButton *b = copyable_copy(COPYABLE(a)); If GtkButton could use a theoretical copyable interface.

    Read the article

  • Java. Best procedure to de-serialize a Java generic object?

    - by Jake
    What is the best procedure for storing and retrieving, using native Java serialization, generic objects like ArrayList<String>? Edit: To clarify. When I serialize an object of type ArrayList<String> I'd like to de-serialize to the same type of object. However, I know of no way to cast back to this generic object without causing warnings.

    Read the article

  • Django many-to-many relationship to self with extra data, how do I select from a certain direction?

    - by Jake
    I have some hierarchical data where each Set can have many members and can belong to more than one Set(group) Here are the models: class Set(models.Model): ... groups = models.ManyToManyField('self', through='Membership', symmetrical=False) members = models.ManyToManyField('self', through='Membership', symmetrical=False) class Membership(models.Model): group = models.ForeignKey( Set, related_name='Members' ) member = models.ForeignKey( Set, related_name='Groups' ) order = models.IntegerField( default=-1 ) I want to know how to get all the members or all the groups for a Set instance. I think I can do it as follows, but it's not very logical, can anyone tell me what's going on and how I should be doing it? # This gives me a set of Sets # Which seems to be the groups this Set belongs to set_instance.set_set.all() # These give me a set of Memberships, not Sets set_instance.Members.all() set_instance.Groups.all() # These they both return a set of Sets # which seem to be the members of this one set_instance.members.all() set_instance.groups.all()

    Read the article

  • Java: Finding objects in collections.

    - by Jake
    This problem occurs over and over. I have some complicated object, such as a Cat, which has many properties, such as age, favorite cat food, and so forth. A bunch of Cats are stored in a Java Collection, and I need to find all the Cats that are aged 3, or those whose favorite cat food is Whiskas. Surely, I can write a custom method that finds those Cats with a specific property, but this gets cumbersome with many properties; is there some generic way of doing this?

    Read the article

  • Is naming a software product the same as a book legally problematic?

    - by Jake Petroules
    I came up with a name for a software product I'm developing. It's composed of two common English words put together (for example, Firefox, Silverlight, etc.). I Googled the name to see if it was being used by any other software product before committing to it. After finding none, I did notice that there is a book published around 60 years ago, by that same name. Would it be legally problematic to name my software product as such, or does it being a software product vs a book make it irrelevant? PS - I know this isn't really a programming question, but naming is related to software development, isn't it? ;) PPS - How do companies like Microsoft get away with naming things "Windows" and "Office"? Or are they just legally called "Microsoft Windows" and "Microsoft Office"? Do developer names always precede software product names? Would naming a software product "Jones Office" be illegal?

    Read the article

  • How to set input focus to a shown dialog in Qt?

    - by Jake Petroules
    In a button click slot, I create and exec() a dialog with a NULL parent. Inside the dialog's constructor, I have: this->activateWindow(); this->raise(); this->setFocus(); The dialog is application modal and has strong focus. However, it does NOT respond to keyboard events until I click on it. How do I make the dialog get focus without having to click it?

    Read the article

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