.
Session("UserName") = "Sally"
Dim userName As String = Session("UserName")
Do i need to convert the session variable to string if i wanna follow "good coding practices"?
Ex:
Session("UserName") = "Sally"
Dim userName As String = Convert.ToString(Session("UserName"))
...
Hello,
I just can't see c++ class member value while I moved mouse on it. For locally variables it works fine, and off course I can see class member values in Debugger (separated window) but it's not so comfortable.
This problem wasn't in xcode 3.0 version... (only >3.0)
P.S. I am sure that I am on Debug not Release project.
...
This seems like the most basic thing in the world, but I don't know PHP.
I am trying to include a file on my page, and the directory of that file is specified inside of a variable.
<?php
$pageGroup = 'news';
$directory = 'http://localhost:8888/includes/'.$pageGroup.'/rightCol.html';
include($directory);
?>
When I echo the...
i hava a class that hold a list for each request
but each request the list is empty again
what can i do to make it live
here is my class , i want the list to hold values from previews requests
(yes each request i'm settings a value there )
class Sessions{
private static $list = array();
....
.....
}
...
I have a ajax image upload script which i found here
http://www.fengcool.com/2009/06/ajax-form-upload-local-image-file-without-refresh/
The problem i'm having is removing the image from the server.
I read in the comments that I need to do an ajax call to call a php file to unlink the image.
The php file isn't a problem and i think...
Hi all. Just getting started with pthreads & condition variables. I have an object that has a couple of mutexes and a condition variable as members.
I initialize them all in the constructor. After using the condition variable to signal waiting threads, do I need to reset it somehow if the object's state changes and the condition is n...
Say I have some context where variables are set and a λ-function is called which uses them directly:
function outerContext(){
...
var data = ...; // some data the script uses
...
someObject.method = function(){
data; // the variable is used here
};
...
}
I know that the dynamically created funct...
In my Rails application I have a Forum with many Topics. From the Forum's, "show" page I have a list of Topics with a link to create a new Topic. My goal is to make sure that when creating the new Topic I have the ID of the Forum when I get to the Topic's "create" method. Right now I'm thinking I'd have to create a hidden field on the To...
I'm wanting to detect all objects(classes) defined in a php file (example: flavors.php). The number of objects will be defined dynamically, so I need to process the available objects with a function at runtime until the objects are exhausted. After the objects are exhausted the program stops.
I have full control over the code, so if the...
I have got 2 javascript variables:
var list1 = "john doe|bill williams|poll bregg|michael jordan";
var list2 = "analytic|trader|doctor|athlete";
We have to take in mind, that relations between this two variables are that names and professions are placed in the same order, eg. poll bregg is a doctor, but john doe is an analytic.
Than ...
Hi,
I'd like to output some data to a file. For example assume I have two vectors of doubles:
vector<double> data1(10);
vector<double> data2(10);
is there an easy way to output this to a file so that the first row contains the headings 'data1' and 'data2' followed by the actual contents. The function which
outputs the data will b...
class AlphaBetaAgent(MultiAgentSearchAgent):
def action(self,gamestate):
self.alpha= -9999
self.beta = 9999
def abc(gamestate, depth, alpha, beta):
def bvc(gamestate, depth, alpha, beta):
return abc(gamestate, 0, alpha, beta)
I am calling the getAction function which itself calling the abc funct and abc funct...
string[] pullspec = File.ReadAllLines(@"C:\fixedlist.txt");
foreach (string ps in pullspec)
{
string pslower = ps.ToLower();
string[] pslowersplit = pslower.Split('|');
var keywords = File.ReadAllLines(@"C:\crawl\keywords.txt");
if (pslower.Contains("|"))
{
...
I have a user defined function.
In that function I declared a variable of type datetime.
I am assigning the result of a query into this variable. And I am returning this assigned value. It looks like
delimiter$$
drop function if exists getQEDate$$
create function getQEDate() returns datetime
begin
declare qedate datetime;
select ...
Can anyone please tell me what is wrong with this SQL query.
"select USERNAME, DATECREATED, CREDTYPE, USAGETYPE, OPERATIONID, TXNID, CALLERID from arwfissuanceauditlog where OPERATIONID in (2104,2107) and datecreated >= 'to_date('2010/06/21', 'yyyy/MM/dd HH24:MI:SS')' and datecreated < 'to_date('2010/08/03', 'yyyy/MM/dd HH24:MI:SS')'"
...
Hi,
I am able to pass a variable forward from view controller to view controller by pushing its view controller onto the navigation stack. An example of how I do it would be this:
MyViewController *controller = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
controller.myString = stringToPass;
[self.navigatio...
I'm attempting to write a simple query where I declare some variables and then use them in a select statement in Oracle. I've been able to do this before in SQL Server with the following:
DECLARE @date1 DATETIME
SET @date1 = '03-AUG-2010'
SELECT U.VisualID
FROM Usage u WITH(NOLOCK)
WHERE U.UseTime > @Date1
From the searching I've ...
warning C4244: '=' : conversion from 'unsigned int' to 'float', possible loss of data
Shouldn't a float be able to handle any value from an int?
unsigned int: 0 to 4,294,967,295
float 3.4E +/- 38 (7 digits)
Wiki:
The advantage of floating-point representation over fixed-point (and
integer) representation is that it ...
Hello!
im processing link click events with mootools.
in my html i have a links with the id of this pattern: toggle_NUMBER e.g. toggle_1
now i get the id with this peace of code
var id = $(this.get('id').replace(togglePrefix,emptyPrefix));
my problem starts now:
i remove the prefix this way
var togglePrefix = 'toggle_', boxP...
Hi,
I've noticed some strange code on a project I am working on - its a SLSB EJB3, and it uses a private instance variable to maintain a cache of data (it even calls it dataCache or something), with a getter/setter. For EJB2 and bellow, this was a typical EJB antipattern - SLSBs are not meant to retain state in between invocations, ther...