Search Results

Search found 721 results on 29 pages for 'benjamin jones'.

Page 17/29 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Have a link that is imported in xml, clickable to execute a function

    - by Benjamin Sterling
    Ok, here's the question, I have an xml doc that is being import into an AS3 file and then with .htmlText, appending it to a movie clip. An example of what this looks like is: <abstract><![CDATA[<p><strong>AEO Times Square</strong> Store Wins Prestigious SEGD Merit Award for Dynamic Environments <a href='event:OpenArticle1'>View Article</a></p>]]></abstract> What I'd like to have happen is when I click that view article link that I can call a function passing in "OpenArticle1". Thanks in advance.

    Read the article

  • Rerversing AND Bitwise.

    - by Benjamin
    Hey all, Here's the following algorithm: int encryption(int a, int b) { short int c, c2; uint8_t d; c = a ^ b; c2 = c; d = 0; while(c) { c &= c - 1; d++; } return d; } How can I find which variable a and b I should send in that function to decide of the output value of d? In other words, how can I reverse the algoritm to let's say if I want d=11?

    Read the article

  • Cannot find code completion and suggestions in Aptana 2.0

    - by Benjamin
    Greetings, I recently started using Aptana 1.5 to work on a site via FTP, developing pages in .php format with a mixture of HTML, CSS, jQuery, and -- naturally -- PHP. I develop a page with all of these elements together to save time, then separate them. One thing that I really liked about Aptana 1.5 was that it completed code (brackets, parentheses, etc) and suggested things as I typed. I upgraded to 2.0 today and cannot figure out for the life of me how to bring back all of these capabilities -- or remember if I had to do anything in 1.5 to get them. Here is a picture of what I am looking for Notice the suggestion for margin: and the "HTML, Js, CSS" up top. Any help with getting this to work in 2.0 would be greatly appreciated. Ever since installing 2.0, 1.5 has been throwing error messages and I can't seem to get my FTP settings to stay locked in.

    Read the article

  • Websphere exception handling

    - by Benjamin
    Hi all, From a security standpoint, what is the best solution to handle application errors with Websphere? I've been thinking of creating a class that is called every time an application error is generated, log the error and display a generic error message to the users. In PHP this can be achieved using the set_exception_handler() function. Is there something similar for websphere that could be configured in the web.xml? I've found codes like this on the internet: <error-page> <error-code>500</error-code> <location>/servlet/ExceptionHandlerServlet</location> </error-page> But that would only work with "500" HTTP error codes. I really want something generic that catches everything. Something like a class that implements a certain interface which can have access to all information about the error. Thanks for your time.

    Read the article

  • Exposing boost::scoped_ptr in boost::python

    - by Rupert Jones
    Hello, I am getting a compile error, saying that the copy constructor of the scoped_ptr is private with the following code snippet: class a {}; struct s { boost::scoped_ptr<a> p; }; BOOST_PYTHON_MODULE( module ) { class_<s>( "s" ); } This example works with a shared_ptr though. It would be nice, if anyone knows the answer. Thanks

    Read the article

  • Windows Form hangs when running threads

    - by Benjamin Ortuzar
    JI have written a .NET C# Windows Form app in Visual Studio 2008 that uses a Semaphore to run multiple jobs as threads when the Start button is pressed. It’s experiencing an issue where the Form goes into a comma after being run for 40 minutes or more. The log files indicate that the current jobs complete, it picks a new job from the list, and there it hangs. I have noticed that the Windows Form becomes unresponsive when this happens. The form is running in its own thread. This is a sample of the code I am using: protected void ProcessJobsWithStatus (Status status) { int maxJobThreads = Convert.ToInt32(ConfigurationManager.AppSettings["MaxJobThreads"]); Semaphore semaphore = new Semaphore(maxJobThreads, maxJobThreads); // Available=3; Capacity=3 int threadTimeOut = Convert.ToInt32(ConfigurationManager.AppSettings["ThreadSemaphoreWait"]);//in Seconds //gets a list of jobs from a DB Query. List<Job> jobList = jobQueue.GetJobsWithStatus(status); //we need to create a list of threads to check if they all have stopped. List<Thread> threadList = new List<Thread>(); if (jobList.Count > 0) { foreach (Job job in jobList) { logger.DebugFormat("Waiting green light for JobId: [{0}]", job.JobId.ToString()); if (!semaphore.WaitOne(threadTimeOut * 1000)) { logger.ErrorFormat("Semaphore Timeout. A thread did NOT complete in time[{0} seconds]. JobId: [{1}] will start", threadTimeOut, job.JobId.ToString()); } logger.DebugFormat("Acquired green light for JobId: [{0}]", job.JobId.ToString()); // Only N threads can get here at once job.semaphore = semaphore; ThreadStart threadStart = new ThreadStart(job.Process); Thread thread = new Thread(threadStart); thread.Name = job.JobId.ToString(); threadList.Add(thread); thread.Start(); } logger.Info("Waiting for all threads to complete"); //check that all threads have completed. foreach (Thread thread in threadList) { logger.DebugFormat("About to join thread(jobId): {0}", thread.Name); if (!thread.Join(threadTimeOut * 1000)) { logger.ErrorFormat("Thread did NOT complete in time[{0} seconds]. JobId: [{1}]", threadTimeOut, thread.Name); } else { logger.DebugFormat("Thread did complete in time. JobId: [{0}]", thread.Name); } } } logger.InfoFormat("Finished Processing Jobs in Queue with status [{0}]...", status); } //form methods private void button1_Click(object sender, EventArgs e) { buttonStop.Enabled = true; buttonStart.Enabled = false; ThreadStart threadStart = new ThreadStart(DoWork); workerThread = new Thread(threadStart); serviceStarted = true; workerThread.Start(); } private void DoWork() { EmailAlert emailAlert = new EmailAlert (); // start an endless loop; loop will abort only when "serviceStarted" flag = false while (serviceStarted) { emailAlert.ProcessJobsWithStatus(0); // yield if (serviceStarted) { Thread.Sleep(new TimeSpan(0, 0, 1)); } } // time to end the thread Thread.CurrentThread.Abort(); } //job.process() public void Process() { try { //sets the status, DateTimeStarted, and the processId this.UpdateStatus(Status.InProgress); //do something logger.Debug("Updating Status to [Completed]"); //hits, status,DateFinished this.UpdateStatus(Status.Completed); } catch (Exception e) { logger.Error("Exception: " + e.Message); this.UpdateStatus(Status.Error); } finally { logger.Debug("Relasing semaphore"); semaphore.Release(); } I have tried to log what I can into a file to detect where the problem is happening, but so far I haven't been able to identify where this happens. Losing control of the Windows Form makes me think that this has nothing to do with processing the jobs. Any ideas?

    Read the article

  • Using twitter gem to signup and authenticate users

    - by Jim Jones
    Hi, I'd like to allow users the option to register using their Twitter account. Basically, I'll present them with a standard signup form (name, login, email, pwd, pwd_confirm) as well as a "Signup with Twitter" link. If a user chooses to signup with Twitter creds, then I'll create a user record in db. Then I'd like to be able to allow a user to authenticate using their Twitter creds on returning visits. Also, I'm using restful_authentication, so I need to have this work within that context. What is the best way to do this? I haven't been to find any tutorials on allowing the signup and authentication pieces. Most examples just show how to authenticate a Twitter user into your app. Thanks.

    Read the article

  • Internet and Intellisense bad for your memory?

    - by Barry Jones
    Having programmed for a while now I have noticed that I am becoming more and more reliant on the internet and intellisense to do my job. But I was wondering how much that has effected my knowledge over the past year or so. But does this matter? For example I am more likely now to remember that when I need to program against objects I have no knowledge about, I will go to the System.Reflection namespace and a quick look down the list will provide me with enough detail to get going again. But if you was to ask me which classes etc are required I would struggle to name them all. This problem of remembering seems to manifest itself more when going for interviews when people seem to focus more on the minute detail of obscure areas of the .NET framework and not on the wide and varied knowledge and experience of the applicant. Anyway I digress. Does anyone else think that maybe its time to turn of the intellisense and try and find better ways to learn, then quick fixes and work arounds of the internet?

    Read the article

  • Is it worth the time to switch from AjaxControlToolkit to jQuery?

    - by Matthew Jones
    I keep hearing all these things about how awesome jQuery is and how the AjaxControlToolkit sucks. Unfortunately, I only heard about this after I built my entire WebForms site using the toolkit. Now I am considering switching, if not entirely, mostly to jQuery. This is partially for the experience (having never coded in Javascript or used any frameworks) and partially because I think I have more control over jQuery. There is no pressing need to switch, but I'm considering doing it anyway. Is it worth tackling the learning curve for jQuery just to get the experience, of should I leave my working site well enough alone?

    Read the article

  • read-only memory and heap memory

    - by benjamin button
    hi, AFAIK, string literals are stored in read only memory in case of C language. where is this actually present on the hardware. as per my knowledge heap is on RAM.correct me if i am wrong. how different is heap from read only memory? is it OS dependant?

    Read the article

  • flash cs4 file reference. Event.COMPLETE not called on a MAC,

    - by jobbie jones
    Hi, I am working with a fileReference, however I'm having issues running on Safari on a MAC... EDIT The below example also doesnt work on Safari on a MAC... http://www.permadi.com/blog/2010/06/flash-as3-using-filereference-to-load-files-example-for-flash-cs4-and-above/ # The workflow on a PC runs as such: 1) Create file reference 2) attach addEventListener's for Event.SELECT and Event.COMPLETE 3) call the browse() method On a PC, Event.SELECT is fired when a file has been selected. Event.COMPLETE is fired when the file data is available to flash. If I select an 500meg file, it takes a few seconds before Event.COMPLETE is fired. If I attempt to access the file data properties (such as reading the data stream) before Event.COMPLETE is fired, I receive null reference errors... So far so good. However, on a MAC (speficially Safari, not tested other browsers), the Event.COMPLETE is not fired. I have checked the Adobe docs, which say Event.COMPLETE is fired when the upload is completed. So why does it get fired on windows when the fileReference has parsed the file, but the upload method has not yet been called... Can anyone help? Here's snippets of the code I am working on: public function browseFile(target:Object):void { var imagesFilter:FileFilter = new FileFilter("Allowed files", "*.jpg;*.bmp;*.flv;"); fileReference.browse([imagesFilter]); fileReference.addEventListener(Event.SELECT, fileSelect); fileReference.addEventListener(Event.COMPLETE, fileSelectComplete); } private function fileSelect(event:Event):void { // update label - IMPORTANT for large files as there's a delay while flash parses file, before control is handed back to this script... setStatusLabel("...loading file"); var fileReference:FileReference = event.target as FileReference; fileReference.addEventListener(Event.COMPLETE, fileSelectComplete); // load the file into the fileReference object fileReference.load(); } // Called when upload file has been processed by flash (a few secs for large files, or fileRef.data is null...) private function fileSelectComplete(event:Event):void { var fileReference:FileReference=event.target as FileReference; trace("ready to do things - but not fired on Safari on a MAC "); }

    Read the article

  • sql query --need some suggestions

    - by benjamin button
    I have a table with list of cycle codes.CYCLE_DEFINITION. each and every cycle_code has 12 months entries in another table(PM1_CYCLE_STATE). Each and every month has a cycle_start_date and a cycle_close_date. i will check with a particular date(lets say sysdate) and check what is the current month of every cycle.additionally i will also get the list of future 3 more months of that particular cycle. the query i have written is as below: SELECT cycd,cm,sd,ed,ld FROM (SELECT pcs.cycle_code CYCD,LTRIM(pcs.cycle_month,'0')+0 CM, pcs.cycle_start_date SD,pcs.cycle_close_date ED,ld.logical_date LD FROM pm1_cycle_state pcs,logical_date ld WHERE ld.logical_date BETWEEN pcs.cycle_start_date AND pcs.cycle_close_date and ld.logical_date_type='B') UNION SELECT cycd,cm,sd,ed,ld FROM (SELECT pcs.cycle_code CYCD,DECODE(LTRIM(pcs.cycle_month,'0')+1,13,1,14,2,15,3,LTRIM(pcs.cycle_month,'0')+1) CM ,pcs.cycle_start_date SD,pcs.cycle_close_date ED,ld.logical_date LD FROM pm1_cycle_state pcs,logical_date ld WHERE ld.logical_date BETWEEN pcs.cycle_start_date AND pcs.cycle_close_date and ld.logical_date_type='B') UNION SELECT cycd,cm,sd,ed,ld FROM (SELECT pcs.cycle_code CYCD,DECODE(LTRIM(pcs.cycle_month,'0')+2,13,1,14,2,15,3,LTRIM(pcs.cycle_month,'0')+2) CM ,pcs.cycle_start_date SD,pcs.cycle_close_date ED,ld.logical_date LD FROM pm1_cycle_state pcs,logical_date ld WHERE ld.logical_date BETWEEN pcs.cycle_start_date AND pcs.cycle_close_date and ld.logical_date_type='B') UNION SELECT cycd,cm,sd,ed,ld FROM (SELECT pcs.cycle_code CYCD,DECODE(LTRIM(pcs.cycle_month,'0')+3,13,1,14,2,15,3,LTRIM(pcs.cycle_month,'0')+3) CM ,pcs.cycle_start_date SD,pcs.cycle_close_date ED,ld.logical_date LD FROM pm1_cycle_state pcs,logical_date ld WHERE ld.logical_date BETWEEN pcs.cycle_start_date AND pcs.cycle_close_date and ld.logical_date_type='B') This query is running perfectly fine. This will result in all the cycle_codes with exactly 4 rows for current month and future 3 months. Now the requirement is if any of the month is missing.how could i show it? for eg: the output of the above query is cycd cm 102 1 102 10 102 11 102 12 103 1 103 10 103 11 103 12 104 1 104 10 104 11 104 12 Now lets say the row with cycd=104 and cm=11 is not present in the table,then the above query will not get the row 104 11. I want to display only those rows. how could i do it?

    Read the article

  • Write large PDFs with Java sequentially

    - by Benjamin Muschko
    I am looking for a Java library that let's you write large PDFs sequentially with a minimum amount of memory. Most of the libraries I had a look at has to build up the document in memory first before you can actually write it. The problem I have to deal with are OutOfMemoryErrors. It would be great if I could flush the writer programmatically whenever needed e.g. for each page. Does anyone have any recommendations? I need something with a license along the lines of the LGPL (so not the GPL or the Affero GPL that iText uses).

    Read the article

  • Simple CSS dropdown menu does not work in IE6 or 7 - please help.

    - by Jeff Jones
    Hi there. I'm using a very simple CSS dropdown menu which works well in most modern browsers. Unfortunately it must also work in IE6 and 7, which it currently does not. Can anyone please check it out very quickly and tell me if it can be easily fixed? I'm not adverse to using JavaScript if required. The markup and CSS: http://paste2.org/p/826583 Many thanks!

    Read the article

  • How do I do multiple assignment in MATLAB?

    - by Benjamin Oakes
    Here's an example of what I'm looking for: >> foo = [88, 12]; >> [x, y] = foo; I'd expect something like this afterwards: >> x x = 88 >> y y = 12 But instead I get errors like: ??? Too many output arguments. I thought deal() might do it, but it seems to only work on cells. >> [x, y] = deal(foo{:}); ??? Cell contents reference from a non-cell array object. How do I solve my problem? Must I constantly index by 1 and 2 if I want to deal with them separately?

    Read the article

  • How should I organize complex SQL views in Rails?

    - by Benjamin Oakes
    I manage a research database with Ruby on Rails. The data that is entered is primarily used by scientists who prefer to have all the relevant information for a study in one single massive table for use in their statistics software of choice. I'm currently presenting it as CSV, as it's very straightforward to do and compatible with the tools people want to use. I've written many views (the SQL kind, not the Rails HTML/ERB kind) to make the output they expect a reality. Some of these views are quite large and have a fair amount of complexity behind them. I wrote them in SQL because there are many calculations and comparisons that are more easily done with SQL. They're currently loaded into the database straight from a file named views.sql. To get the requested data, I do a select * from my_view;. The views.sql file is getting quite large. Part of the problem is that we're still figuring out what the data we collect means, so there's a lot of changes being made to the views all the time -- and a ton of them are being created. Many of them need to be repeatable. I've recently run into issues organizing and testing these views. Rails works great for user interface stuff and business logic, but I'm not aware of much existing structure for handling the reporting we require. Some options I've thought of: Should I move them into the most relevant models somehow? Several of the views interact with each other, which makes this situation more complex than just doing a single find_by_sql, so I don't know if they should only be part of the model. Perhaps they should be treated as a "view" in the MVC sense? (That is, they could be moved into app/views/ and live alongside the HTML, perhaps as files named something like my_view.csv.sql which return CSV.) How would you deal with a complex reporting problem like this?

    Read the article

  • C question on functions

    - by benjamin button
    some times i see that functions are defined as below: read_dir(dir) char *dir; { DIR * dirp; struct dirent *d; /* open directory */ dirp = opendir(dir); ......... so on here what is the importance of the statement char *dir; what is the intension behind declaring the pointer soon after the function name and then starting the function body.

    Read the article

  • Microsoft Driver Verifier

    - by Benjamin
    In Verifier Dialog, there is a window to select drivers to verify. The list control has 4 column. 1. Verify? 2. Driver name. 3. Provider 4. Version My driver's provider and version are represented as "unknown". I don't know how can I set these values. Where can I set this value? By SignTool? Or Resource file? Yes, this is not a big problem. But I would like to correct that. Let me know please. Thanks.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >