I Wrote an Http Module that checks if logged user is restricted disables images on the page.
void application_AuthorizeRequest(object sender, EventArgs e)
{
.
.
.
if (context.User.IsInRole("Restricted") &&
Path.GetExtension(context.Server.MapPath(context.Request.FilePath)).ToLower() == ".jpg")
{
context.Response.S...
I have a class derived from QGraphicsView, which contains QGraphicsItem-derived elements. I want these elements to change color whenever the mouse cursor hovers over them, so I implemented hoverEnterEvent (and hoverLeaveEvent):
void MyGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event)
{
update (boundingRect());
}
Howe...
I have a simple app, showing picture made of tiled images(named u1, u2,...,u16.jpg). Now I'd like to add some Events to it, so that I can show these images only when proper button is clicked. I've tried doing it on my own, but it's not working. Where am I doing something wrong?
Original code :
import java.awt.GridLayout;
import javax.s...
I am a little bit new to the PHP/MYSQL arena, and had an idea to be able to interact with my Database by using a hidden Iframe to run PHP pages in the background(iframe) on events without having to leave the current page?
Good? Bad? Common Practice? Opinions?
...
The code below doesn't work in the same behavior. The sequence of click event and calling foo() is different. I want to know why they behave different sequence between call click() and iterate the objects before call click() on each.
<script type="text/javascript">
function foo(obj){
alert(obj.id+" ->"+obj.checked);
...
Hi
I got a CWnd like thie CWnd * pWnd = pDC->GetWindow();
Is there away I can be notified when the windows is closing?
...
Hi,
I need to add the OnClick event to asp:DropDownList control, due to the existing events don't satisfy my current needs.
Is it possible to achieve this?
Thank you very much.
...
Hi all,
My company develops CDN / Web-Hosting solution. We have a middleware that's served as a business logic layer and exposes web service for the front-end.
I would like to seek for a clean solution to feature management - there're uncertainties and ugly workarounds/solutions in the software that the dev would say "when it happens o...
I would like to be able to call a function based on its name provided by a string. Something like
public void callByName(String funcName){
this.(funcName)();
}
I have searched a bit into lambda funcions but they are not supported. I was thinking about going for Reflection, but I am a bit new to programming, so I am not so familiar ...
Please tell me difference b/w
Capturing and Bubbling events.
...
Hi,
i have a web user control containing a repeater. The repeater contains three buttons. On button click it gives the following error :
Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that ar...
I have a long a web form. I'm wondering if I should bind() to each element separately (what I really want) or should I only define one bind() all of the input elements then do an if-then inside the handler to handle the specific element?
...
Dear experts,
I wanted have a dynamic division of content follow you with the cursor in the web browser space.
I am not a pro at JS so I spent 2 hours to finally debugged a very stupid way to accomplish this.
$(document).ready(function () {
function func(evt) {
var evt = (evt) ? evt : event;
var div = document.crea...
Like most web applications you have a method that gets called when you log in.
There are a few things that may need to get done when logged in and over time this may increase. eg. logging, welcome emails, maintenance.
Should events be used to do this or is there a better way?? I'm using C# and ASP.net MVC.
Update
This is already in its...
I have the following code th handle a user name validation on the server side. But the event seems not firing since break points in js or C# code didn't hit. Can anyone point out where I did wrong?
Here is the user control which has a user name textbox:
<%: Html.TextBox("UserName", Model.Username, new { maxlength = "40", size = "20", t...
Hi,
I have set up a SerialDataReceivedEventHandler, with a forms based program in VS2008 express. My serial port is set up as follows:
115200, 8N1
Dtr and Rts enabled
ReceivedBytesThreshold = 1
I have a device I am interfacing with over a BlueTooth, USB to Serial. Hyper terminal receives the data just fine at any data rate. The data ...
Ok,
I have a RelativeLayout with a few TextViews as children
<RelativeLayout
android:id="@+id/shift_parent_name"
android:layout_width="fill_parent"
android:layout_weight="0.25"
>
<TextView
android:id="@+id/shift_parent_nametitle"
android:text="@string/shift_parent_nametitle"
style="@style/hea...
Hello,
my question is quite simple:
Our C# application has one MainForm with a menu and several keyboard shortcuts associated with the menu entries.
Now we need to trigger the menu entries from some child forms too. But since the MainForm is inactive when one of the child forms is active, the shortcuts do not work.
Is there a simple ...
Hello, in iPhone SDK there are touchesBegan, touchesEnded and touchesMoved functions that are called when a touch event appears. My problem is that when I put a finger on the screen and I'm not moving it there is no way to know if there is a finger on the screen or not. Is there a way to get current touch screen state?
In any of touches...
Hey I have a problem getting my head around how custom GWT event Handlers work. I have read quite a bit about the topic and it still is some what foggy. I have read threads here on Stackoverflow like this one http://stackoverflow.com/questions/998621/gwt-custom-event-handler.Could someone explain it in an applied mannar such as the follo...