Given that django-nonrel has got JOINs working, does this mean we have M2M fields workable with Django now in GAE?
What other current restrictions does Django have in GAE?
I'm using an ASP.net treeview on a page with a custom XmlDataSource. When the user clicks on a node of the tree, a detailsview pops up and edits a bunch of things about the underlying object. All this works properly, and the underlying object gets updated in my background object-management classes. Yay! However, my treeview just isn't updating the display. Either immediately (which i would like it to), or on full page re-load (which is the minimal useful level i need it to be at). Am i subclassing XmlDataSource poorly? I really don't know. Can anyone point me in a good direction? Thanks!
The markup looks about like this (chaff removed):
<data:DefinitionDataSource runat="server" ID="DefinitionTreeSource" RootDefinitionID="uri:1"></data:DefinitionDataSource>
<asp:TreeView ID="TreeView" runat="server" DataSourceID="DefinitionTreeSource">
<DataBindings>
<asp:TreeNodeBinding DataMember="definition" TextField="name" ValueField="id" />
</DataBindings>
</asp:TreeView>
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
DataKeyNames="Id" DataSourceID="DefinitionSource" DefaultMode="Edit">
<Fields>
<asp:BoundField DataField="Name" HeaderText="Name" HeaderStyle-Wrap="false" SortExpression="Name" />
<asp:CommandField ShowCancelButton="False" ShowInsertButton="True" ShowEditButton="True"
ButtonType="Button" />
</Fields>
</asp:DetailsView>
And the DefinitionTreeSource code looks like this:
public class DefinitionDataSource : XmlDataSource
{
public string RootDefinitionID
{
get
{
if (ViewState["RootDefinitionID"] != null)
return ViewState["RootDefinitionID"] as String;
return null;
}
set
{
if (!Object.Equals(ViewState["RootDefinitionID"], value))
{
ViewState["RootDefinitionID"] = value;
DataBind();
}
}
}
public DefinitionDataSource() { }
public override void DataBind()
{
base.DataBind();
setData();
}
private void setData()
{
String defXML = "<?xml version=\"1.0\" ?>";
Test.Management.TestManager.Definition root =
Test.Management.TestManager.Definition.GetDefinitionById(RootDefinitionID);
if (root != null)
this.Data = defXML + root.ToXMLString();
else
this.Data = defXML + "<definition id=\"null\" name=\"Set Root Node\" />";
}
}
}
I'm looking to contract with a freelance Apple Mac developer to write a custom application for me. Can anyone point me in the direction of any good Apple Mac developers in the UK or Internationally or websites where I can upload my project requirements and obtain quotes?
Thanks in advance!
Hello,
i've implemented this custom PHP Session Class for storing sessions into a MySQL database:
class Session
{
private $_session;
public $maxTime;
private $database;
public function __construct(mysqli $database)
{
$this->database=$database;
$this->maxTime['access'] = time();
$this->maxTime['gc'] = get_cfg_var('session.gc_maxlifetime');
session_set_save_handler(array($this,'_open'),
array($this,'_close'),
array($this,'_read'),
array($this,'_write'),
array($this,'_destroy'),
array($this,'_clean')
);
register_shutdown_function('session_write_close');
session_start();//SESSION START
}
public function _open()
{
return true;
}
public function _close()
{
$this->_clean($this->maxTime['gc']);
}
public function _read($id)
{
$getData= $this->database->prepare("SELECT data FROM
Sessions AS Session
WHERE Session.id = ?");
$getData->bind_param('s',$id);
$getData->execute();
$allData= $getData->fetch();
$totalData = count($allData);
$hasData=(bool) $totalData >=1;
return $hasData ? $allData['data'] : '';
}
public function _write($id, $data)
{
$getData = $this->database->prepare("REPLACE INTO
Sessions
VALUES (?, ?, ?)");
$getData->bind_param('sss', $id, $this->maxTime['access'], $data);
return $getData->execute();
}
public function _destroy($id)
{
$getData=$this->database->prepare("DELETE FROM
Sessions
WHERE id = ?");
$getData->bind_param('S', $id);
return $getData->execute();
}
public function _clean($max)
{
$old=($this->maxTime['access'] - $max);
$getData = $this->database->prepare("DELETE FROM Sessions WHERE access < ?");
$getData->bind_param('s', $old);
return $getData->execute();
}
}
It works well but i don't really know how to properly access the $_SESSION array:
For example:
$db=new DBClass();//This is a custom database class
$session=new Session($db->getConnection());
if (isset($_SESSION['user']))
{
echo($_SESSION['user']);//THIS IS NEVER EXECUTED!
}
else
{
$_SESSION['user']="test";
Echo("Session created!");
}
At every page refresh it seems that $_SESSION['user'] is somehow "resetted", what methods can i apply to prevent such behaviour?
While creating a (custom) content in Drupal, I have three vocabularies. But these make my create content page very heavy. I want to collapse the Vocubalary fieldset by default and want it to expand only if user chooses to.
I want to add a new row to a datagridview such that when a user clicks on new button , a new is is generated with few textboxes and combo boxes and after filling up all the details he save the info by clicking on save button.
EDIT
I want to do it like it is seen in gridview(Template Fields) in asp.net
I am looking for same kind of functionality.
We keep most of our logs in a dedicated database table. We have written custom appenders for log4j and log4net, have a fixed log schema with lots of handy columns, and are quite happy with it.
Is that the "best practice" (for sites smaller in scale than Facebook, where a simple DB table just won't scale)?
Hello All!
I have a query with grouping on one of the fields in Crystal Reports. My question is - is there a way to pass that value into a subreport?
I.e. if there are three values in that field, there will be three groups in report. I want a subreport in every group to have that value as its parameter.
Is that possible to accomplish with CR 2008?
INPUT:
fofo jojo tst
fojo jofo sts
rhr hrhh dodo
jojo hoho jojo
zozo roro vovo
OUTPUT:
fofo jojo tst
fojo jofo sts
rhr hrhh dodo
jojo hoho jojo
zozo roro popo
NOTE: Please help me, I need to shift all rows, which have first column empty. Every fields are tab delimited. In this file some rows start from first column, but some rows start from second or third column.
Thank you
My application (developed using C#.net) is open now i uninstall, InstallShield gives message stating the application is already open and whether really want to close the application. Selection 'Ignore' continues uninstall. Some files and the exe of the application are not closed. How to close them by installshield on uninstall. Or there are some properties I have to set. I know adding a custom action at uninstall i can kill the process, but shouldn't installshield do it?
I'm writing a custom TreeView from ScrollableControl. I decided to show tooltips when mouse is hover nodes with text too long to display.
I find out when tooltips are shown, user would not be able to click the node to select it, because (I think) he's clicking the tooltip window, not my control.
Is there any easy solutions? As I can see System.Windows.Forms.TreeView don't have this problem. Thanks!
I have a set field in my db that is longtext. I have used prices in this field and cannot change the field type to integer. In my query however I need to sort by these fields and assume I should treat them as an integer. is there another way to query these results to sort by price as an integer and not longtext without having to change the field type?
at the moment 3900000 is smaller than 4300 in my result set.
We're looking to add credit card payments to our system (and it needs to be fairly custom, handling variable "per use" charges each month). We would like the integration to be simple and secure (i.e. no storing of credit card data on our system).
What, in your opinion, is the best credit card processing provider to offer this kind of security and flexibility. List only one provider per answer to let the voting system do it's thing.
Hi,
i have an custom widget in dojo. My Problem is to check some kind of access rules wich are passed to the widget.
if check the rules after the widget is fully loaded everything works fine. But i have to remove some text and buttons before it is displayed.
I've tryted the startup, and postcreate hook (-: is there something like "aftercreate" ?
I want to get a dump of the PermGen to see why it is filling. Is there a way to analyze this? I already know about the common suspects like log4j, tomcat webapp reloading etc, but I have some custom proxy generation code in my application, too, and just want to look under the hood.
Is this possible somehow?
I'm currently developing an Custom Application using the IP.Board framework, which is in PHP, which by default, creates a IPSMember object for the logged-in user. However, I'm developing an additional class, basically
class SpecialUser extends IPSMember
Is there a way to get the parent object, which is IPSMember to change to SpecialUser?
Hi lads,
After obtaining the urls for various blogspots, tumblr and wordpress pages, I faced some problems processing the html pages. The thing is, i wish to distinguish between the content,title and date for each blog post. I might be able to get the date through regex, but there are so many custom scripts people are using now that the html classes and structure is so different.
Does anyone has a solution that may help?
During navigation of Method class I came across the function isBridge(), javadoc of which says, that its true only if java spec declares the method as true.
Please help me understand what this is used for ? Can a custom class declare its method as a bridge if required ?
I'm new to cocoa and iphone programming and I want to implement an animation in UIButton. For example, I create a custom UIButton with a square image. Then when I press that UIButton, the square image will flip. Note that the square image is the image of the UIButton.
[UIButton setImage:[UIImage imageNamed:@"square.png"]];
Is there a way to access ruby variables in sass or do i have to make a custom function for it?
What im trying to do is to generate a stylesheet for each user so in the controller, i do something like:
def show
respond_to do |format|
format.css{render :partial => "styles"}
end
end
then in the view name _styles.haml i do this:
:sass
#header
:background url(user.banner.url)
is this possible at all?
I want assign certain values to some of the cck fields through Java script while the form is loaded. I think it is best to use the body/ form onload attribute. But how do i define that in drupal? Could someone help me with this or a better solution?
I'm trying to learn Silverlight here, creating a custom control template, however VS2010 refuses to recognize the ControlTemplate type, even though I have referenced the System.Windows assembly (which is by default when basing the project on the standard Silverlight Application template). I'm trying to recreate this seen on another SO stack.
I have one table, which has three fields and data.
Name , Top , Total
cat , 1 , 10
dog , 2 , 7
cat , 3 , 20
horse , 4 , 4
cat , 5 , 10
dog , 6 , 9
I want to select the record which has highest value of Total for each Name, so my result should be like this:
Name , Top , Total
cat , 3 , 20
horse , 4 , 4
Dog , 6 , 9
I tried group by name order by total, but it give top most record of group by result. Can anyone guide me, please?
there!
I have this question, hope you guys can help me out.
So i have this table with two fields:
type and authorization
in type i have 2 different values: Raid and Hold
in authorization i have 2 different values: Accepted or Denied
I need to make a view that returns values like this:
TYPE:RAID ACCEPTED:5 DENIED:7
Basically i need to know how many of the values in TYPE are Raid, and then how many of
them are Accepted and Denied.
Thank you in advance!!