Search Results

Search found 7418 results on 297 pages for 'argument passing'.

Page 133/297 | < Previous Page | 129 130 131 132 133 134 135 136 137 138 139 140  | Next Page >

  • Does the Visual Studio debugger implicitly cast smaller types to int?

    - by emddudley
    Does the Visual Studio 2008 debugger implicitly cast all smaller data types to int? I have a function with the following signature: public int DoSomething(sbyte value) { ... } When pass in -127 and I look at the value argument the Visual Studio debugger (e.g. Watch window) shows me that it has the value 0xFFFFFF81. This is correct except for the fact that sbyte is only 8 bits wide; I would expect the debugger to show me that it is 0x81.

    Read the article

  • Javascript Function Definitions

    - by Pierreten
    I was wondering why the Vector variable defined within this self executing javascript function doesn't require a var before it? Is this just some other type of syntax for creating a named function? Does this make it so we can't pass Vector as an argument to other functions? (function() { Vector = function(x, y) { this.x = x; this.y = y; return this; }; //...snip })()

    Read the article

  • How to generate a script for changing a column of varchar to xml type with data being converted?

    - by user1323981
    Initially I have a column (partner_email) of varchar.Now a recent change has come where it needs to be changed to be changed to the XML type but the previous records needs to be reserve into the new column. I have applied the below algorithm to accomplish the work /*********************************************************************** Purpose: To change the partner_email column from Varchar Type To Xml Type and convert the existing records from varchar to xml types. Programmers Notes: 1. Create a new Column by the name partner_email_temp of type XML into the Partner Table 2. Copy the Email contents from partner_email to partner_email_temp column after proper conversion N.B.~ The format will be <PartnerEmails> <Email>[email protected]</Email> <Email /> <Email /> </PartnerEmails> 3. Drop the exisitng partner_email 4. Rename partner_email_temp column to partner_email ***********************************************************************/ USE [Test] GO --===== Create a partner_email_temp column of type xml into the Partner table IF NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.columns WHERE table_name = 'Partner' AND column_name = 'partner_email_temp' ) BEGIN ALTER TABLE [dbo].[Partner] ADD partner_email_temp XML NULL END GO --===== Copy the Email contents from partner_email to partner_email_temp column -- after proper conversion to xml type UPDATE [dbo].[Partner] SET partner_email_temp = CAST('<PartnerEmails><Email>' + REPLACE(partner_email, '&', '&amp;') + '</Email><Email></Email><Email></Email></PartnerEmails>' AS XML) GO --===== Drop the exisitng partner_email ALTER TABLE [dbo].[Partner] DROP COLUMN partner_email GO --===== Rename partner_email_temp column to partner_email Exec sp_RENAME 'Partner.partner_email_temp','partner_email','COLUMN' GO I works fine for the first time I ran. Now if I ran it for the next time, it am getting an error Msg 8116, Level 16, State 1, Line 4 Argument data type xml is invalid for argument 1 of replace function. Caution: Changing any part of an object name could break scripts and stored procedures. The intention is that, if the partner_email column is varchar, the script will change it to xml type and will convert all the data in xml format . If I ran it second time, it should ignore the statement. How to achieve this? I am trying in a different way DECLARE @columnDataType VARCHAR(50) SELECT @columnDataType = DATA_TYPE FROM INFORMATION_SCHEMA.columns WHERE table_name = 'Partner' AND column_name = 'partner_email' print @columnDataType IF (@columnDataType = 'varchar') BEGIN --===== Create a partner_email_temp column of type xml into the Partner table IF NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.columns WHERE table_name = 'Partner' AND column_name = 'partner_email_temp' ) BEGIN ALTER TABLE [dbo].[Partner] ADD partner_email_temp XML NULL --===== Copy the Email contents from partner_email to partner_email_temp column -- after proper conversion to xml type UPDATE [dbo].[Partner] SET partner_email_temp = CAST('<PartnerEmails><Email>' + REPLACE(partner_email, '&', '&amp;') + '</Email><Email></Email><Email></Email></PartnerEmails>' AS XML) --===== Drop the exisitng partner_email ALTER TABLE [dbo].[Partner] DROP COLUMN partner_email --===== Rename partner_email_temp column to partner_email EXEC sp_RENAME 'Partner.partner_email_temp','partner_email','COLUMN' END END but getting error Msg 207, Level 16, State 1, Line 29 Invalid column name 'partner_email_temp'. Help needed

    Read the article

  • access javascrip variable in java

    - by chetan
    function test(custId){ List<Account> list=accountDelegate.findAccountEntityByGroupId((long)%> custId<%)%>; <script> } Here my question is how to send custId to java method as parameter from java script.where java method takes long argument.

    Read the article

  • Using rowDiffs() to calculate difference in values in matrix

    - by user1723765
    I'm using the rowDiffs() command to calculate the step by step difference in 116 rows in a matrix. I get the following error: Error in r[i1] - r[-length(r):-(length(r) - lag + 1L)] : non-numeric argument to binary operator I have no idea why this is happening. I could take the diff() separately for each row and it would work. Any ideas? Here's the data: https://dl.dropbox.com/u/22681355/data.csv Code: a=rowDiffs(data)

    Read the article

  • will be assumed to return id

    - by Andrew_E
    I import oourafft.h and oourafft.m class, but get strange error while ooura initialize. OouraFFT * myFFT = [OouraFFT initForSignalsOfLength:1024 numberOfWindows:10]; OouraFFT may not respond to +initForSignalsOfLength: numberOfWindows Messages without matching method signature will be assumed to return 'id' and accept argument - Warning I think that it some kind of error import .h file

    Read the article

  • What kind of data type is this?

    - by mystify
    In an class header I have seen something like this: enum { kAudioSessionProperty_PreferredHardwareSampleRate = 'hwsr', // Float64 kAudioSessionProperty_PreferredHardwareIOBufferDuration = 'iobd' // Float32 }; Now I wonder what data type such an kAudioSessionProperty_PreferredHardwareSampleRate actually is? I mean this looks like plain old C, but in Objective-C I would write @"hwsr" if I wanted to make it a string. I want to pass such an "constant" or "enum thing" as argument to an method.

    Read the article

  • mysql_query() returns returns true, but mysql_num_rows() and mysql_fetch_array() give "not a valid r

    - by zlance4012
    Here is the code in question: -----From index.php----- require_once('includes/DbConnector.php'); // Create an object (instance) of the DbConnector $connector = new DbConnector(); // Execute the query to retrieve articles $query1 = "SELECT id, title FROM articles ORDER BY id DESC LIMIT 0,5"; $result = $connector-query($query1); echo "vardump1:"; var_dump($result); echo "\n"; /(!line 17!)/ echo "Number of rows in the result of the query:".mysql_num_rows($result)."\n"; // Get an array containing the results. // Loop for each item in that array while ($row = $connector-fetchArray($result)){ echo ' '; echo $row['title']; echo ' '; -----end index.php----- -----included DbConnector.php----- $settings = SystemComponent::getSettings(); // Get the main settings from the array we just loaded $host = $settings['dbhost']; $db = $settings['dbname']; $user = $settings['dbusername']; $pass = $settings['dbpassword']; // Connect to the database $this-link = mysql_connect($host, $user, $pass); mysql_select_db($db); register_shutdown_function(array(&$this, 'close')); } //end constructor //* Function: query, Purpose: Execute a database query * function query($query) { echo "Query Statement: ".$query."\n"; $this-theQuery = $query; return mysql_query($query, $this-link) or die(mysql_error()); } //* Function: fetchArray, Purpose: Get array of query results * function fetchArray($result) { echo "<|"; var_dump($result); echo "| \n"; /(!line 50!)/$res= mysql_fetch_array($result) or die(mysql_error()); echo $res['id']."-".$res['title']."-".$res['imagelink']."-".$res['text']; return $res; } -----end DbConnector.php----- -----Output----- Query Statement: SELECT id, title FROM articles ORDER BY id DESC LIMIT 0,5 vardump1:bool(true) PHP Error Message Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /path to/index.php on line 17 Number of rows in the result of the query: <|bool(true) | PHP Error Message Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /path to/DbConnector.php on line 50

    Read the article

  • Look up or insert new element to string list in Haskell

    - by nightscream
    So I want to have a function that takes a String and a list as an argument, and checks if that element is already on the list, if it is, returns the same list, if it isnt, adds it to the list and returns it, 'im a begginer with haskell so heres what I have tried with no sucess: check:: String ->[String] ->[String] check x [] = []++[x] check x (y:xs) | x==y = (y:xs) | otherwise = check x xs Can someone point me the way ? thks

    Read the article

  • How can I view the source code for a particular `predict` function?

    - by merlin2011
    Based on the documentation, predict is a polymorphic function in R and a different function is actually called depending on what is passed as the first argument. However, the documentation does not give any information about the names of the functions that predict actually invokes for any particular class. Normally, one could type the name of a function to get its source, but this does not work with predict. If I want to view the source code for the predict function when invoked on objects of the type glmnet, what is the easiest way?

    Read the article

  • s3fs Input/output error

    - by shadow_of__soul
    i'm trying to set up a backup system with s3fs and the amazon s3 service. i followed this 2 guides: http://qugstart.com/blog/linux/how-to-mount-an-amazon-s3-bucket-as-virtual-drive-on-centos-5-2/ http://blog.eberly.org/2008/10/27/how-i-automated-my-backups-to-amazon-s3-using-rsync/ anyway making a tail to the /var/log/messages i get: Aug 28 13:37:46 server s3fs:###response=403 i already tried creating the authentication file on /etc/passwd-s3fs and setting there the access and private key, passing it trough the command line, i checked several times the credentials and i used it with s3fox, and is working. i also have set the time of the machine (with the date command) to be the same as the amazon S3 servers (i got the time of the S3 server uploading a file with the file manager) not only rsync don't work, commands like ls or cp in the /mnt/s3 didn't work also. any help of how i can solve/debug this? Regards, Shadow.

    Read the article

  • ActiveSync gives a 401.2 error

    - by Justin James
    Hello - I've been struggling for a while with a problem with ActiveSync, it is giving 401.2 errors when trying to access the mailboxes. Oddly enough, clients can get to the calendars just fine. I've tried from an Android device as well as the Exchange remote connectivity troubleshooter, same error both times. Here is the configuration: Connectivity through ISA 2006 Exchange 2007 on Windows 2008 Basic authentication is on ISA is passing through all authentication directly to the Exchange server The user IS allowed to get to ActiveSync in their Exchange mailbox settings I have tried the following, without success: * Making SSL not required * Enabling Windows Integrated and Digest authentication Here is an example of the errors in the IIS log: OPTIONS /Microsoft-Server-ActiveSync/default.eas - 443 - 192.168.32.18 TestActiveSyncConnectivity 401 2 5 0 Here is what I am seeing in my trace log: ModuleName IIS Web Core Notification 2 HttpStatus 401 HttpReason Unauthorized HttpSubStatus 2 ErrorCode 2147942405 ConfigExceptionInfo Notification AUTHENTICATE_REQUEST ErrorCode Access is denied. (0x80070005) I'm 100% stumped. Any clues? Thanks! J.Ja

    Read the article

  • Redirect TS Gateway Authentication to RADIUS Server

    - by Brent
    Hi All, I'm trying to set up an environment for my TS gateway server where the authentication for the initial login to the TS gateway server is handled by a RADIUS server (as determined by NPS), then the user uses standard Windows Auth to log in to their destination machine. I have the server successfully passing the auth to the RADIUS server, but only after it does a Windows auth first. The credentials will not match between the Windows Server and the RADIUS server, so the RADIUS auth always fails, and the TS Gateway server will not forward the request to the RADIUS server unless the Windows Auth succeeds. Does anyone know how to disable the Windows Auth requirement on a TS Gateway server? This is a pretty vanilla SBS 2008 box.

    Read the article

  • Trouble configuring firewall for FTP on Windows Server 2008 R2

    - by x3ro
    Ok, I'm having the exact same problem as in this question http://serverfault.com/questions/59635/outbound-ftp-on-server-2008-r2-stalls but the accepted answer didn't help me much... I followed the third step of this http://learn.iis.net/page.aspx/309/configuring-ftp-firewall-settings/ guide in order to configure my firewall for FTP, and I am able to authenticate, however, the data channel doesn't seem to be passing through the firewall. If I disable the firewall, everything works fine. Hope someone can help me, as this is really starting to annoy me. Best regards, x3ro

    Read the article

  • Justifying a memory upgrade

    - by AngryHacker
    My employer has over a thousand servers (running SQL Server 2005 x64 and a couple of other apps) all across the country. And in my opinion they are all massively underpowered for what they need to do. Specifically, I feel that the servers simply do not have enough RAM for the amount of volume the machines are asked to do. All the servers currently have 6GB of RAM. The users are pretty much always complaining about performance (mostly because, immo, the server dips into the paging file quite often). I finally convinced the powers that be to at least try out a memory upgrade on one box and see the results. However, they want before and after metrics, so that they can see that the expense will be justified. My question is what metrics should I collect to see whether the performance truly improves on the box? I am a dev, so I am not sure how and what to collect (i have a passing knowledge of Perfmon).

    Read the article

  • How to create a Linux user without a password but being able to set it?

    - by Leonid Shevtsov
    I have a username and an SSH key for a (hypothetical) guy and I need to give him admin access to a Linux (Ubuntu) server. I want him to be able to log in via SSH and then set his password by himself over a secure connection, instead of passing the password around. I know how to make the password expire and force him to reset it on first login. But this doesn't work unless he has some password already, which I then have to tell him. I thought about making the password blank - SSH wouldn't allow login, but then anyone can su into the user. My question is, is there some best practice to creating accounts in such a way? Or setting a default password is unavoidable?

    Read the article

  • How would I setup reverse DNS for 2 email servers?

    - by Solignis
    I have an interesting DNS question (well interesting to me atleast). I just installed an hmail server in our remote office to act as an MX backup in the event our exchange server goes down. The 2 host names are mail.campbellsurvey.com mail2.campbellsurvey.com mail points to the address 98.XXX.91.XXX mail2 points to the address 70.XXX.190.XXX How would I setup a PTR record on the ISP end to reflect both hostnames? Does the PTR have to point to EXACTLY mail.campbellsurvey.com or can it point to just campbellsurvey.com? because right now anything passing through the primary static address in our pool (the one used for standard internet) is identified as mail.campbellsurvey.com. My only idea to fix this was to move the mail server to the next available address and give it only it the name mail.campbellsurvey.com but I wanted to see if there was another way. Thanks in advance.

    Read the article

  • Re-Route Mail to a port other than 25

    - by Ken
    Is there a way to route mail to another port? I have an email account attached to my laptop that I'd like to be able to send and receive mail from. Due to mobility, I'll be passing through various networks that will probably block this port. My dynamic DNS provider allows me to utilize web-forwards for MX domains; is this possible? where I can web forward to a domain:port which is managed by my DNS provider when I traverse between networks. If not, is there a way? Of course i could use web-mail or relay-forwarding from my home server, but that's not geeky enough.

    Read the article

  • Interpreting regular expressions using find in Linux confusion

    - by PeanutsMonkey
    I am attempting to use the find command and came across an article at http://www.linux.ie/newusers/beginners-linux-guide/find.php which states The wildcard character is escaped with a slash so BASH sends a literal asterisk to the find utility as an argument instead of performing filename expansion and passing any number of files in as arguments. for the command find . -name up\*. Being new to the world of Linux I don't quite understand how the use of a backslash which is meant to escape the meta character * is interpreted and returns results as though as it is being passed to find. Does it mean if I use the -name option I have to use a backslash to pass a wildcard and if I don't use -name I don't have to use a backslash?

    Read the article

< Previous Page | 129 130 131 132 133 134 135 136 137 138 139 140  | Next Page >