My extension works on a application, which requires user login. Once the user has logged in, I need to read the cookies and use them in my xmlhttprequests.
So initially i need to check if the cookie is set, if not, I direct the user to the login page. Once logged in, I need to read the cookies and send it as part of mt further requests.
Can…
Hi... a bit of an unusual one.. but I was wondering if anyone knew how I could declare a reserved word as a variable. I have the following code, but it does not like my use of the long variable name. I know I could rename it, but for instrest sakes I would like to know if this is at all possible.
private string lat;
private string long;
…
Is it possible using Reflection or some other method to obtain a reference to a specific class instance from the name of that class instance?
For example the framework for the applications i develop heavily uses public class instances such as:
Public bMyreference as MyReference = new MyReference
Then throughout the application…
Hi, i have a class of this kind
Class Car {
private $color;
public function __construct($color){
$this->color=$color;
}
public function get_color(){
return $this->$color;
}
}
Then i create some instances of it:
$blue_car = new car('blue');
$green_car = new car('green');
etc.
Now i need to call method get_color()…
how can I get the day name (such as : Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday) in datetime in python?...
here is my code in my handlers.py
from django.utils.xmlutils import SimplerXMLGenerator
from piston.handler import BaseHandler
from booking.models import *
from django.db.models…
I created classes:
public class Country
{
public long CountryId {get;set;}
public string CountryName {get;set;}
}
public class Profile
{
public long ProfileId {get;set;}
public string ProfileName {get;set;}
public Country Country {get;set;}
}
and configuration for Profile:
public class ProfileConfiguration :…
Hi all
I am triing to bind the data to a listbox from sql server then got the error "Value cannot be null.Parameter name: key"
sqlCommand = "SELECT [Country] FROM [tbl_LookupCountry] where [Country] IS NOT NULL";
SqlConnection sqlConCountry = new SqlConnection(connectString);
SqlCommand sqlCommCountry = new SqlCommand();…
Using Zend Framework, I've created a Model to insert a record into a database. My question is, after $this->insert($data) how can I switch the active table so that I can insert a record into another table?
Here's my code so far:
class Model_DbTable_Foo extends Zend_Db_Table_Abstract
{
protected $_name = 'foo';
…
If I have three tabs:
<div id="tabs">
<ul>
<li><a href="#sample-tab-1"><span>One</span></a></li>
<li><a href="#sample-tab-2"><span>Two</span></a></li>
<li><a…
Hi there,
I have had only very little experience using the address book in the iPhone SDK.
Does anyone have a code snippet or knows the code to get a persons name and number Eg 'Fred Smith - 027 292 2112". I haven't had much luck with the stuff I've tried.
I want to…
i've created a select button with 3 option
<%= f.label :prioridad %><br/>
<%= f.select :prioridad, options_for_select([['Alta', 1], ['Medio', 2], ['Baja', 3]]) %>
The value gets inserted to the DataBase but when i display it i see the number op the…
I am trying to map a drive using a batch file.
I have tried:
net use m: \Server01\myfolder /USER:mynetwork\Administrator "Mypassword" /persistent:yes
It works fine. The problem comes when I try to map a folder with spaces on its name:
net use m: \Server01\my folder…
I am really fond of python's capability to do things like this:
if __name__ == '__main__':
#setup testing code here
#or setup a call a function with parameters and human format the output
#etc...
This is nice because I can treat a Python script file as…
Hi All,
I am trying to figure out whey I get an error: expected class-name before { token
Here is the relative source to the error:
#pragma once
#ifndef H_FXACTION
#define H_FXACTION
#include "CP_M_RefCounted.h"
#include "FxTypes.h"
#include "string"
#include…
Is there any way to (programatically) find out what your app's name is? I'm specifically talking about the android:label property from the application tag in the manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest…
I had multiple div with class name blueflip i want to toggle this class's div content when the div link_button is clicked.
My Code :
$(document).ready(function(){
$('.blueflip').hide();
$('.link_button').click(function() {
…
Hi guys, I recently confronted with a weird yet interesting question. The questions is as follows:
Need to write a program which can give the gender as output based on the name.
Example: INPUT -- John
Michael
…
There's a common LDAP attribute called userCertificate;binary. It actually has a semi-colon in the attribute name. In ruby, I turn an LDAP entry into a OpenStruct object called 'struct'.
struct.class
= OpenStruct
But of course…
I am defining naming conventions for a simple plugin framework. For example:
index.php - the main plugin file
info.php - returns an array with plugin information
install.php - self-explanatory
can you think of an elegant,…
Hi, i mostly do CSS and php so i'm kind'a lost here, so no idea if this is possible the way i want it anyway, this is it:
I have this code
<html:textarea rows="10" cols="70" property="thankYouMessage" />
And i want…
UPDATE:
My model going into the save method is PartialViewModel, which in the save method, is pushed into the index's ContactViewModel and sent back. This wasn't clear.
I am playing around with MVC3, and have a contact…
Currently I am using Ivy for dependency management. And quite often I come across problem of getting identical jar files with different name due to transitive dependency.
Example:
<dependency>
…
I'm sorting array:
myArray.sort(comparators.some_comparator);
and I have several comparator to choose from:
comparators = {
asc_firstname_comparator : function(o1, o2){
...
}
…
Hello!
I'm developing a TypeTranslator class which has a method Type TranslateType(Type type).
This method gets a type of an interface and if there's a class of interface name without leading I…