Search Results

Search found 1774 results on 71 pages for 'steve melvin'.

Page 44/71 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • How to check for C++ copy ellision

    - by Steve
    I ran across this article on copy ellision in C++ and I've seen comments about it in the boost library. This is appealing, as I prefer my functions to look like verylargereturntype DoSomething(...) rather than void DoSomething(..., verylargereturntype& retval) So, I have two questions about this Google has virtually no documentation on this at all, how real is this? How can I check that this optimization is actually occuring? I assume it involves looking at the assembly, but lets just say that isn't my strong suit. If anyone can give a very basic example as to what successful ellision looks like, that would be very useful I won't be using copy ellision just to prettify things, but if I can be guaranteed that it works, it sounds pretty useful.

    Read the article

  • java for loop not working

    - by Steve
    I hope this isn't a stupid question but I have looked up every example I can find and it still seems like I have this code right and it still isn't working... I enter one number and it moves on to the next line of code instead of looping. I'm using this to fill an array with user input numbers. I appreciate any help, thanks. for(i=0; i<9; i++); { System.out.println ("Please enter a number:"); Num[i] = keyboard.nextDouble(); Sum += Num[i]; Product *= Num[i]; }

    Read the article

  • How to buld selective Projects within a Solution in TS 2008 in Team Build?

    - by Steve Johnson
    Hi all. I have a solution the source Control (TFS 2008) with multiple projects. Some of the projects are independent of each other. I dont want to build the complete solution instead sometimes we need to build some of the projects. I am a total newbie in Team Build. Please help how i can use the <SolutionToBuild Include="$(BuildProjectFolderPath)/../../Development/Main/Build-Development.sln"> <Targets></Targets> <Properties></Properties> </SolutionToBuild> to select only some of the projects from the solution. Kindly give a detailed answer for me as i am absolutely clueless about it. Thanks

    Read the article

  • How do you expose a C++ class in the V8 Javascript Engine so it can be created using new?

    - by Steve Hanov
    The official examples of exposing a Point class seem to assume that there will be a fixed number of instances of it in your program. It is not clear how new instances are allocated in the C++ code, when new is called in Javascript. How would you expose a class that can have multiple instances? For example, an Image class: var img1 = new Image( 640, 480 ); var img2 = new Image( 1024, 768 ); img1.clear( "red" ); img2.clear( "black" );

    Read the article

  • Include pdbs in installer?

    - by Steve
    Is there any reason to not include pdb files in an installer? I have C++ logging functionality that walks the stack, and reports line numbers and file names. It would be great if my customers could send me logs with this information. However, they would need the pdb files. Is there any downside (other than installer package size) to deploying them?

    Read the article

  • Which MS technologies would be suited for a data intensive application?

    - by steve.tse
    I'm a junior VB.net developer with little application design knowledge. I've been reading a lot of material online regarding different design patterns, frameworks, and methodologies. It's become a bit confusing for me. Right now I'm trying to decide on what language would be best suited to convert an existing VB6 application (with SQL server backend.) I need to update the UI and add more user functionality and reporting capabilities. Initially I was thinking of using WPF and attempting the MVVM model for this big project. Reports would be generated from SSRS. A peer suggested using ASP.net and I don't have enough experience to determine what would be better. The senior programmers here are stuck on using VB6 and don't have any input on what to use. They are encouraging me to use the latest technologies. This application would be for ~20 users in a central location. Ideally I would stick to a Microsoft .net language. Current interface is similar to a datagrid table where the user would click in to see the detail of each record. They would need to have multiple records open at any given time. I look forward to all the advice I can get. EDIT 2010/04/22 2:47 PM EST What is your audience? Internal clients within an intranet How complex are the interactions you expect to implement? not very... displaying data from SQL server to UI. Allow user updates to said data. Typically just one user modifying a record. Do you require near real-time data updates? no How often do you expect to update the application after the first release? twice/year Do you expect a well-defined set of client platforms? Yes, windows xp environment, potentially upgrading to Win7. Currently in IE.6 moving to IE7 or 8 within a couple of months. Do users need access from anywhere? No, just from their PC.

    Read the article

  • Widget_Controller for different types of data (MVC)

    - by steve-o
    Hello, I have a few widgets I need to show on a site - they are all relating to different types of data (e.g user, house). Each type of data and its relations is represented in specific models, but as far as a controller or helper is concerned, is it an ok plan to have a generic Widget controller/helper which generates the necessary widgets, even though each widget is dealing with distinct data? I don't really want to generate these widgets within the User and House controllers, as these controllers are dealing with different types of functionality. I'd imagine that the Widget_Controller could just contain static methods for generating these widgets, e.g: Widget_Controller::user_panel(); Does that make sense? Cheers!

    Read the article

  • PHP setting cookies in a child class

    - by steve
    I am writing a custom session handler and for the life of me I cannot get a cookie to set in it. I'm not outputting anything to the browser before I set the cookie but it still doesn't work. Its killing me. The cookie will set if I set it in the script I define and call on the session handler with. If necessary I will post code. Any ideas people? <?php /* require the needed classes comment out what is not needed */ require_once("classes/sessionmanager.php"); require_once("classes/template.php"); require_once("classes/database.php"); $title=" "; //titlebar of the web browser $description=" "; $keywords=" "; //meta keywords $menutype="default"; //default or customer, customer is elevated $pagetitle="dflsfsf "; //title of the webpage $pagebody=" "; //body of the webpage $template=template::def_instance(); $database=database::def_instance(); $session=sessionmanager::def_instance(); $session->sessions(); session_start(); ?> and this is the one that actually sets the cookie for the session function write($session_id,$session_data) { $session_id = mysql_real_escape_string($session_id); $session_data = mysql_real_escape_string(serialize($session_data)); $expires = time() + 3600; $user_ip = $_SERVER['REMOTE_ADDR']; $bol = FALSE; $time = time(); $newsession = FALSE; $auth = FALSE; $query = "SELECT * FROM 'sessions' WHERE 'expires' > '$time'"; $sessions_result = $this->query($query); $newsession = $this->newsession_check($session_id,$sessions_result); while($sessions_array = mysql_fetch_array($sessions_result) AND $auth = FALSE) { $session_array = $this->strip($session_array); $auth = $this->auth_check($session_array,$session_id); } /* this is an authentic session. build queries and update it */ if($auth = TRUE AND $newsession = FALSE) { $session_data = mysql_real_escape_string($session_data); $update_query1 = "UPDATE 'sessions' SET 'user_ip' = '$user_ip' WHERE 'session_id' = '$session_id'"; $update_query2 = "UPDATE 'sessions' SET 'data' = '$session_data' WHERE 'session_id = '$session_id'"; $update_query3 = "UPDATE 'sessions' SET 'expires' = '$expires' WHERE 'session_id' = '$session_id'"; $this->query($update_query1); $this->query($update_query2); $this->query($update_query3); $bol = TRUE; } elseif($newsession = TRUE) { /* this is a new session, build and create it */ $random_number = $this->obtain_random(); $cookieval = hash("sha512",$random_number); setcookie("rndn",$cookieval); $query = "INSERT INTO sessions VALUES('$session_id','0','$user_ip','$random_number','$session_data','$expires')"; $this->query($query); //echo $cookieval."this is the cookie <<"; $bol = TRUE; } return $bol; }

    Read the article

  • c++ fread changing fgetpos strangely

    - by Steve
    If I run: FILE* pFile = fopen("c:\\08.bin", "r"); fpos_t pos; char buf[5000]; int ret = fread(&buf, 1, 9, pFile); fgetpos(pFile, &pos); I get ret = 9 and pos = 9. However if I run FILE* pFile = fopen("c:\\08.bin", "r"); fpos_t pos; char buf[5000]; int ret = fread(&buf, 1, 10, pFile); fgetpos(pFile, &pos); ret = 10 as expected, but pos = 11! How can this be?

    Read the article

  • How many variables is to many when storing in _SESSION?

    - by steve
    Hi - I'm looking for an idea of best practices here. I have a web based application that has a number of hooks into other systems. Let's say 5, and each of these 5 systems has a number of flags to determine different settings the user has selected in said systems, lets say 5 settings per system (so 5*5). I am storing the status of these settings in the user sesion variables and was wondering is that a sufficient way of doing it? I'm learning php as I go along so not sure about any pitfalls that this could run me into!

    Read the article

  • PrintingPermissionLevel, SafePrinting, and restrictions

    - by Steve Cooper
    There is a PrintingPermission attribute in the framework which takes a PrintingPermissionLevel enumeration with one of these values; NoPrinting: Prevents access to printers. NoPrinting is a subset of SafePrinting. SafePrinting: Provides printing only from a restricted dialog box. SafePrinting is a subset of DefaultPrinting. DefaultPrinting: Provides printing programmatically to the default printer, along with safe printing through semirestricted dialog box. DefaultPrinting is a subset of AllPrinting. AllPrinting: Provides full access to all printers. The documentation is really sparse, and I wondered if anyone can tell me more about the SafePrinting option. What does the documentation mean when it says "Provides printing only from a restricted dialog box." I have no idea what this means. Can anyone shed any light? This subject is touched in the MS certification 70-505: TS: Microsoft .NET Framework 3.5, Windows Forms Application Development and so I'm keen to find out more.

    Read the article

  • Is there an efficient algorithm to distribute resources in a way that both avoids conflict and allows bias?

    - by Steve V.
    Background (Skip this if you only care about the algorithm) At the university where I work, one of the biggest hassles in our department is classroom scheduling. For illustration purposes and to lay out the scope of the problem, here's how we do scheduling now: Professors give us a list of the classes they're teaching with the time slots they'd prefer to teach, ranked in order of priority (most desired to least desired). Administration gives us a list of the rooms we may assign along with the times those rooms are available for our department's use. We start assigning professors to rooms trying (at first) to take into account the preferences of the various professors. Inevitably, conflicts arise, professors start asking for changes, and the plan falls to pieces somewhere around professor number 30, at which point we start assigning rooms basically wherever we can fit them in, crumpled pieces of paper are everywhere, and nobody's happy. (If you've ever wondered why your class was at 9.30 in the morning on Thursday but 4 pm every other day, now you know) I have been asked to quietly investigate whether software could do this more optimally. The Actual Question Is there an algorithm to efficiently schedule a set of resources such that the following criteria are met: The algorithm must never assign two professors to the same room at the same time. The task is not complete until every professor has been assigned a room / time. The algorithm need not worry about having too many professors for the amount of time slots available. (We're not that well funded.) As much as is possible the algorithm should respect the scheduling preferences of the individual professors. I feel like I can't be the first one to ask this. Is there a efficient algorithm for this, or is this the sort of problem that can only be brute-forced?

    Read the article

  • Delphi and Outlook TaskItem: How to know if DueDate is empty?

    - by Steve
    This seems like a no-brainer but I couldn't find anything on it. How do I detect if a date variant in Outlook is "empty"? For example TaskItem.DueDate - the duedate is not necessarily filled. If it's not filled Outlook returns "4501.01.01." - I can test for this value, but this just doesn't seem "elegant" enough. Thanks!

    Read the article

  • How to determine expected license serial number by viewing an EXE File?

    - by Steve
    I was attempting to install an exe that requires a serial number before the install, which the vendor has not provided to us yet. This got my wheels turning about whether there is any information that can be gained from viewing an exe using a hex editor/VI/etc? Using VI to view an exe, I can see some sections of plain text, but it is difficult to determine what it refers to without any context around it. Is it possible to determine any information by reading an exe? Thanks

    Read the article

  • Can ASP.NET be configured to run as an administrator when UAC is enabled?

    - by Steve Eisner
    I can't seem to find any information that indicates whether ASP.NET can be configured (through web.config or maybe machine.config) to run as a real administrator on a machine with UAC enabled. By this I mean, even if you set it to impersonate an Administrator account, UAC will disable that account's ability to act as an Administrator by returning a token set that hides the administrator role. For any checks such as IsInRole, the running account is effectively not an administrator at all. So ... Let's say I want to ignore all good advice and just go ahead and run a web app on Vista with administrator permissions. Is it even possible? Alternatives welcome. (Core reason for needing administrator privileges: to stop or start services that are running on that machine.)

    Read the article

  • Match two mysql cols on alpha chars (ignoring numbers in same field)

    - by Steve
    I was wondering if you know of a way I could filter a mysql query to only show the ‘alpha’ characters from a specific field So something like SELECT col1, col2, **alpha_chars_only(col3)** FROM table I am not looking to update only select. I have been looking at some regex but without much luck most of what turned up was searching for fields that only contain ‘alpha’ chars. In a much watered down context... I have col1 which contains abc and col two contains abc123 and I want to match them on alpha chars only. There can be any number of letters or numbers. Any help very much wel come

    Read the article

  • Start two processes and connect them with a pipe in Delphi

    - by Steve
    I need to launch two external programs in my program and connect the STDOUT of the first one to the STDIN of the second program. How can you achieve this in Delphi (RAD Studio 2009, if it matters)? I'm operating in Windows environment. As a commandline command my situation would look something like this: dumpdata.exe | encrypt.exe "mydata.dat"

    Read the article

  • Ajax using Rails

    - by Steve
    Hi, I have a favourite and un-favourite functionality in my application and I am using jQuery. This functionality works partially. The page gets loaded, and when I click the 'favourite' button(it is inside add_favourite_div element), it sends a XHR request and the post is set as favourite. Then a new div called "remove_favourite_div" replaces its place.Now when I click the remove favourite(which is part of remove_favourite_div), it sends a normal http request inside of xhr. The structure when the page gets loaded first time <div id="favourite"> <div id="add_favourite_div"> <form method="post" id="add_favourite" action="/viewpost/add_favourite"> <div style="margin: 0pt; padding: 0pt; display: inline;"> <input type="hidden" value="w873BgYHLxQmadUalzMRUC+1ql4AtP3U7f78dT8x9ho=" name="authenticity_token"> </div> <input type="hidden" value="3" name="Favourite[post_id]" id="Favourite_place_id"> <input type="hidden" value="2" name="Favourite[user_id]" id="Favourite_user_id"> <input type="submit" value="Favourite" name="commit"><br> </form> </div> </div> DOM after clicking on the unfavourite button <div id="favourite"> <div id="remove_favourite_div"> <form method="post" id="remove_favourite" action="/viewpost/remove_favourite"> <div style="margin: 0pt; padding: 0pt; display: inline;"> <input type="hidden" value="w873BgYHLxQmadUalzMRUC+1ql4AtP3U7f78dT8x9ho=" name="authenticity_token"> </div> <input type="hidden" value="3" name="Favourite[post_id]" id="Favourite_place_id"> <input type="hidden" value="2" name="Favourite[user_id]" id="Favourite_user_id"> <input type="submit" value="UnFavourite" name="commit"><br> </form> </div> </div> In my application.js, I have two functions to trigger the xhr request $("#add_favourite").submit(function(){ alert("add favourite"); action = $(this).attr("action") $.post(action,$(this).serialize(),null,"script"); return false; }); $("#remove_favourite").submit(function(){ alert("remove favourite"); action = $(this).attr("action"); $.post(action,$(this).serialize(),null,"script"); return false; }); Here, when the post is initially not a favourite, favourite button is displayed and when i clicked on the button, $("#add_favourite").submit gets called and unfavourite form is displayed correctly, but now when I click on the un-favourite button, $("#remove_favourite").submit does not get called. The whole scenario is true in both ways, I mean favourite-Unfavourite and Unfavourite-favourite Can someone please help me to solve this Thanks

    Read the article

  • How to avoid raising an event to a closed form?

    - by Steve Dignan
    I'm having trouble handling the scenario whereby an event is being raised to a closed form and was hoping to get some help. Scenario (see below code for reference): Form1 opens Form2 Form1 subscribes to an event on Form2 (let's call the event FormAction) Form1 is closed and Form2 remains open Form2 raises the FormAction event In Form1.form2_FormAction, why does this return a reference to Form1 but button1.Parent returns null? Shouldn't they both return the same reference? If we were to omit step 3, both this and button1.Parent return the same reference. Here's the code I'm using... Form1: public partial class Form1 : Form { public Form1 () { InitializeComponent(); } private void button1_Click ( object sender , EventArgs e ) { // Create instance of Form2 and subscribe to the FormAction event var form2 = new Form2(); form2.FormAction += form2_FormAction; form2.Show(); } private void form2_FormAction ( object o ) { // Always returns reference to Form1 var form = this; // If Form1 is open, button1.Parent is equal to form/this // If Form1 is closed, button1.Parent is null var parent = button1.Parent; } } Form2: public partial class Form2 : Form { public Form2 () { InitializeComponent(); } public delegate void FormActionHandler ( object o ); public event FormActionHandler FormAction = delegate { }; private void button1_Click ( object sender , EventArgs e ) { FormAction( "Button clicked." ); } } Ideally, I would like to avoid raising events to closed/disposed forms (which I'm not sure is possible) or find a clean way of handling this in the caller (in this case, Form1). Any help is appreciated.

    Read the article

  • PHP line break with file_put_contents()

    - by steve-o
    I can't seem to figure out why the following code doesn't produce a new line in my text file - neither does using \n etc either - any ideas what could be wrong? $data = $name . ' | ' . $_POST['comment'] . PHP_EOL; //write to file $f = file_put_contents('posts.txt', $data, FILE_APPEND);

    Read the article

  • laying out images in UIScrollView automatically

    - by Steve Jabs
    i have a list of images retrieved from xml i want to populate them to a uiscrollview in an order such that it will look like this. 1 2 3 4 5 6 7 8 9 10 if there is only 10 images it will just stop here. right now my current code is this for (int i = 3; i<[appDelegate.ZensaiALLitems count]-1; i++) { UIButton *zenbutton2 =[UIButton buttonWithType:UIButtonTypeCustom]; Items *ZensaiPLUitems = [appDelegate.ZensaiALLitems objectAtIndex:i]; NSURL *ZensaiimageSmallURL = [NSURL URLWithString:ZensaiPLUitems.ZensaiimageSmallURL]; NSLog(@"FVGFVEFV :%@", ZensaiPLUitems.ZensaiimageSmallURL); NSData *simageData = [NSData dataWithContentsOfURL:ZensaiimageSmallURL]; UIImage *itemSmallimage = [UIImage imageWithData:simageData]; [zenbutton2 setImage:itemSmallimage forState:UIControlStateNormal]; zenbutton2.frame=CGRectMake( (i*110+i*110)-660 , 300, 200, 250); [zenbutton2 addTarget:self action:@selector(ShowNextZensaiPage) forControlEvents:UIControlEventTouchUpInside]; [scrollView addSubview:zenbutton2]; } notice the CGRectMake , i have to manually assign fixed values to position them. Is there any way to populate them out without manually assigning. for e.g the images will automatically go down a position once the first row has 3 images and subsequently for the rest.

    Read the article

  • Why doesn't BlackBerry let me click on this link?

    - by Steve N
    This is a link in an HTML email.. Other links in this email work, but this one does not get recognized in a BlackBerry as a link, so you can't click on it. Does anyone know why that might be? Here's the markup for it: <a title="Continue" style="display: block; width:200px; border:1px solid #336699; text-align: center; padding-top:5px; padding-bottom:5px; font-size:14px; font-family: Arial, Sans-Serif; color:#336699; font-weight:bold; text-decoration: none;" href="https://www.mydomain.com/mypage.aspx?id=8430650">Continue ››</a>

    Read the article

  • boost variant static_visitor problem picking correct function

    - by Steve
    I'm sure I'm having a problem with template resolution here, but I'm not sure why I'm having the problem. I have a static visitor I'm passing to boost variant where i've had to do template specialization for certain cases. The case for everything except for MyClass should throw in the static_visitor below. Unfortunately, when the visitor is applied to pull a MyClass out, it selects the most generic case rather than the exact match. I would type each case explicitly, but that will be rather long. So, why is the compiler resolving the most generic case over the exact match, and is there anyway to fix it template<> class CastVisitor<MyClass>:public boost::static_visitor<MyClass> { public: template<typename U> MyClass operator()(const U & i) const { throw std::exception("Unable to cast"); } MyClass operator()(const MyClass& i) { return i; } };

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >