Search Results

Search found 18677 results on 748 pages for 'current'.

Page 22/748 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Web Setup Project - Getting the Current Machine Name

    - by Shane Kenney
    I've got a web setup project with a custom screen in it that asks for a machine name. Is there anyway to prepopulate this field with the current machines name? For the case that I need it for just including "Localhost" does not meet my requirements. "Environment.MachineName" will return the machine name within a code block which would be fine if I was needing it in a custom action. But it seems custom actions don't excecute until after you go through the installation wizard... So I cant actually use it. Anyway let me know what you think.

    Read the article

  • I want to convert NSString to NSDate but UIPickerView shows current date

    - by Ali
    I want to convert NSString to NSDate but UIPickerView shows current datedatePicker=[[UIDatePicker alloc]init]; datePicker.userInteractionEnabled=YES; datePicker.minuteInterval=5; NSLog(@"Date"); //////// NSString *curDate=alarmData.date; //Jan 14, 2011 11:37 NSDateFormatter *format = [[NSDateFormatter alloc] init]; [format setDateFormat:@"MMM dd, yyyy HH:mm"]; //Optionally for time zone converstions [format setTimeZone:[NSTimeZone timeZoneWithName:nil]]; NSDate *da = [format dateFromString:curDate]; [datePicker setDate:da animated:YES]; any suggestions

    Read the article

  • Operation is not valid due to the current state of the object

    - by DBa
    Sometimes, when running a Mono .NET application (it seems to not depend on the input data, as it does not change), I run into following situation: when trying to Dequeue an element from a (non-empty, I check its Count beforehand) Queue, an exception is thrown: Unhandled Exception: System.InvalidOperationException: Operation is not valid due to the current state of the object at System.Collections.Generic.Queue1[DBWorkItem].Peek ()[0x00000] at System.Collections.Generic.Queue1[DBWorkItem].Dequeue () [0x00000] at DBProcessor.process (System.Object q) [0x0006b] in <... Though I can certainly catch this exception, the element is dequeued and lost. Has anyone else encountered this behavior, too?

    Read the article

  • Saving current directory to zsh history

    - by user130208
    I wanted to achieve the same as asked here http://stackoverflow.com/questions/945288/saving-current-directory-to-bash-history but within zsh shell. I haven't done any zsh trickry before but so far I have: function precmd { hpwd=$history[$((HISTCMD-1))] if [[ $hpwd == "cd" ]]; then cwd=$OLDPWD else cwd=$PWD fi hpwd="${hpwd% ### *} ### $cwd" echo "$hpwd" ~/.hist_log } Right now I save the command annotated with the directory name to a log file. This works fine for me. Just thought there might be a way to make replacement in the history buffer itself.

    Read the article

  • How to get the current eventNumber for creating an event with NSEvent

    - by Chris
    Hello I'm creating an os x application for which I try to add a remote interface. For this I need to be able to send mouse down and mouse up commands to the window of my application. I found code with which I can successfully do this, it looks as follows: int mask = 0x100; NSEvent* eventMouseDown = [NSEvent mouseEventWithType:NSLeftMouseDown location:p modifierFlags:mask timestamp:[NSDate timeIntervalSinceSystemStartup] windowNumber:[w windowNumber] context:[NSGraphicsContext graphicsContextWithWindow:w] eventNumber:++eventCounter +42599 clickCount:1 pressure:0]; NSLog(@"Mouse down event: %@", eventMouseDown); [[NSApplication sharedApplication] sendEvent:eventMouseDown]; I have only one problem with this code thought and this is the eventNumer parameter. As far as I found out it is a number which get increased with each event. But I cannot find a way to find the current number from where on I need to increase. The number I use there currently is just try and error and also does not seam to work always.

    Read the article

  • displaying current minute of a soccer match

    - by zurna
    I could not figure out the logic I would need to display a current minute of a soccer match. I have three fields in the database. DateFirstStarted DateSecondStarted DateFullEnded I should enter DateFirstStarted when the game starts and on the website. i.e. game starts at 7:05pm, on 7:25pm it should display '20 on the website. However, it should stop on the 45th minute. Then, I enter DateSecondStarted when the second half starts and should count from 46 to 90 and freeze there. Do I make sense? How can I do it? Is there a better way to do this?

    Read the article

  • How to get current location with an accept accuracy in Android

    - by virsir
    I am trying to locate user's device to get its current location with coarse method. The problem is that I can only accept a location with accuracy of 1000m, my code like this: public void onLocationChanged(Location location) { currentLocation = location; if(location.hasAccuracy()) { if(location.getAccuracy() < 1000) { locationManager.removeUpdates(this); callback(); //do callback here } } } But what if the network is not good and I can not get the location with that accuracy? I may want to accept the latest location I got if I have requested its location for some time, like 1 minute. Then how can I control the request time, for example, 1 minute, if it did not get the accurate location until then, I will stop it and then accept the latest location I have got if exist.

    Read the article

  • iPhone - finding items in current entity that share related item

    - by Pedro
    G'day Folks My core data driven app has an Events entity, essentially a list of times & venues, with a related Acts entity, the names & bios of the acts appearing at those events. I have a table view that shows the event time & venue (as a table section with 1 row), the act name & act bio that works nicely. If that act is appearing at more than one event I'd like to include another table section that lists those events. I think could get that with event.act.events except that it would include the event I'm currently displaying. Can anyone suggest how to get the data I want & exclude the current record? Cheers & TIA, Pedro :) PS... I have not quite 18 hours until the promised time for a prototype of my app to be available for some testers to download.

    Read the article

  • I need to display users current location as text

    - by Taylor Satula
    Hi, I am new to iPhone development and really have no idea how to do what I am trying to implement. Here is my problem, I need to display the users current street and city as text in my iPhone app (See picture). I have seen many posts on stack overflow and other websites about how to do this but they are all just code examples. As I said before, I am a extreme beginner. I just need to show the MKReverseGeocoder and its output as text in my application. If someone could walk me through how/where to create the ReverseGeocoder and how to make it show up in my application I would be extremely grateful. I have searched for hours trying to find a beginner example but alas I cannot find one that lays it out step by step. I hope this can help me out.

    Read the article

  • How to get current compass reading android 2.1

    - by Brandon Delany
    How do I get the current compass reading in android 2.1? I know that I can initiate a listener and receive updates but I do not need constant updates I only need it to get the compass orientation when the user clicks a button. Also what is the most accurate way to get the compass orientation? Lastly, how do I send fake data to the android console. I know that you're supposed to use the terminal and send it commands but what are the commands I can't seem to find it on the Android website. Thank you

    Read the article

  • excel vba: return values only if they are not present in current column

    - by every_answer_gets_a_point
    i have a column to which i am adding data from another column i would like to check whether that column has the data that i wish to add. can you help me wiht a formula that will tell me whether a certain value exists in the current column? please keep in mind it is a bit more complex than it sounds. currently i have this in the cell: =IF(OR(A3="ETG_C",A3="ETGC"),C3,"na") i would like to have something like this =IF(FIND(IF(OR(A2="ETG_C",A2="ETGC"),C2,"na"),K:K,1)," ",IF(OR(A2="ETG_C",A2="ETGC"),C2,"na")) another words, if the top value exists already, then add a blank space

    Read the article

  • How to get current date and time from DB using SQLAlchemy

    - by bluish
    I need to retrieve what's the current date and time for the database I'm connected with SQLAlchemy (not date and time of the machine where I'm running Python code). I've seen this functions, but they don't seem to do what they say: >>> from sqlalchemy import * >>> print func.current_date() CURRENT_DATE >>> print func.current_timestamp() CURRENT_TIMESTAMP Moreover it seems they don't need to be binded to any SQLAlchemy session or engine. It makes no sense... Thanks!

    Read the article

  • Setting current culture with threads in ASP.NET MVC

    - by mare
    Here's an example of SetCulture attribute which inside does something like this: public void OnActionExecuting(ActionExecutingContext filterContext) { string cultureCode = SetCurrentLanguage(filterContext); if (string.IsNullOrEmpty(cultureCode)) return; HttpContext.Current.Response.Cookies.Add( new HttpCookie("Culture", cultureCode) { HttpOnly = true, Expires = DateTime.Now.AddYears(100) } ); filterContext.HttpContext.Session["Culture"] = cultureCode; CultureInfo culture = new CultureInfo(cultureCode); System.Threading.Thread.CurrentThread.CurrentCulture = culture; System.Threading.Thread.CurrentThread.CurrentUICulture = culture; } I was wondering how does this affect a site with multiple users logged on and each one setting their own culture? What is the scope of a thread here with regards to the IIS worker process (w3wp) that the site is running in?

    Read the article

  • Publish to Current user's wall using FBJS in FBML application

    - by Damodaran
    Hi I need to publish some message to the current user's wall using FBJS in FBML application. When I use window.fbAsyncInit = function() { FB.init({appId: 'MY_APP_ID', status: true, cookie: true, xfbml: false}); }; i am getting an error :- FB is not defined. and window is not defined. For publishing i am using this code function graphStreamPublish(){ var body = document.getElementById("txtTextToPublish").value; FB.api('/me/feed', 'post', { message: body }, function(response) { if (!response || response.error) { // alert('Error occured'); } else { // alert('Post ID: ' + response.id); } }); } (I cannot use alert in facebook..) Thanks in advance..

    Read the article

  • PHP Dynamic include based on current file path

    - by Adrian M.
    Hello, I want to find a method to include some files based on the current file path.. for example: I have "website.com/templates/name1/index.php", this "index.php should be a unique file that I will use in many different directories on different depths, so I want to make the code universal so I don't need to change anything inside this file.. So if this "index.php" is located in "website.com/templates/name1/index.php" than it should include the file located here: "website.com/content/templates/name1/content.php" another example: "website.com/templates/name2/index.php" than it should include the file located here: "website.com/content/templates/name2/content.php" Also I want to overrun "*Warning: include_once() [function.include-once]: http:// wrapper is disabled in the server configuration by allow_url_include=0*" kind of error.. because is disabled and unsafe.. Is there a way to achieve this? Thank you!

    Read the article

  • How to get url parameter value of current route in view in ASP .NET MVC

    - by Dima
    For example I am on page http://localhost:1338/category/category1?view=list&min-price=0&max-price=100 And in my view I want to render some form @using(Html.BeginForm("Action", "Controller", new RouteValueDictionary { { /*this is poblem place*/ } }, FormMethod.Get)) { <!--Render some controls--> <input type="submit" value="OK" /> } What I want is to get view parameter value from current page link to use it for constructing form get request. I tried @using(Html.BeginForm("Action", "Controller", new RouteValueDictionary { { "view", ViewContext.RouteData.Values["view"] } }, FormMethod.Get)) but it doesn't help.

    Read the article

  • Displaying current time above the thumb of a slider in Silverlight

    - by Scharrels
    I've made a time slider in Silverlight. To style it, I've made a control template and modified the style. I've added a text field above the thumb (always centered above the thumb), which should display the time. However, I can't find any way to access the slider information (e.g. current value) or find another way to pass any information to the style, which I can then data bind to the text field. So my question in short: how can I display time information above the thumb?

    Read the article

  • Macro to copy data from one sheet to another based on the current date

    - by SgtSnafu
    Does anyone have a macro that copy data from one sheet to another based on the current date? I am working with a single workbook of three sheets. Sheet one will hold the manual input of daily production figures for multiple plants, sheet two is to hold ongoing daily data, keyed on sheet one. The macro will be associated with a button, so that once clicked it would search for every row that has a date of today, and copy that row to the next available blank row on sheet two. Sample Data... Plant 1 Input Date - $ Produced - Labor Hour 3-29-10 - 4538 - 8 3-30-10 - 7862 - 12 3-31-10 4-1-10 4-2-10 Plant 2 Input Date - $ Produced - Labor Hour 3-29-10 - 4545 - 9 3-30-10 - 7645 - 12 3-31-10 4-1-10 4-2-10

    Read the article

  • require_owner code to limit controller actions not recognizing current user as owner

    - by bgadoci
    I am trying to restrict access to certain actions using a before_filter which seems easy enough. Somehow the ApplicationController is not recognizing that the current_user is the owner of the user edit action. When I take the filter off the controller correctly routes the current_user to their edit view information. Here is the code. Link to call edit action from user controller (views/questions/index.html.erb): <%= link_to "Edit Profile", edit_user_path(:current) %> ApplicationController (I am only posting the code that I think is affecting this but can post the whole thing if needed). class ApplicationController < ActionController::Base def require_owner obj = instance_variable_get("@#{controller_name.singularize.camelize.underscore}") # LineItem becomes @line_item return true if current_user_is_owner?(obj) render_error_message("You must be the #{controller_name.singularize.camelize} owner to access this page", root_url) return false end end and the before_filter class UsersController < ApplicationController before_filter :require_owner, :only => [:edit, :update, :destroy] #... end I simply get the rendering of the error message from the ApplicationController#require_owner action.

    Read the article

  • @@TRANCOUNT and a current connection

    - by AspOnMyNet
    Assume I connect to SQL server 2008 via SQL Server Management Studio ( SSMS ) and open new window W1 by clicking on New Query tab and write the following inside W1: BEGIN TRANSACTION; If I execute this statement 5 times, and then write (inside W1) SELECT @@TRANCOUNT; , then the value returned will be 5. But if I open another window W2 ( inside the same SSMS instance and thus on the same connection ) and write inside W2 SELECT @@TRANCOUNT; then value returned will be 0. @@TRANCOUNT variable returns the number of active transactions for the current connection. Both W1 and W2 windows were opened on the same connection, so shouldn’t ( according to the above quote ) in both W1 and W2 variable @@TRANCOUNT hold the same value? thanx

    Read the article

  • Refer to te current directory in a shell script

    - by One Two Three
    How do I refer to the current directory in a shell script So I have this script which calls another script in the same directory #! /bin/sh #Call the other script ./foo.sh # do something ... For this I got ./foo.sh: No such file or directory So I changed it to: #! /bin/sh #Call the other script foo.sh # do something ... But this would call the foo script which is, by default, in the PATH. This is not what I want. So the question is, what's the syntax of doing './` in a shell script?

    Read the article

  • .NET security: how to check if a method is allowed to execute under current user's perrmissions

    - by Gart
    Given an ASP.NET MVC Controller class declaration: public class ItemController : Controller { public ActionResult Index() { // ... } public ActionResult Details() { // ... } [Authorize(Roles="Admin, Editor")] public ActionResult Edit() { // ... } [Authorized(Roles="Admin")] public ActionResult Delete() { // .. } } I need to reflect a list of methods in this class which may be invoked with the current user's permissions. The [Authorized] attribute is specific to ASP.NET MVC, and this is only an example. I would prefer a universal solution for this problem which works for any .NET class. Please share some ideas of what could be done in this case.

    Read the article

  • Why my print current date time (C language) gives different answer

    - by vodkhang
    I want to get the current date (day, mon and year). I found out there are some functions in C to do that like ctime (get the string of time), localtime and gmtime. I tried with following code but the output are different. I get this output: The date and time is Tue Apr 20 2010 (which is correct) The year is : 110 The year is : 110. Does anybody know why? int main(int argc, char** argv) { time_t now; if((now = time(NULL)) == (time_t)-1) { puts("Failure in getting time"); } else { printf("The date and time is: %s\n", ctime(&now)); printf("The year is: %ld\n", localtime(&now)->tm_year); printf("The year is: %ld\n", gmtime(&now)->tm_year); } getchar(); }

    Read the article

  • Current status on Insight and gdb7.x?

    - by Johan
    Hi Does anybody know the current status on Insight and if they are working on integrating gdb7.x so there may be a new updated version? There don't seem to be much activity on the home page and the mail-lists. And does someone know if somebody over in the gdb camp is trying merge the two projects together? There is a least a interesting todo at the Insight page ( http://sourceware.org/insight/faq.php#q-4.2 ) " 2. Get Insight integrated and accepted into the GDB mainline." Thanks

    Read the article

  • Jquery help for current time indication within a range

    - by Appster
    I'm looking for a simple light-weight jquery plugin that'll help me show something like this in my website: Essentially, this is like a timeline. I know the start and end dates (in that, they don't change) and the position of today's date just gives an indication of how far along I am into a task I took up on Jun 1, 2012. That's all I need it for - a better visual indication of my current status. I've found a lot of jquery timeline plugins but they are too complex for what I'm trying to do. Any ideas or suggestions? Thanks in advance.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >