Search Results

Search found 2965 results on 119 pages for 'bill james'.

Page 83/119 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • Help with redirect and query strings

    - by James
    I'm a total novice at mod rewrite so I'll try and present my question as clearly as possible: I'm trying to create a url redirect of the following (static) affiliate url that can append it self to any product links after using a query string: affiliate url: hxxp://clk.affilite.com/fs-bin/click?id=aFb*BBBBBpQ&subid=&offerid=9999.2&type=5&tmpid=9999&RD_PARM1= product url: hxxp:// example.domain.com What I want to achieve is redirecting the affiliate code as below and being able to add dynamic product urls after as the following examples show: rewritten affiliate url: hxxp://domain.com/go affiliate url + product url: hxxp://domain.com/go?=http://example.domain.com redirects to: hxxp://clk.affilite.com/fs-bin/click?id=aFb*BBBBBpQ&subid=&offerid=9999.2&type=5&tmpid=9999&RD_PARM1=http://example.domain.com

    Read the article

  • Need Insight - What is the best practice for syncing up a production database that will be used on a

    - by james
    I have a site set up using CakePHP and MySQL and I want to work on a test database without disrupting my live site in case something goes wrong. I have another busy site, but my test site runs off the live database which can be occasionally nerve wracking. What do I do if I change a table name in the test db and I want it changed in the live database? Or if I remove a record from the test database. Is there a way to diff the changes? How do I even merge those changes? How does this interfere with live user edits and things of that nature? Hopefully some of you working devs can share some insight!

    Read the article

  • How would I go about implementing a stopwatch with different speeds?

    - by James
    Ideally I would like to have something similar to the Stopwatch class but with an extra property called Speed which would determine how quickly the timer changes minutes. I am not quite sure how I would go about implementing this. Edit Since people don't quite seem to understand why I want to do this. Consider playing a soccer game, or any sport game. The halfs are measured in minutes, but the time-frame in which the game is played is significantly lower i.e. a 45 minute half is played in about 2.5 minutes.

    Read the article

  • What is user gcc's purpose in requesting code possibly like this?

    - by James Morris
    In the question between syntax, are there any equal function the user gcc is requesting only what I can imagine to be the following code: #include <stdio.h> #include <string.h> /* estimated magic values */ #define MAXFUNCS 8 #define MAXFUNCLEN 3 int the_mainp_compare_func(char** mainp) { char mainp0[MAXFUNCS][MAXFUNCLEN] = { 0 }; char mainp1[MAXFUNCS][MAXFUNCLEN] = { 0 }; char* psrc, *pdst; int i = 0; int func = 0; psrc = mainp[0]; printf("scanning mainp[0] for functions...\n"); while(*psrc) { if (*psrc == '\0') break; else if (*psrc == ',') ++psrc; else { mainp0[func][0] = *psrc++; if (*psrc == ',') { mainp0[func][1] = '\0'; psrc++; } else if (*psrc !='\0') { mainp0[func][1] = *psrc++; mainp0[func][2] = '\0'; } printf("function: '%s'\n", mainp0[func]); } ++func; } printf("\nscanning mainp[1] for functions...\n"); psrc = mainp[1]; func = 0; while(*psrc) { if (*psrc == '\0') break; else if (*psrc == ',') ++psrc; else { mainp1[func][0] = *psrc++; if (*psrc == ',') { mainp1[func][1] = '\0'; psrc++; } else if (*psrc !='\0') { mainp1[func][1] = *psrc++; mainp1[func][2] = '\0'; } printf("function: '%s'\n", mainp1[func]); } ++func; } printf("\ncomparing functions in '%s' with those in '%s'\n", mainp[0], mainp[1] ); int func2; func = 0; while (*mainp0[func] != '\0') { func2 = 0; while(*mainp1[func2] != '\0') { printf("comparing %s with %s\n", mainp0[func], mainp1[func2]); if (strcmp(mainp0[func], mainp1[func2++]) == 0) return 1; /* not sure what to return here */ } ++func; } /* no matches == failure */ return -1; /* not sure what to return on failure */ } int main(int argc, char** argv) { char* mainp[] = { "P,-Q,Q,-R", "R,A,P,B,F" }; if (the_mainp_compare_func(mainp) == 1) printf("a match was found, but I don't know what to do with it!\n"); else printf("no match found, and I'm none the wiser!\n"); return 0; } My question is, what is it's purpose?

    Read the article

  • Php pi help... (Loops)

    - by James Rattray
    Is this iteration the best? (Pi^2)/12 = 1 - 1/4 + 1/9 - 1/16 + 1/25 etc. -For converging faster? If not please answer with the iteration -preferably in the form above (an example) -not a splat of algebra ... I'm doing this to find Pi to 1,000,000,000 places online.

    Read the article

  • Would it be useful to change java to support both static and dynamic types?

    - by James A. N. Stauffer
    What if a Java allow both static and dynamic types. That might allow the best of both worlds. i.e.: String str = "Hello"; var temp = str; temp = 10; temp = temp * 5; Would that be possible? Would that be beneficial? Do any languages currently support both and how well does it work out? Here is a better example (generics can't be used but the program does know the type): var username = HttpServletRequest.getSession().getAttribute("username");//Returns a String if(username.length() == 0) { //Error }

    Read the article

  • cron stops running when processing multiple items

    - by James
    Cron stops running (no visible error) after a few hours when I add more than 5 jobs in my cron tab. Each job runs every minute (polls a webpage for information which takes 1 second). I tried putting all of my php jobs in a shell script and called this shell script instead but the same problem occurs. Cron stops running, no error in the log file, no error email sent out either. Anyone encountered this before? Where/how canI debug this?

    Read the article

  • Get a number after a character in a string...

    - by James Rattray
    I'm making my own forums and I don't want any BB code on it, but instead my own, so i've gotten [b][u][img] working etc. But i'm having problems with [quote=1][/quote] where the number is the user id... E.G lets say I quote someone So once I submit my post: (The variable $post would be:) '[quote=1] Quoted post :P[/quote]' How would I then get the number out the string? (But not the wrong number -not a number in the quoted post) (So I could then use str_replace() to replace with a table which makes it looked quoted) ?? :)

    Read the article

  • PHP memory exhausted when running through thousands of records

    - by James Skidmore
    I'm running the following code over a set of 5,000 results. It's failing due to the memory being exhausted. foreach ($data as $key => $report) { $data[$key]['data'] = unserialize($report['serialized_values']); } I know I can up the memory limit, but I'd like to run this without a problem instead. I'm not going to be able to keep upping the memory forever. EDIT The $data is in this format: [1] => Array ( [0] => 127654619178790249 [report_id] => 127654619178790249 [1] => 1 [user_id] => 1 [2] => 2010-12-31 19:43:24 [sent_on] => 2010-12-31 19:43:24 [3] => [fax_trans_id] => [4] => 1234567890 [fax_to_nums] => 1234567890 [5] => ' long html string here', [html_content] => 'long html string here', [6] => 'serialization_string_here', [serialized_values] => 'serialization_string_here', [7] => 70 [id] => 70 )

    Read the article

  • How do you get the ID of a control in ASP.NET

    - by James
    I am attempting to loop through an array of numbers, match them to the checkbox they they are associated with, and checkmark that box. My checkbox is set up like: <input type="checkbox" runat="server" id="someID" name="somename" value="1234" /> My code when the page loads currently looks like: foreach (string interest in interests_Var){ foreach (var c in Page.Controls) { } } interests_Var is my array containing different numbers. We'll assume one of them is 1234. While looping through the page controls, I want to compare the value of the control to my number. If it equals my number, I want to then apply the attribute checked="checked". I'm assuming I have to find the ID of the control I am using, then use that ID to add a new attribute. Or is there a way I can add the attribute using the c variable? I'm not dead set on this setup, so if you know a better way, I'm all ears. Thanks for any help and suggestions.

    Read the article

  • How do I set bash environment variables from a script?

    - by James A. Rosen
    I have some proxy settings that I only occasionally want to turn on, so I don't want to put them in my ~/.bash_profile. I tried putting them directly in ~/bin/set_proxy_env.sh, adding ~/bin to my PATH, and chmod +xing the script but though the script runs, the variables don't stick in my shell. Does anyone know how to get them to stick around for the rest of the shell session?

    Read the article

  • Loading a entity IDs CSV column as hydrated entities in NHibernate

    - by James L
    I have a number of database table that looks like this: EntityId int : 1 Countries1: "1,2,3,4,5" Countries2: "7,9,10,22" I would like to have NHibernate load the Country entities identifed as 1,2,3,4,5,7,9 etc. whenever my EntityId is loaded. The reason for this is that we want to avoid a proliferation of joins, as there are scores of these collections.

    Read the article

  • Php pi help... (Loops)

    - by James Rattray
    Is this iteration the best? (Pi^2)/12 = 1 - 1/4 + 1/9 - 1/16 + 1/25 etc. -For converging faster? If not please answer with the iteration -preferably in the form above (an example) -not a splat of algebra ... I'm doing this to find Pi to 1,000,000,000 places online. http://www.zombiewrath.com/superpi.php or my 10,000 one: http://www.zombiewrath.com/pi.php

    Read the article

  • Codeigniter PHP - loading a view at an anchor point

    - by James Billings
    I have a form at the bottom of a long page, if a user fills out the form but it doesn't validate the page is reloaded in the typical codeigniter fashion: $this->load->view('template',$data); however because the form is way down at the bottom of the page I need the page to load down there like you do with HTML anchors. Does anyone know how to do this in codeigniter? I can't use the codeigniter redirect(); function because it loses the object and the validation errors are gone. Other frameworks I've used like Yii you can call the redirect function like: $this->redirect(); which solves the problem because you keep the object. I've tried using: $this->index() within the controller which works fine as a redirect but the validation errors are in another method which is where the current page is loaded from: $this->item($labs) but when I use this it get stuck in a loop Any ideas? I've seen this question a lot on the net but no clear answers. I'm researching using codeigniter "flash data" but think it's a bit overkill. cheers.

    Read the article

  • What does the length attribute do when set on the @Column JPA annontation?

    - by James McMahon
    What exactly does setting the length on a column do in JPA? @Column(name = "middle_name", nullable = false, length = 32) public String getMiddleName() { return this.middleName; } I understand that you can use the annotations to generate the database schema based on the entity objects, but does length do any sort of check or truncation when persistence happens, or it solely used for schema creation? I also realize that JPA can sit on top of various implementations, the implementation I am concerned with in this case, is Hibernate.

    Read the article

  • How to terminate a managed thread blocked in unmanaged code?

    - by James Curran
    I have a managed thread which is waiting, blocked, in an unmanaged code (specifically, it on a call to NamedPipeServerStream.WaitForConnection() which ultimitely calls into unmanaged code, and does not offer a timeout). I want to shut the thread down neatly. Thread.Abort() has no effect until the code returns to the managed realm, which it won't do until a client makes a connection, which we can't wait for). I need a way "shock" it out of the unmanaged code; or a way to just kill the thread even while it's in unmanaged land.

    Read the article

  • How to use a class as the base, but hide the class type publically?

    - by James
    I am currently just exposing the properties through a generic interface e.g. public interface IBaseClass { int ID { get; set; } } internal class MyBaseClass : IBaseClass { public MyBaseClass() { } public int ID { get; set; } } public class MyExposedClass : IBaseClass { private MyBaseClass _base = new MyBaseClass(); public int ID { get { return _base.ID; } set { _base.ID = value; } } } Then in my main application I can do: IBaseClass c = new MyExposedClass(); c.ID = 12345; But can't do: MyBaseClass b = new MyBaseClass(); This is my desired behaviour. However, I was just wondering if this is the correct approach? Or if there was a better way?

    Read the article

  • jQuery Validator - Dynamic Text

    - by James
    Adding a validator to my form: jQuery.validator.addMethod('whatever', function(val, el) { // whatever goes here }, 'A maximum of ' + $('#my_id_here').val() + ' categories can be selected.'); This doesn't fly. I always get undefined. Is this a good, simple way to do this? Thanks

    Read the article

  • Need to change layout of radio buttons! help needed

    - by James
    I've got 2 radio buttons and i want to put them next to each other. Right now theyre like Radio button 1 Radio button 2 i want to make it Radio button 1 Radio button 2 This is my code for the radio buttons, any help? <RadioGroup android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <RadioButton android:id="@+id/radio_male" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Male" android:layout_below="@id/gender"/> <RadioButton android:id="@+id/radio_female" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Female" /> </RadioGroup>

    Read the article

  • Sum up values in SQL once all values are available

    - by James Brown
    I have events flowing into a MySQL database and I need to group and sum the events to transactions and store away into another table. The data looks like: +----+---------+------+-------+ | id | transid | code | value | +----+---------+------+-------+ | 1 | 1 | b | 12 | | 2 | 1 | i | 23 | | 3 | 2 | b | 34 | | 4 | 1 | e | 45 | | 5 | 3 | b | 56 | | 6 | 2 | i | 67 | | 7 | 2 | e | 78 | | 8 | 3 | i | 89 | | 9 | 3 | i | 90 | +----+---------+------+-------+ The events arrive in batches and I would like to create the transaction by summing up the values for each transid, like: select transid, sum(value) from eventtable group by transid; but only after all the events for that transid have arrived. That is determined by the event with the code e (b for the beginning, e for the end and i for varying amount of intermediates). Being a novice in SQL, how could I implement the requirement for the existance of the end code before the summing?

    Read the article

  • If I cast an IQueryable as an IEnumerable then call a Linq extension method, which implementation gets called?

    - by James Morcom
    Considering the following code: IQueryable<T> queryable; // something to instantiate queryable var enumerable = (IEnumerable<T>) queryable; var filtered = enumerable.Where(i => i > 3); In the final line, which extension method gets called? Is it IEnumerable<T>.Where(...)? Or will IQueryable<T>.Where(...) be called because the actual implementation is still obviously a queryable? Presumably the ideal would be for the IQueryable version to be called, in the same way that normal polymorphism will always use the more specific override. In Visual Studio though when I right-click on the Where method and "Go to Definition" I'm taken to the IEnumerable version, which kind of makes sense from a visual point-of-view. My main concern is that if somewhere in my app I use Linq to NHibernate to get a Queryable, but I pass it around using an interface that uses the more general IEnumerable signature, I'll lose the wonders of deferred database execution!

    Read the article

  • How do you program a custom WordPress plug-in?

    - by James
    I have seen several WordPress plug-ins for adding a "quote of the day" feature (or something similar) to your blog. How do you create a customized one? I'm looking for something that will pull a daily entry from a list/database of my creation. I apologize if my question is not detailed enough. Still a newbie with WordPress. PART 2: Thanks for your prompt and on-point responses. With your responses and some additional research, I'm able to fine-tune my question. What I wish to accomplish is something similar to Amazon's Deal of the Day widget. Except, in my case, it will simply be a title and a corresponding link. My presumption is that I will set up a database and (using php or something similar) have the information drawn from the database and displayed in my WP sidebar. Additionally, I forgot to mention the time element. I want the displayed info to update once a day, at or around the same time each day. Any ideas? Thanks again. I'm so glad I found stackoverflow.

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >