» Home » mdash » Page 1
Java — static & dynamic type — “what does this print?”
Category : Development Tools & Services

So I'm having a bit of trouble understanding this example that was shown in class -- it's supposed to illustrate subtleties between static & dynamic types in Java.

public class Piece {
public static void main (String[] args) {
Piece p2 = new Knight();
Knight p1 = new Knight();
p1.capture(p2); // call 1; "Knight is bored" is supp

View Replies

How do I allow a drop-down list parameter in SSRS to have a default value of “— All — ”?
Category : Databases

I have a drop-down list that gets populated based on a stored-procedure - that parts works fine.

It gets populated dynamically, based on whatever the "Survey ID" is

But I don't want it to say <Select a Value> , rather it should say " -- All -- " , because that is how the report works.

So far I tried to create a dum

View Replies

Regex / javax.validation help — verifying non-whitespace present — Java
Category : Java

I'm trying to validate some fields before persisting them to the database. In particular, I need to know that a String contains a non-whitespace character.

I'm using the javax.validation.constraints.Pattern annotation, as follows:

@Pattern(regexp = "[^s]")
private String field;

This seems to throw the ConstraintViolation on ever

View Replies

how to handle — fast tx & recepion of data — device driver Linux
Category : Development Tools & Services

I am looking forward to implement a driver for CAN bus communicationin Linux.
Need some design suggestion.

Linux there are user space & kernel space. Drivers run at kernel space application at user space.

1> Now suppose if packets are received at very high speed then how drivers can manage this situation ?

2> If packets have to transmit at high rate th

View Replies

Django GenericView Update — sending email if form is saved — how to?
Category : Development Tools & Services

I have this UpdateView subclass

class UpdateShipView(UpdateView):
form_class = CruiseShipForm
template_name = 'cruise/ship_form.html'
success_url = 'cruise/ships'
def get_object(self, queryset=None):
obj = CruiseShip.objects.get(pk=self.kwargs['ship_id'])
return obj

I want to send an email to certa

View Replies

Insert “— Select a Project — ” in a dropdown box
Category : Programming Languages

I have a dropdown box in my asp.net web page. I want the dd box to start out on load with "-- Select a Project --" as the text value. The dd box is bound to an EF object at design time -- no custom code (sorry). It has (like a classic Combo Box) an "ID" column (integer) and a display column. When I had a dd box with only one column, the process was simple:

protected void Project

View Replies

C++ — Detours (Win32 API Hijacking) — Hijack Class Methods
Category : Programming Languages

I had no problems hijacking function with Detours for a long time... When I tried to hijack class methods (in my case IHTMLDocument2::write from mshtml.dll) I encountered endless problems (mainly type mismatching). As I didn't find any relevant example on the net I began doubting this can be done.

My question is: is it possible to hijack class methods with Detours? Can I have an exa

View Replies

Diffie-Hellman — Primitive root mod n — cryptography question
Category : Web Design

In the below snippet, please explain starting with the first "for" loop what is happening and why. Why is 0 added, why is 1 added in the second loop. What is going on in the "if" statement under bigi. Finally explain the modPow method. Thank you in advance for meaningful replies.

public static boolean isPrimitive(BigInteger m, BigInteger n) {
BigInteger bigi, vectorint;

View Replies

QtWebView — C++ — How to get javascript string returned from linkClicked event
Category : Javascript

I have been unable to find a definitive answer to my problem.

I currently have a QWebView control load an html file that is on my hard-drive, that implements a vector map with javascript actions. The html file loads a jvectormap US States Map. The click action on any state fires the onRegionClick action that is tied to the showCities function, which the event and code arguments ar

View Replies

iPhone Obj C — Sorting a Mutable Array of dictionaries — display a string but sort by value
Category : Programming Languages

I have a NSMutableArray with 30 dictionaries inside of it. Each contains a name and a value. I currently have the names sorted so that the show in a table view alphabetically. However, I'd like to make a UIButton to give the option of STILL DISPLAYING THE NAMES, but ordered by the value. The value doesn't need to be displayed. Also, where in the .m/.h files would these codes be placed? THANKS!

View Replies

2012 / 2017 Copyrights BigHow , All Rights Reserved .