Distinction between callbacks of asynchronous methods in C #

Let's assume I have an async method, which notifies me via an event when a certain change happens. Currently I'm able to assign the event's information to a static variable like this: static EventInfo result = null; // eventHandler, which assigns the

Webforms Repeater Link Question

I have a repeater that has a LinkButton in one of its columns and I have the onclick event wired up. When the user clicks on one of the options, I need to know in the event which LinkButton they clicked on. What is the best practice to do this?You sh

A-Z for a character

I need to test a character for uppercase only A-Z. Not any other special unicode or other languages. I was reading the documentation for Character.isUpperCase. It seems like it would pass if it was a unicode character that was considered uppercase bu

Google Street View on mobile

Does anyone know why the same iframe embedded Google streetview works fine on a desktop, but on a phone or tablet it just shows a regular map? This is profoundly annoying! - our location is notoriously difficult to find: we are on a leafy road in Bir

How do I get the value of the selected field in the controller?

I have a problem with get value from :days new form. new.html.haml = f.select :days, [['1 month', 30], ['2 months', 60], ['3 months', 90]] controller def create @bought_detail = BoughtDetail.new(bought_detail_params) @bought_detail.entry_type = @entr

Unexpected result of the byte representation of a variable

I scan through the byte representation of an int variable and get somewhat unexpected result. If I do int a = 127; cout << (unsigned int) *((char *)&a); I get 127 as expected. If I do int a = 256; cout << (unsigned int) *((char *)&a +

Click Toggle (jQuery)

$("li").hover( function () { // do x }, function () { // do y }); .. thats for hover, how would I do the same for click toggle, i.e do x on click and y on second click? Manythanks $('li').toggle(function() { alert(1) }, function() { alert(2); })

How does it deliver () does it need a length parameter?

Possible Duplicate: C programming : How does free know how much to free? A random thought occured to me that how comes free(myPtr) doesn't need a length parameter? How does it know how much memory to free? I can only guess that it keeps track of how

Java for the loop not encrusting

BufferedReader inputStream = null; String fileLine; int employeeCount = 1; String[] years = new String[2]; //Employee[] employees = new Employee[employeeCount + 1]; List<Employee> employees = new ArrayList<>(); File myFile = new File("src

To get the number of orders placed on the current day

I am using sql-server 2012 The query is 1.select count(*) from table where orderti=getdate() 2.select count(*) from table where orderti>=convert(date,getdate()) and orderti< dateadd(day,convert(date,getdate()) the table structure is: sales(orderti d

Can you bind a CSS file from an e-mail?

When sending an HTML email can you link to an external style sheet or does the CSS need to be included in the email? Also, if you can link to an external style sheet, which way is more efficient/is smarter to use: linking to the style sheet or includ

PDF to XML Transformation?

Can we convert PDF file to XML using XSLT Transformation? ThanksYou can't. XSL is used to convert an XML document to another form of XML (or as pointed out some other) document. You'll need to convert it to xml first with something like this: http://

Multiple background images with the same class

I definitely didn't use the correct title so apologies ahead of time. I simply don't know how to word my question so here goes. I'm using several Call to Actions on a landing page as full width clickable divs. I'd like to use a different background i

How do I retrieve SQLite data using an adapter in Android?

Good day, I want to fetch my database data using an Adapter and display it in my RecylcerViewer. But I don't know how to implement it. Hoping that you will guide me how to accomplish these task I want to replace these data to my database data but I d

Django: What's new with django-admin.py on Windows 7

On Windows XP I can open a command line, cd to a directory and type django-admin.py startproject thesampleproject but on my windows 7 machine, all I get is below. What happened? I successfully installed both Python and Django. echo %path% Check if yo

Enlarge if string contains a specific text in R

I've seen a lot of posts on this topic so apologies if this is a duplicate but I couldn't figure out my problem. I have df <- data.frame(name = c('bike+ride','shoe+store','ride','mountian%20bike','ride+along'), count = c(2,5,8,7,6)) and want to sum e

Support Flash vs Flash installed

Is there a way (in JavaScript) to detect between the following two scenarios? Device supports Flash, but Flash is not installed. Device does not support Flash (ie: iPad, iPhone) I know how to detect if Flash is installed, and I know how to detect an

table html to excel using jquery

I have this jquery function that works, except I need to add something. I have a filter setup on the table to hide columns. When I hide columns and click export it uses all fields regardless. How would I only export the table columns that are not hid

SVN does not see any changes

I just ran a perl script to replace all occurances of one word for another for my whole project. ie: perl -e "s/OLD/NEW/g;" -pi $(find ./ -type f) I want to commit these changes to subversion, but when i run "svn status", none of the m

Pass the value to the spark list

I have a list component in the main view with custom itemrednerer as shown below <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:android="http://schemas.android.com/apk/res/and

HTML5 Canvas Layers Conundrum (z-index)

I'm working on a site where among other things there are three layers of visuals: Layer 1 - divs with laid out textual info that scroll vertically Layer 2 - footer image that is fixed at the bottom of the view port (30% height) Layer 3 - canvas anima

How to Print an Unsigned Char * in NSLog ()

Title pretty much says everything. would like to print (NOT in decimal), but in unsigned char value (HEX). example unsigned char data[6] = {70,AF,80,1A, 01,7E}; NSLog(@"?",data); //need this output : 70 AF 80 1A 01 7E Any idea? Thanks in advance

Convert a new line to correct the value of Javascript

I have a series of data that I want to put inside an array in a javascript. I use Wordpress as a cms, and my data looks like this (the content of the post): line1 line2 line3 However when i try to seek data from the post I see this code in javascript

GMSMapView does not zoom in

I am loading a Google Place from the autocomplete API then looking up place details to zoom in on my map. I have a GMSMapView defined in my XIB which I can see when I run my view controller. Originally the zoom level is at 4. When I set the coordinat

Playing a video stream on iOS7

I'm trying to play a simple live stream link on iOS. There's one view controller with a button with a play action defined as below. - (IBAction)play:(id)sender { NSString *path = @"http://asish.flashmediacast.com:2135/live/International/playlist.m3u8