Search Results

Search found 6524 results on 261 pages for 'the ever kid'.

Page 163/261 | < Previous Page | 159 160 161 162 163 164 165 166 167 168 169 170  | Next Page >

  • Replacing text with a link in jQuery

    - by Eli
    I'm trying to replace a small part of text in a large HTML document with my own element which I create on the fly. The text may be a huge bulk of text, html, images, what-ever, and what I want is to find the first (or all) the position of a certain string, and replace it with an element that I create using $('< span'). Using simple text.replace('the string', $('< span')); doesn't do the trick (I'm left with [object Object] and not the actual < span that I want. The reason I don't just inject direct HTML is because I want to retain all the binds that are related to the object I'm creating. and doing a replace with a custom ID, and then attaching binds to the ID after the HTML has been altered, seems a bit dirty. Thanks for the help! :)

    Read the article

  • Random select is not always returning a single row.

    - by Lieven
    The intention of following (simplified) code fragment is to return one random row. Unfortunatly, when we run this fragment in the query analyzer, it returns between zero and three results. As our input table consists of exactly 5 rows with unique ID's and as we perform a select on this table where ID equals a random number, we are stumped that there would ever be more than one row returned. Note: among other things, we already tried casting the checksum result to an integer with no avail. DECLARE @Table TABLE ( ID INTEGER IDENTITY (1, 1) , FK1 INTEGER ) INSERT INTO @Table SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 SELECT * FROM @Table WHERE ID = ABS(CHECKSUM(NEWID())) % 5 + 1

    Read the article

  • Refactor C++ code to use a scripting language?

    - by Justin Ardini
    Background: I have been working on a platformer game written in C++ for a few months. The game is currently written entirely in C++, though I am intrigued by the possibility of using Lua for enemy AI and possibly some other logic. However, the project was designed without Lua in mind, and I have already written working C++ code for much of the AI. I am hoping Lua can improve the extensibility of the game, but don't know if it would make sense to convert existing C++ code into Lua. The question: When, if ever, is it appropriate to take fully functional C++ code and refactor it into a scripting language like Lua? The question is intentionally a bit vague, so feel free give answers that are not relevant to the given background.

    Read the article

  • Rails fixtures seem to be adding extra unexpected data

    - by Mason Jones
    Hello, all. I've got a dynamic fixture CSV file that's generating predictable data for a table in order for my unit tests to do their thing. It's working as expected and filling the table with the data, but when I check the table after the tests run, I'm seeing a number of additional rows of "blank" data (all zeros, etc). Those aren't being created by the fixture, and the unit tests are read-only, just doing selects, so I can't blame the code. There doesn't seem to be any logging done during the fixtures setup, so I can't see when the "blank" data is being inserted. Anyone ever run across this before, or have any ideas of how to log or otherwise see what the fixture setup is doing in order to trace down the source of the blank data?

    Read the article

  • What elegant method callback design should be used ?

    - by ereOn
    Hi, I'm surprised this question wasn't asked before on SO (well, at least I couldn't find it). Have you ever designed a method-callback pattern (something like a "pointer" to a class method) in C++ and, if so, how did you do it ? I know a method is just a regular function with some hidden this parameter to serve as a context and I have a pretty simple design in mind. However, since things are often more complex than they seem to, I wonder how our C++ gurus would implement this, preferably in an elegant and standard way. All suggestions are welcome !

    Read the article

  • two classes contain objects of each other

    - by Julz
    hi, i hope there's a simple answer to this. without getting too complicated i have two classes. an "Animal" and a "Cell" Cell contains an Animal as a member. Animal has methods that accept Cells in their parameters. i'm just confused as to how i #include each class the others header? i've only ever had to go up a chain of classes and just included the last class header in the next and so on, but this circular situation has me a bit lost. i hope that makes sense, any help greatly appreciated.

    Read the article

  • How much faster is a database running in RAM?

    - by orokusaki
    I"m looking to run PostgreSQL in RAM for performance enhancement. The database isn't more than 1GB and shouldn't ever grow to more than 5GB. Is it worth doing? Are there any benchmarks out there? Is it buggy? My second major concern is: How easy is it to back things up when it's running purely in RAM. Is this just like using RAM as tier 1 HD, or is it much more complicated?

    Read the article

  • Crystal Reports using ASP.Net

    - by Dattu
    I am new to the ASP.net and crystal reports.. I created a report using crystal reports and i used 3 parameters as Division,Month & Year. These parameters values will come from database using dropdown lists.. after selecting the parameters, report button clicked the report should come.. Report is coming but the values what ever I taken are not displaying in the report. Please give me solution for this and if code also provided it will be appreciated. Thanks in Advance. Dattu

    Read the article

  • progressbar to be updated on selected index changed of a combo box

    - by joy
    hi, i am developing a windows application using C#.net and i am having a combobox with some list items .on selected index changed event of the combo box i need to have the progess bar to be visible and should disappear after retrieving some data. i am trying inthe way: for (int i = progressBar1.Minimum; i <= progressBar1.Maximum; i++) { progressBar1.PerformStep(); } panel1.Visible = false; where my progress bar is placed in panel1. but i am getting the progess bar when i first run my application after that when ever combobox item is changed the progress abr is not visible. i need the solution asap... Thanks in advance!

    Read the article

  • Java memory usage increases when App is used, but doesnt decrease when not being used.

    - by gren
    I have a java application that uses a lot of memory when used, but when the program is not being used, the memory usage doesnt go down. Is there a way to force Java to release this memory? Because this memory is not needed at that time, I can understand to reserve a small amount of memory, but Java just reserves all the memory it ever uses. It also reuses this memory later but there must be a way to force Java to release it when its not needed. System.gc is not working.

    Read the article

  • Remote desktop connection to Raspberry Pi without specifying a port

    - by Max Methot
    I have a Raspberry Pi running Raspbian Wheezy connected in "Site A", where the network is managed by a third party company and where all ports are closed the the Internet (for security reasons). So, there is no way for me to do any port forwarding to VNC, nor SSH or anything else. That means I just can't access it in any way other than locally, on-site. However, I need to connect to that device on the X Desktop session (graphical interface) to do some maintenance, and I am located in let's say "Site B", which is nearly 300 miles away from site A. I know you can do such tasks on Windows or x86 Linux computers with TeamViewer (we use it for our other hardware in the same location and it works like a charm), but since the Raspberry Pi is based on an ARM architecture, it isn't supported by TeamViewer yet. If anyone has ever achieved this, I would be glad to hear how to do it! Thanks!

    Read the article

  • Best practice for handling memory leaks in large Java projects?

    - by knorv
    In almost all larger Java projects I've been involved with I've noticed that the quality of service of the application degrades with the uptime of the container. This is most probably due to memory leaks in the code. The correct way to solve this problem is obviously to trace back to the root cause of the problem and fix the leaks in the code. The quick and dirty way of solving the problem is simply restarting Tomcat (or whichever servlet container you're using). These are my three questions: Assume that you choose to solve the problem by tracing the root cause of the problem (the memory leaks), how would you collect data to zoom in on the problem? Assume that you choose the quick and dirty way of speeding things up by simply restarting the container, how would you collect data to choose the optimal restart cycle? Have you been able to deploy and run projects over an extended period of time without ever restarting the servlet container to regain snappiness? Or is an occasional servlet restart something that one has to simply accept?

    Read the article

  • Use Javascript variable in PHP

    - by Rhepungus
    I have seen some answers to this question in previous posts, but no one has given a real working example, just psuedo code. Has anyone ever done this before? Basically, what i have is a variable in javascript (jquery), and i want to use this variable to drive a query (for an overlay window) i am going to run in php. From what i have read you can do this using an ajax call to the same page so it doesnt refresh itself, but i must be missing something because i can't get it working... Any examples out there? Thanks.

    Read the article

  • TeamCity build triggers don't automatically run

    - by Phil.Wheeler
    I've been playing around with and learning a bit about TeamCity and have the server correctly set up with my .Net MVC project committed in Subversion successfully and build configurations and triggers sorted to kick off when any changes are committed to the repository. TeamCity polls on its default time period and is picking up that changes have been committed, but it is adding these to the queue without actually ever running them. I have to manually click the "Run" button to kick them off. What setting do I need to change in order to ensure that any new changes are automatically run?

    Read the article

  • How do i build a custom "Your Account" dynamic page with wordpress?

    - by Colour Blend
    Hello everyone. Please can you help with a guideline on this requirement? I have this requirement that some visitors to my site would need to login and be provided access to an Accounts page. This page will contain a list of links added by the site administrator which just lead to pages with specific contents. Every page/link is unique to a user(Account). No two user will ever have to see one page. Please help me. I just need a guide, you don't need to spoon feed me. Thanks in advance.

    Read the article

  • What is the best way to automated (integration) test with java with OpenId4Java against real OpenIdP

    - by mP
    I would like to do a bit more than manually test my openid glue code which happens to use the openid4java library. My goals would be to be able to run it within my IDE with a bunch of tests using Junit or similar. Selenium & tomcat I was thinking of using selenium and a tomcat but thats not exactly a nice approach as this is a bit heavy and not really lightweight. httpunit A solution with http-unit is incomplete because it doesnt really fit with the redirect to my openid provider, authenticate and redirect back. Perhaps i am wrong but this looks like it could get quite involved just to make sure this works. Mocks My last solution is to mock everything and assume thats its accurate and works. If google or yahoo ever change in some way, then ill have to verify manually. The approach is simple but with a major flaw.

    Read the article

  • Will Windows Update modify anything in Visual Studio?

    - by Martin
    (Note: Yes, the technical side of this question seems to be rather SuperUser, but the implications are more relevant for StackOverflow readers.) As the title says, we are wondering if (fully) enabling automated Windows Updates on our developer machines will have implications for MS Visual Studio. That is, will any fixes to any components (be it libraries, UI/IDE, compiler, ...) ever be updated through Windows Update? We want to have 100% exact and reproducible development environments (wrt C++) on all developer machines, and so we are concerned that automated Windows updates may introduce some uncontrolled updates into our development chain.

    Read the article

  • using NEWSEQUENTIALID() with UPDATE Trigger

    - by Ram
    I am adding a new GUID/Uniqueidentifier column to my table. ALTER TABLE table_name ADD VersionNumber UNIQUEIDENTIFIER UNIQUE NOT NULL DEFAULT NEWSEQUENTIALID() GO And when ever a record is updated in the table, I would want to update this column "VersionNumber". So I create a new trigger CREATE TRIGGER [DBO].[TR_TABLE_NAMWE] ON [DBO].[TABLE_NAME] AFTER UPDATE AS BEGIN UPDATE TABLE_NAME SET VERSIONNUMBER=NEWSEQUENTIALID() FROM TABLE_NAME D JOIN INSERTED I ON D.ID=I.ID/* some ID which is used to join*/ END GO But just realized that NEWSEQUENTIALID() can only be used with CREATE TABLE or ALTER TABLE. I got this error The newsequentialid() built-in function can only be used in a DEFAULT expression for a column of type 'uniqueidentifier' in a CREATE TABLE or ALTER TABLE statement. It cannot be combined with other operators to form a complex scalar expression. Is there a workaround for this ? Edit1: Changing NEWSEQUENTIALID() to NEWID() in the trigger solves this, but I am indexing this column and using NEWID() would be sub-optimal

    Read the article

  • how does memory stacks work in javascript

    - by user227353
    When we have code like: function a(){ var x =0; this.add=function(){ alert(x++); } } var test = new a(); test.add(); // alert 0 test.add(); // alert 1 test.add(); // alert 2 How does this work? Doesn't that the value of 'x' in a() should be 'gone' as soon as test = new a() is complete? The stack contains x should also be gone as well, right? Or, does javascript always keep all the stacks ever created in case they will be referenced in future? But that wouldn't be nice, would it...?

    Read the article

  • Integer v/s int

    - by Siddhartha
    Read this on the oracle docs java.lang page: Frequently it is necessary to represent a value of primitive type as if it were an object. The wrapper classes Boolean, Character, Integer, Long, Float, and Double serve this purpose. I'm not sure I understand why these are needed. It says they have useful functions such as equals(). But if I can do (a==b), why would I ever want to declare them as Integer, use more memory and use equals()? How does the memory usage differ for the 2?

    Read the article

  • Drupal 6 fails to build menu router and links

    - by Xinglin Zhang
    When I enable a new menu in Drupal (for example, mymodule), Drupal should be able to get the menu items from mymodule_menu (hook_menu), process the items and insert the menu items to menu_router and menu_links page. However, my Drupal fails to do so. Each time I enable a module (written by me or modules contributed by others, or core modules), Drupal does not seem to get the new information. The menu items defined in the newly enabled module are not processed and inserted to Drupal's menu system. That means the newly enabled module has no chance to work-- because it's inaccessible. I did fix this by manually insert the menu item information for the new module into the menu_router and menu_links table and the new menu started working. But this is a nightmare if I have to do this each time I enable a module. Any one has ever had the same problem? How to fix this? Thank you in advance.

    Read the article

  • How can I see included JavaScript sources?

    - by Toddintr
    I am trying to script a web page using GreaseMonkey. (I am using Firebug for help in development.) The page has a small amount of JavaScript code, but that code pulls in other JS files from the site. Are the entire collection of JS files stored somewhere on the client side (i.e. on the filesystem somewhere) so that I can view them? Or better yet, is there a way I can view them in Firebug? I am a little overwhelmed by Firebug but will be able to follow instructions. Many thanks. (My first ever question on SO!) -Todd

    Read the article

  • RoR model field without validators, has*, delegates, etc

    - by jackr
    How can I declare a field, in the Rails model, when it doesn't have any "has_" relations, or validations, or delegations? I just need to ensure its existence and column width in the schema. Currently, I have no mention of the field in the "schema section" of the model file, but it's referenced in various methods that use it, and this seems to work. However, depending on my exact creation workflow, the underlying database table may be created as t.binary "field_name", :limit => 32 or t.binary "field_name", :limit => 255 This is not a restriction on the value (any binary value is valid, even NULL), only on the table column declaration. As it happens, 32 is enough -- it never receives any larger value, it's only ever written to like this: self.field_name = SecureRandom.random_bytes(32)

    Read the article

  • Database normalization and duplicate values

    - by bretddog
    Consider a Parent / Child / GrandChild structure in a database table schema, or even a deeper hierarchy. These being in the same aggregate. One table DAYS keeps a single row per day, and has a "Date" field. This is the root table, or maybe a child of the root. No row can ever be deleted in this table. In this case, however complex my table schema looks like, however far away in the hierarchy any other table is, is there any reason why any other table would hold a Date value? Can't it instead just have a FK to the DAYS table. I obviously assume that the creation of these date fields happen not before such datefield exist in the DAYS table. I'm now thinking just about the date part to be relevant, not the time part. Not sure if all databases can store these individually. That's maybe relevant, but not really the focus of the question.

    Read the article

  • Problem when using \LaTeX \includegraphics with some PDF files

    - by brandstaetter
    I noticed some strange effects when including existing pdf graphics in my laTeX documents: Most file work flawlessly, but some PDFs that were created on a different machine (or from the web) cause the whole page on which they are embedded to become ever-so-slightly distorted. I only notice the difference in a side-by-side comparison, but once you see it, it's obvious. The text layout seems slightly broken, and when you zoom in you can see it better. I will try to make some screenshots to further elaborate, but in the meantime: Has anyone seen this before and how can I get rid of these distortions?

    Read the article

< Previous Page | 159 160 161 162 163 164 165 166 167 168 169 170  | Next Page >