» Home » assigning » Page 1
Assigning a “const char*” to std::string is allowed, but assigning to std::wstring doesn't compile. Why?
Category : Programming Languages

I assumed that std::wstring and std::string both provide more or less the same interface.


So I tried to enable unicode capabilities for our application


# ifdef APP_USE_UNICODE
typedef std::wstring AppStringType;
# else
typedef std::string AppStringType;
# endif

However that gives me a lot of compile errors when -DAPP_U


View Replies


Cocoa: Why assigning a frame to a frame doesn´t work but assigning bounds does
Category : Programming Languages

I´ve been reading the different questions ( Cocoa: What's the Difference between the frame and the bounds?, iOS Programming: Frame, Bounds and Center) related to the difference between frame and bounds but still I don´t understand why when something like this:


UILabel *newMark = [[UILabel alloc] initWithFrame:self.frame];
newMark.text = @"|A3";
[self addSubview:ne

View Replies


assigning function to variables and assigning variables to functions(?) in Javascript
Category : Javascript

I'm learning javascript by dissecting a few scripts written by other people that I have used before (stackoverflow is essential to this!). This bit of code (and I cut a lot from the middles to make the code easier to read, and all comments are mine) comes from fullCalendar.js, a jquery plugin.


I'm not sure what the author is doing here:


function EventManager(options,

View Replies


Assigning int x = 'abc' ;
Category : Programming Languages

I was doing a code review and I saw assignment of single quoted strings to enum values:


enum
{
Option_1 = 'a',
Option_2 = 'b'
} ;

While this makes for slightly more readable code (though the enum's meaning should be pretty much in the name of the num), it looks silly to me.


I didn't know you COULD do that and after studying it, I can see that


View Replies

TAGS : Assigning

FOR /F not assigning the last value
Category : Web Design

Today is 11/01/2013


I have the following .bat file:


@ECHO OFF
:: Take the output from DATE and assign it to variable today
FOR /F "tokens=* delims=/" %%i IN ('DATE /T') do SET /A today=%%i
ECHO %today%
PAUSE

and it outputs:
11


If I am telling the FOR to iterate over the 3 tokens and then output the resulting va


View Replies


Assigning a value to variable
Category : Programming Languages

If I wanted to convert binary into decimal, is there way I could do this:


Assuming:


newState[i-2] = 0,
newState[i-1] = 0,
newState[i] = 1
binary = newState[i-2], newState[i-1], newState[i]; // but if I did this, bin = 0, not 001.

I want to do this so I can pass binary into another method to convert into decimal.


View Replies


assigning a value to e.value index
Category : Development Tools & Services

I am reading in data from a google form, I am using onFormsubmit and have the following assignment


var MEDS = e.values[2];


This is not a "required" question on google forms so it can be left blank.


Problem is when I try to access the MED contents via line.attendText, (this is when the user has submitted the data and the script is running). I get the fo


View Replies


Assigning a value to a gridview
Category : Programming Languages

I am attempting to display data from my database into a gridview
How can I assign the value to the gridview?


while (rdr.Read())
{
///Console.WriteLine(rdr[0]);
gridview1.Text = rdr[0];
}

View Replies


Assigning char to int
Category : Programming Languages

I'm making a poker game, and i have the shuffle function (based in other answer here).
Now my problem is, how can i assign the name of the card to each number of the array, for example i want cartas[3] = "J spades".


I thinked in a bidimensional array, but they can't have two different types of data, i think. I hope someone can help me.


/* This is the array, cart

View Replies

TAGS : Assigning char

Assigning color to div in CSS
Category : Web Design

I am using jquery.reveals.js plugin.
the following colors specified in css


#fff
#000

are being interpreted differently on different browsers.

Getting the following output on firefox,chrome,and IE 9 ( and above)


however I am getting some unexpected result with IE8


I guess above problem is because the colo


View Replies

TAGS : Assigning color

Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .