I have an image (embedded resource) that i can get access to and form an Image object from. I actually can get the Image object or the Stream of bits the represent the image. However I want to sue that image programaticly to be a background image.
So how do I set the ImageSource on the ImageBrush to an AcutalImage (PNG)?
i have the variable $a = 5; i want to show it in binary form, with length, equal 8, with writing * at white spaces, just like this, like this * * * * *101
here the script
$number = 5;
printf("%*8b", $number);
it doesn't work with *, but if "0"-s it works
printf("%08b", $number);
//returns 00000101
why it doesn't work with *?
Does the calendar application in Android maintain a cache of its database?
Whenever I edit and mark some events via the calendar app, it is stored in the database but if I edit the calendar.db from some outside source the changes made are not reflected in the calendar app. So my question is:
Does the calendar app maintain a cache or some other form of database?
If yes then where and how?
Hi, I have a dynamic FormPanel where I need to set the label width after I have loaded in all the fields. I have tried using this.labelWidth = 200 before calling this.doLayout but it's ignoring the new value.
Can someone tell me where I can set this and redraw the form, thanks.
I'm hosting a WCF service inside a winform app. I want to monitor when somebody calls the service to a textbox on the form like:
2:23 Method X called params(x, y)
2:24 Method Y called params(z)
I am using a service host for WCF and inside my concrete class I have created some delegates and events. I just cant seem to wire the events up because my object is of type ServiceHost not my object.
Any help
Hi,
I use rich:inputNumberSpinner tag.
The problem is :
I set cursor focus to inside of rich:inputNumberSpinner field, then i hit the enter button from my keyboard, that time page will be automatically refresh.
But i don't need page refresh when i hit the enter button from my keyboard.
The code :
spinnerTagTest.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Spinner Tag Test</title>
</head>
<body>
<h:form id="SpinnerForm">
<rich:panel id="SpinnerPanel">
<h:outputText value="Input Spinner Tag : "/>
<rich:inputNumberSpinner id="spinnerField" value="" maxValue="23"
inputSize="2"/>
</rich:panel>
</h:form>
</body>
I also use rich:hotKey for that inputNumberSpinner field. But Page refreshed.
<rich:hotKey key="return"
selector="#spinnerField"
handler="event.stopPropagation();event.preventDefault();
return false;"/>
And i check anotherway using javasccript, but page refreshed.
The specific tag and javascript is :
<rich:inputNumberSpinner id="spinnerField" value="" maxValue="23" inputSize="2"
oninputkeypress="return stopPageRefresh();"/>
<script type="text/javascript">
function stopPageRefresh()
{
return false;
}
</script>
Here i use one alert message inside of stopPageRefresh().
But i hit enter button, first page refreshing and then alert message displayed.
Help me about this.
Thanks in advance.
With Ruby on Rails, is there a way for me to dump my production database into a form that the test part of Rails can access?
I'm thinking either a way to turn the production database into fixtures, or else a way to migrate data from the production database into the test database that will not get routinely cleared out by Rails.
I'd like to use this data for a variety of tests, but foremost in my mind is using real data with the performance tests, so that I can get a realistic understanding of load times.
Hello ,
I am doing django admin internationalization .I am able to do it perfectly.But my concern is that in the address bar it is showing the app label in tranlated form which is not in us acii .Is this the problem with django or i m doing something wrong.
I have a page that a user selects what he wants to download, the submit button posts the form to
public FileStreamResult GetFiles(FileSelectionModel model)
{
//zips files into one zip
return File();
}
However, what if the model wasn't in a valid state? How do I check it? It wouldn't let me return View() or return RedirectToAction() here
thanks
I'm using VS 2008, I have a very simple page that has a bunch of uniquely named controls. When I try to view it in design mode I get the following error:
Error Rendering Control - Label12
An unhanded exception has occurred.
Multiple controls with the same ID 'Label1' were found. FindControl requires that controls have unique IDs
I've checked the HTML and the designer file and I can only see one control called Label1. What might be causing this?
Also, here is the aspx markup I'm having trouble with?
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CoachingAppearanceReport.aspx.vb"
Inherits="AcademyPro.CoachingAppearanceReport" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="appearanceDetail" class="Left CriteriaContainer">
<asp:Label ID="Label1" runat="server" Text="Appearance Type" AssociatedControlID="ddlAppearanceType" />
<asp:DropDownList ID="ddlAppearanceType" runat="server" CssClass="AppType" OnDataBound="ddlAppearanceType_DataBound"
DataSourceID="odsAppearanceType" DataTextField="AppearanceType" DataValueField="AppearanceTypeCode">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="rfvAppearanceType" runat="server"
ControlToValidate="ddlAppearanceType" InitialValue="" Text="*"
ErrorMessage="The appearance type must be selected" />
<asp:Label ID="lblAppearanceType" runat="server" />
<br />
<div class="SubSettings">
<asp:Label ID="Label12" runat="server" Text="Subbed for" AssociatedControlID="ddlSubbedFor" />
<asp:DropDownList ID="ddlSubbedFor" runat="server" OnDataBound="ddlSubbedFor_DataBound"
DataSourceID="odsPlayersInAgeGroup" DataTextField="PlayerName" DataValueField="PlayerID">
</asp:DropDownList>
<asp:Label ID="lblSubbedFor" runat="server" />
<br />
<asp:Label ID="Label13" runat="server" Text="Mins" AssociatedControlID="txtSubMins" />
<asp:TextBox ID="txtSubMins" runat="server" MaxLength="3" CssClass="TinyWidth" />
<asp:Label ID="lblSubMins" runat="server" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
As a newbie of Zend framework, I have a few version-dependent questions on the framework.
Does Zend Framework has a fixed file structure (meaning a fixed form of file layout)?
If so, does this file structure vary according to framework versions?
If so, is there any reference to learn all the differences in file structure?
Hey,
I'm trying to dynamically add a validation rule to some dynamic controls:
$("input[id*=Hours]").rules("add", "required");
However this line gives me the following error:
$.data(element.form, "validator") is null
Defining rules the static way with the validate function works fine. What am I doing wrong?
Thanks,
Justin
I'm developing a form generator, and wondering if it would be bad mojo to store JSON in an SQL Server database?
I want to keep my database & tables simple, so I was going to have
`pKey, formTitle, formJSON`
on a table, and then store
{["firstName":{"required":"true","type":"text"},"lastName":{"required":"true","type":"text"}}
in formJSON. would this slow down the DB server too much to set live?
Any input is appreciated.
Hello All:
I have one debugger visualizer for seeing list of class object in the form of data table. But the limitation for the code is that the class should be serializable i.e. should be marked as [Serializable] and if the class is not marked Serializable then the debugger crashes. So, can anybody tell me how to make a class Serializable at run time if the class is not marked Serializable.
Thanks
Ashwani
User writes a series of tags (, separated) and posts the form.
I build an array containing the tags and delete dupes with array_unique() php function.
I'm thinking of doing:
go through the array with foreach($newarray as $item) { ... }
check each $item for existence in the tags mySQL table
if item does not exists, insert into tags table
Is there a FASTER or MORE OPTIMUM way for doing this?
I'm developing a form generator, and wondering if it would be bad mojo to store JSON in an SQL database?
I want to keep my database & tables simple, so I was going to have
`pKey, formTitle, formJSON`
on a table, and then store
{["firstName":{"required":"true","type":"text"},"lastName":{"required":"true","type":"text"}}
in formJSON. would this slow down the DB server too much to set live?
Any input is appreciated.
Dear all
We changed the server of our ASP website and in new setting browsing the website returns this error:
msxml3.dll error '80072ee2'
The operation timed out
/error404.asp, line 41
This is lines that I think returns error:
Set XML=Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
XML.SetOption 2,13056
XML.SetTimeouts 90000, 90000, 90000, 90000
XML.Open "POST", website &"/catalog/page.asp?id="& R("CTLMtree_id") &"&rnd="& rnd(), False
XML.Send(Request.Form)
Response.Write XML.ResponseTExt
Set XML=Nothing
Hi all,
is there any (opensource) asp.net implementation (in the form of an httphandler or other) for the following paper: http://www.cse.msu.edu/~alexliu/publications/Cookie/cookie.pdf
greetings,
Tim
Hi,
I am using GWT with GWT-EXT running in glassfish. I create 2 combo boxes as follows:
import com.extjs.gxt.ui.client.widget.form.ComboBox;
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox;
this.contentPanel = new ContentPanel();
this.contentPanel.setFrame(true);
this.contentPanel.setSize((int)(Window.getClientWidth()*0.95), 600);
this.contentPanel.setLayout(new FitLayout());
initWidget(this.contentPanel);
SimpleComboBox<String> combo = new SimpleComboBox<String>();
combo.setEmptyText("Select a topic...");
combo.add("String1");
combo.add("String2");
this.contentPanel.add(combo);
ComboBox combo1 = new ComboBox();
combo1.setEmptyText("Select a topic...");
ListStore topics = new ListStore();
topics.add("String3");
topics.add("String4");
combo.setStore(topics);
this.contentPanel.add(combo1);
When these are loaded in the browser (IE 8.0, Firefox 3.6.6 or Chrome 10.0) the combo boxes are shown but don't have the pull down arrow. They look like a text field with the "Select a topic..." text. When you select the text it disappears and if you type a character and then delete it the options are shown (i.e. pull down is invoked) however, there is still no pull down arrow.
Does anyone know what the issue might be? Or how I can investigate further? Is it possible to see the actual HTML the browser is getting, when I View Page Source I only get the landing page HTML.
As an additional I also have a import com.google.gwt.user.client.ui.Grid that does not render correctly. It is in table format but has no grid lines or header bar etc.
Cheers,
James
Hi I have a visual studio project which includes postbuildevents in the following form:
MyTool.exe $(ProjectDir)somesrcfile.txt $(TargetDir)sometargetfile.bin
Now I want to add some logic saying that these steps are taking place only if the files have changed. In peudocode:
if (somesrcfile.txt is newer than sometargetfile.bin)
{
MyTool.exe $(ProjectDir)somesrcfile.txt $(TargetDir)sometargetfile.bin
}
Can I do this with MsBuild?
Is there a way to specify the tab order of the elements within a jQuery Dialog which itself contains an Accordion? The dialog also specifies one button in the buttons options. For accessibility, we need to be able to tab through the accordion panes, the form elements in each accordion, the button in the buttons options, and the close icon of the dialog itself, but tabbing seems to be skipping over the button in the buttons options, and I can't find any resource that has a resolution for this sort of problem.
How can i fetch column names from a tale on index basis, like i want to make a tables whose column name should be the name of last column fields of a result set of a query, but those result sets last columns value may be different at different execution time, so i want to know how can i fetch those index value of that last column to make a temp table with column name of those last columns value of a result set.
Is there any way/function in sql server to dynamically form that?
In c# and ruby and many other languages you can denote a string as to not need escaping.
in c# its like this
string s = @"\whatever\this\is";
the results are when printed
\whatever\this\is
my question is, is this supported in any form in javascript?
How do you encode a javascript object/hash (pairs of properties and values) into a URL-encoded query string with YUI (2.7.0 or 3.0.0 Beta) ?
I want to do the equivalent of Object.toQueryString() from Prototype:
I need this to encode parameters for GET and POST requests with YAHOO.util.Connect.
It turns out YAHOO.util.Connect has a setForm() method to serialize a form but that still leaves me out cold to encode parameters for GET requests, or the 4th parameter of YAHOO.util.Connect.asyncRequest() to pass post data.