Search Results

Search found 2404 results on 97 pages for 'alex howell'.

Page 80/97 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • how to deal with international time?

    - by alex
    i build a new website.but the host is in USA.i am not in USA. i need get the time on the website page to compare with one local Variable. But because of time difference,it has 8 hous difference?how to solve this problom? my code SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss"); java.util.Date currentTime = new java.util.Date(); String dateString = formatter.format(currentTime); ` how to revise these code ?

    Read the article

  • why doesnt this program print?

    - by Alex
    What I'm trying to do is to print my two-dimensional array but i'm lost. The first function is running perfect, the problem is the second or maybe the way I'm passing it to the "Print" function. #include <stdio.h> #include <stdlib.h> #define ROW 2 #define COL 2 //Memory allocation and values input void func(int **arr) { int i, j; arr = (int**)calloc(ROW,sizeof(int*)); for(i=0; i < ROW; i++) arr[i] = (int*)calloc(COL,sizeof(int)); printf("Input: \n"); for(i=0; i<ROW; i++) for(j=0; j<COL; j++) scanf_s("%d", &arr[i][j]); } //This is where the problem begins or maybe it's in the main void print(int **arr) { int i, j; for(i=0; i<ROW; i++) { for(j=0; j<COL; j++) printf("%5d", arr[i][j]); printf("\n"); } } void main() { int *arr; func(&arr); print(&arr); //maybe I'm not passing the arr right ? }

    Read the article

  • .NET Threading : How to wait for other thread to finish some task

    - by Alex Ilyin
    Assume I have method void SomeMethod(Action callback) This method does some work in background thread and then invokes callback. The question is - how to block current thread until callback is called ? There is an example bool finished = false; SomeMethod(delegate{ finished = true; }); while(!finished) Thread.Sleep(); But I'm sure there should be better way

    Read the article

  • Can I include a view in Kohana 3 that is not within `application/views`?

    - by alex
    I am building a staff area for a website, which is completely different to the main brochure style site. I have 2 Kohana systems setup. I realise they can both share the same system and modules folder. Now, with the second one, I want to make the main template view a view in a different folder. I tried this in my base controller $this->template = DOCROOT . '../~new2/application/views/template.php'; But Kohana is looking for it in its own views folder as evident by the error I received. I even put a var_dump(file_exists($this->template)); // true to be sure it was finding the correct file. Is there a way to add a template file that is not within the views folder, without hacking the core Kohana code (and if I'm lucky not extending and overloading the view class).

    Read the article

  • Own params to PeriodicTask run() method in Celery

    - by Alex Isayko
    Hello to all! I am writing a small Django application and I should be able to create for each model object its periodical task which will be executed with a certain interval. I'm use for this a Celery application, but i can't understand one thing: class ProcessQueryTask(PeriodicTask): run_every = timedelta(minutes=1) def run(self, query_task_pk, **kwargs): logging.info('Process celery task for QueryTask %d' % query_task_pk) task = QueryTask.objects.get(pk=query_task_pk) task.exec_task() return True Then i'm do following: >>> from tasks.tasks import ProcessQueryTask >>> result1 = ProcessQueryTask.delay(query_task_pk=1) >>> result2 = ProcessQueryTask.delay(query_task_pk=2) First call is success, but other periodical calls returning the error - TypeError: run() takes exactly 2 non-keyword arguments (1 given) in celeryd server. So, can i pass own params to PeriodicTask run() ? Thanks!

    Read the article

  • Strange Rendering in Firefox

    - by Alex
    I've just noticed when loading my client's page (http://habbopfm.com/) in Firefox, that it renders what looks like a rectangle is pushed down a few pixels. It's difficult to describe, but imagine you took a screenshot of the page, opened it in Photoshop, selected a rectangle and moved it down a bit. IE and Safari don't appear to do this - I'm assuming this is a browser glitch, not a problem with the code. Can anyone confirm what causes this? Below is a screenshot taken of the issue: http://habbopfm.com/problem.png One other thing is that it only does this once the page has finished loading. While it is loading, it looks fine.

    Read the article

  • Making swedish characthers show properly in Windows Command Prompt using Python in Notepad++

    - by Alex
    The title explains it well. I have set up Notepad++ to open the python script in the command prompt when I press F8 but all Swedish characters looks messed up when opening in CMD but perfectly fine in e.g IDLE. This simple example code: #!/usr/bin/env python #-*- coding: UTF-8 -*- print "åäö" Looks like this. As you can see the output of the bath file I use to open Python in cmd below shows the characthers correctly but not the python script above it. How do i fic this?

    Read the article

  • Create an Action<T> to "set" a property, when I am provided with the LINQ Expression for the "get"

    - by Alex
    I'd like to be able to generate a compiled expression to set a property, given the lambda expression that provides the "get" method for a property. Here's what I'm looking for: public Action<int> CreateSetter<T>(Expression<Func<T, int>> getter) { // returns a compiled action using the details of the getter expression tree, or null // if the write property is not defined. } I'm still trying to understand the various types of Expression classes, so if you can point me in the right direction that would be great.

    Read the article

  • Using Classes / OOP in PHP

    - by Alex Demchak
    I'm pretty proficient with PHP, outside of OOP - which I am just now starting to jump in to. I've been watching videos and reading tutorials, but they are all still pretty confusing... If I have FILE 1 (class.time.php) class Time { function GetTime(){ $time = date('H:i:s'); printf($time); } } and then in a nother php page I've got FILE 2 (page.php) I can do include('class.time.php'); and then anywhere in this page I can then do $time = new Time; //Calling the class and setting the class to a variable $time->GetTime(); //This is BASICALLY saying (run the 'GetTime' function in the 'Time Class' My main question is, is the comment above (This is BASICALLY saying.....) correct? or is there a better way to think of it?

    Read the article

  • Is it possible to import specific class from project propreties

    - by Alex
    I have 2 projects. First project need to include second. When I copy sources from second project to first I need to modify manually import path to R.java file. The problem is that I need to use SVN external link connection between this 2 projects, that is mean, one project (the bigger one) will take sources from another through svn and should be able to use it without any modifications. If I would be able to specify R.java file path anywhere in project properties it will resolve my problem by changing manually that path. Need to specify that package name of these 2 projects are different. Another solution to resolve this problem also would be accepted. Thank you.

    Read the article

  • html5media library doesn't work on FF 3.6.3

    - by Alex
    Hi. Am I the only one experiencing this issue? I'm using the html5media library and the test page they provide no longer plays in Firefox 3.6.3, though it plays on the latest Safari, Chrome, Opera, and IE. On FF 3.6.3, it shows the video and the audio with large X through them. I'm using this library on my site and noticed the issue as well. I'm not seeing any errors in the error console.

    Read the article

  • Navigating between activities and tasks

    - by Alex Orlov
    The situation: I have an activity "A" that is a delegator activity, in simple words, it's only purpose is to call activity "B" (via startActivityForResult()) depending on data it receives. Activity "B" has launchMode set to "singleTask", so it always runs in a single task. When activity "A" gets started from another task (for example as a share from gallery) it immediately returns ACTION_CANCELLED for activity "B", finishes, and task of activity "B" comes to front (which is an expected behavior). So, what happens, is that we jump from our Gallery app task, to my activity "B" task. Everything is fine until user presses back. Since we are already in a different task, the back button doesn't lead us back to gallery. It navigates in the stack of activity "B" task. The question: is there any way to navigate from one task, to previously shown task (navigate from activity "B" to gallery)? Or maybe there is a way to take currently running activity "B" and move it to another task?

    Read the article

  • Clojure: I have many sorted maps and want to reduce in order all there values a super maps of keys -> vector

    - by Alex Foreman
    I have seen this but can't work out how to apply it (no pun intended) to my situation. I have a sorted list of maps like this: (note there can be more than two keys in the map) ({name1 3, name2 7}, {name1 35, name2 7}, {name1 0, name2 3}) What I am after is this data structure afterwards: ({:name1 [3,35,0]}, {:name2 [7,7,3]}) Ive been struggling with this for a while and cant seem to get anywhere near. Caveats: The data must stay sorted and I have N keywords not just two.

    Read the article

  • I want to make a 2D color plot showing stress magnitude (S) at very loctaion (x, y) based on continuous color change using limited data sets

    - by Alex Liu
    friends, I have to trouble you as I couldn't find a solution after trying for a long time. I have 3 columns of data. x, y, and the stress value (S) at every point (x, y). I want to generate a 2D color plot displaying continuous color change with the magnitude of the stress (S). The stress values increase from -3*10^4 Pa to 4*10^4 Pa. I only have hundreds of data sets for an area, but I want to see the stress magnitude (read from the color) at every location (x, y). What Matlab command should I use? Thank you very much! I want to make a 2D color plot showing stress magnitude (S) at very loctaion (x, y) based on continuous color change using limited

    Read the article

  • How do online stores handle 2 customers that add the last item to their cart?

    - by Alex
    I'm making a store web app for a college class. I'm wondering what do stores like Amazon do when there is only 1 item left? Do they let multiple customers add the last item to their cart, and whoever checks out first gets it? Meaning that the inventory database is updated after purchase. or Do they let only one customer add the last item to their cart and remove the item from the inventory. If the customer's session times out, then the item is put back in the inventory.

    Read the article

  • get greatest prime factor in F#

    - by Alex
    I had VS 11 beta and the following code was working without problem: let rec fac x y = if (x = y) then y elif (x % y = 0I) then fac (x / y) y else fac x / (y + 1I);; Now I installed VS 2012 RC and I get the following error: The type 'System.Numerics.BigInteger -> System.Numerics.BigInteger' is not compatible with the type 'System.Numerics.BigInteger' Is code not correct or F# interactive? It's F# 3.0.

    Read the article

  • How to select first empty value option in a select menu??

    - by alex
    Hi there, The following always preselects the last option, but i like the first option to be preselected? <select name="filter"> <option value="" selected>Make a choice</option> <option value="1">1</option> <option value="3">3</option> <option value="7">7</option> <option value="">all</option> </select> even with the first selected?? Can this be done??

    Read the article

  • How costly performance-wise are these actions in iPhone objective-C?

    - by Alex Gosselin
    This is really a few questions in one, I'm wondering what the performance cost is for these things, as I haven't really been following a best practice of any sort for these. The answers may also be useful to other readers, if somebody knows these. (1) If I need the core data managed object context, is it bad to use #import "myAppDelegate.h" //farther down in the code: NSManagedObjectContext *context = [(myAppDelegate.h*)[[UIApplication sharedApplication] delegate] managedObjectContext]; as opposed to leaving the warning you get if you don't cast the delegate? (2) What is the cheapest way to hard-code a string? I have been using return @"myString"; on occasion in some functions where I need to pass it to a variety of places, is it better to do it this way: static NSString *str = @"myString"; return str; (3) How costly is it to subclass an object i wrote vs. making a new one, in general? (4) When I am using core data and navigating through a hierarchy of some sort, is it necessary to turn things back into faults somehow after I read some info from them? or is this done automatically? Thanks for any help.

    Read the article

  • Capture Stored Procedure print output in .NET (Different model!)

    - by Workshop Alex
    Basically, this question with a difference... Is it possible to capture print output from a TSQL stored procedure in .NET, using the Entity Framework? The solution in the other question doesn't work for me. It works with the connection type from System.Data.SqlClient but I'm using the one from System.Data.EntityClient which does not have an InfoMessage event. (Of course, I could just create an SQL connection based on the Entity connection settings, but prefer to do it directly.)

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >