Search Results

Search found 24935 results on 998 pages for 'double click'.

Page 9/998 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Detect Click into Iframe using JavaScript

    - by Russ Bradberry
    I understand that it is not possible to tell what the user is doing inside an iframe if it is cross domain. What I would like to do is track if the user clicked at all in the iframe. I imagine a scenario where there is an invisible div on top of the iframe and the the div will just then pass the click event to the iframe. Is something like this possible? If it is, then how would I go about it? The iframes are ads, so I have no control over the tags that are used.

    Read the article

  • android maps: How to Long Click a Map?

    - by vamsibm
    Hi. How do I long click on a mapview so that a place marker appears at that point on the map? I tried a couple ways without success: 1) Using setOnLongClickListener on the MapvView which never detected the longclicks. 2) My other idea was to extend MapView to override dispatchTouchEvent .. Create a GestureDetector to respond to longpress callback. But I was stuck midway here as I could not get a handle to my subclassed Mapview. i.e. MyMapview mymapview; //MyMapView extends MapView mymapView = (MyMapView) findViewById(R.id.map); //results in a classcast exception 3) The only other way I know how to try this is: Detect a MotionEvent.ACTION_DOWN and post a delayed runnable to a handler and detect longpress if the two other events: acton_move or an action_up, have not happened. Can someone provide thoughts on any of these methods to detect long presses? Thanks in advance. Bd

    Read the article

  • Android image click in horizontal page view

    - by JaseemAmeer
    I've implemented horizontal page view with many images. And I'm trying to create a click event on the image. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.pbase); ImageView binfo,bheacno; tvHeacno=(TextView) findViewById(R.id.tvheacno); heacno=getHeacno(); tvHeacno.setText(heacno); MyPagerAdapter adapter=new MyPagerAdapter(); ViewPager myPager=(ViewPager)findViewById(R.id.mythreepanelpager); myPager.setAdapter(adapter); myPager.setCurrentItem(0); binfo=(ImageView) findViewById(R.id.ivinfo); bheacno=(ImageView) findViewById(R.id.ivheacno); binfo.setOnClickListener(this); bheacno.setOnClickListener(this); } then i've MyPagerAdapter class and the onclik method. it returns null to binfo and hence fails at binfo.setOnClickListener(this) I've done image click before on normal pages successfully. Is it because of horizontal page views? How can I solve this issue?? <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_weight="33" android:layout_gravity="top" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_weight="33" android:layout_gravity="center_horizontal" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:gravity="center" android:layout_weight="50" android:id="@+id/ivinfo" android:layout_width="wrap_content" android:layout_gravity="center" android:layout_height="wrap_content" android:src="@drawable/information" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="@android:color/black" android:layout_weight="50" android:layout_gravity="center" android:gravity="center" android:text=" Information " /> </LinearLayout> <LinearLayout android:layout_weight="33" android:layout_gravity="center_horizontal" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:gravity="center" android:layout_weight="50" android:id="@+id/ivheacno" android:layout_width="wrap_content" android:layout_gravity="center" android:layout_height="wrap_content" android:src="@drawable/heacno" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="@android:color/black" android:layout_weight="50" android:layout_gravity="center" android:gravity="center" android:text="Get HEAC Number" /> </LinearLayout> <LinearLayout android:layout_weight="33" android:layout_gravity="center_horizontal" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:gravity="center" android:layout_weight="50" android:id="@+id/ivpi" android:layout_width="wrap_content" android:layout_gravity="center" android:layout_height="wrap_content" android:src="@drawable/pi" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="@android:color/black" android:layout_weight="50" android:layout_gravity="center" android:gravity="center" android:text="Personal Information" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_weight="33" android:layout_gravity="center" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_weight="33" android:layout_gravity="left" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:gravity="center" android:layout_weight="50" android:id="@+id/ivassn" android:layout_width="wrap_content" android:layout_gravity="center" android:layout_height="wrap_content" android:src="@drawable/assn" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="@android:color/black" android:layout_weight="50" android:layout_gravity="center" android:gravity="center" android:text="Add Social Security Number" /> </LinearLayout> <LinearLayout android:layout_weight="33" android:layout_gravity="left" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:gravity="center" android:layout_weight="50" android:id="@+id/ivvssn" android:layout_width="wrap_content" android:layout_gravity="center" android:layout_height="wrap_content" android:src="@drawable/vssn" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="@android:color/black" android:layout_weight="50" android:layout_gravity="center" android:gravity="center" android:text="View Social Security Number" /> </LinearLayout> <LinearLayout android:layout_weight="33" android:layout_gravity="left" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:gravity="center" android:layout_weight="50" android:id="@+id/ivdssn" android:layout_width="wrap_content" android:layout_gravity="center" android:layout_height="wrap_content" android:src="@drawable/dssn" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="@android:color/black" android:layout_weight="50" android:layout_gravity="center" android:gravity="center" android:text="Delete Social Security Number" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_weight="33" android:layout_gravity="bottom" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_weight="33" android:layout_gravity="left" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:gravity="center" android:layout_weight="50" android:id="@+id/ivali" android:layout_width="wrap_content" android:layout_gravity="center" android:layout_height="wrap_content" android:src="@drawable/ali" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="@android:color/black" android:layout_weight="50" android:layout_gravity="center" android:gravity="center" android:text="Add Low Income" /> </LinearLayout> <LinearLayout android:layout_weight="33" android:layout_gravity="left" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:gravity="center" android:layout_weight="50" android:id="@+id/ivvli" android:layout_width="wrap_content" android:layout_gravity="center" android:layout_height="wrap_content" android:src="@drawable/vli" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="@android:color/black" android:layout_weight="50" android:layout_gravity="center" android:gravity="center" android:text="View Low Income" /> </LinearLayout> <LinearLayout android:layout_weight="33" android:layout_gravity="left" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:gravity="center" android:layout_weight="50" android:id="@+id/ivdli" android:layout_width="wrap_content" android:layout_gravity="center" android:layout_height="wrap_content" android:src="@drawable/dli" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="@android:color/black" android:layout_weight="50" android:layout_gravity="center" android:gravity="center" android:text="Delete Low Income" /> </LinearLayout> </LinearLayout> </LinearLayout>

    Read the article

  • Handling button click in ASP.NET MVC 2 RTM

    - by Leniel Macaferi
    I have a View in which the user is able to upload a file to the server. In this view I also have 2 buttons: one to Upload a file and other to Download the last file imported. In my Controller I created 2 action methods: Import and Export. How could I manage to redirect each button click to the proper action method in my Controller? I have tried Html.ActionLink: <%= Html.ActionLink("Upload", "Import", "OracleFile")%> <%= Html.ActionLink("Download", "Export", "OracleFile")%> Html.ActionLink didn't do the trick. The action links were taking me to the right Action methods but they were generating a GET request. This way Request.Files.Count = 0. I need a POST request.

    Read the article

  • How to Detect Right Click on the Taskbar

    - by Zay
    I've got a Windows Forms application in C# that starts off with a loading dialog. As expected, a button for the app shows up in the Windows taskbar. I would like to detect right-clicks that might be done to that button. Ultimately, I hope to disable the right-click or simply have the loading dialog regain focus. I've seen that some people use custom libraries and packages (interop, for example) to achieve some Win32 functionality, but I'd personally like to avoid this. Is it impossible to do without such libraries/packages?

    Read the article

  • advance click counter mysql or flat file

    - by jay
    Hi, First of all Thank You for looking. whats the best method for make an advance click counter (eg. order by views [today] | [yesterday] [this week] [last week] [this month] [last month] [all time] ). Is it better to use a flat file or mysql?. This is the MYSQL Structure i came up with. id (type: int(11)) link_id (type: int(11)) date (type: date) counter (type: int(11)) please can you advice me on whats the most effective way of doing this.

    Read the article

  • Toggling audio on click?

    - by angela
    please look at this fiddle http://jsfiddle.net/rabelais/yLdkj/1/ The above fiddle shows three bars that on hover play audios. How do I change this so the music plays and pauses on click instead. Also if one audio is playing and another is clicked how can the already playing song pause? $("#one").mouseenter(function () { $('#sound-1').get(0).play(); }); $("#one").mouseleave(function () { $('#sound-1').get(0).pause(); }); $("#two").mouseenter(function () { $('#sound-2').get(0).play(); }); $("#two").mouseleave(function () { $('#sound-2').get(0).pause(); }); $("#three").mouseenter(function () { $('#sound-3').get(0).play(); }); $("#three").mouseleave(function () { $('#sound-3').get(0).pause(); });

    Read the article

  • [jQuery] Improving click/toggle function

    - by Nimbuz
    $('.tabs a ').click(function () { var a = $(this).attr('href'); if (a == '#tab-1') { $('.btn-buy').hide(); $('.btn-sell').show(); } else { $('.btn-sell').hide(); $('.btn-buy').show(); } return false; }); ... it works, but the code is ugly, too many lines. Can it be reduced any further? Thanks in advance for your help!

    Read the article

  • Touchpad issues on HP Pavilion dm4 (can't right click)

    - by Habstinat
    Can anyone help me with my touchpad issues? I have a HP Pavilion dm4 and it has two areas on the bottom of the touchpad to designate right and left clicks. This mostly doesn't work on Ubuntu in the fact that it recognizes any taps on either tap zone as a left click. Instead, I have it set so if I tap anywhere on the pad it makes a left click. There should be, and there are, many ways in the mouse configuration window to simulate a right click using only a touchpad. None of these work. Changing mouse orientation doesn't do anything, "dwell click" also does nothing, and, the oddest part of this problem, whenever I try to turn "Simulated Secondary Click" off (it doesn't work anyways, but just to try to toggle it), the entire theme of my desktop changes to a gray Windows '95ey look. The only way to get rid of this is to close and reopen the mouse preferences window. My computer is fairly new and the Ubuntu installation is less than a day old. I didn't do anything that I think could cause this. The problem is that I can't right click. Help, please?s that I can't right click. Help, please? Afterword: I installed two scripts from http://sansmicrosoft.blogspot.com/2010/10/pavilion-dm4-1160-erratic-touchpad.html . They didn't do anything I couldn't already do, and they did not make it possible for me to right click. :(

    Read the article

  • Touchpad issues on HP Pavilion dm4 (can't right click)

    - by Habstinat
    Can anyone help me with my touchpad issues? I have a HP Pavilion dm4 and it has two areas on the bottom of the touchpad to designate right and left clicks. This mostly doesn't work on Ubuntu in the fact that it recognizes any taps on either tap zone as a left click. Instead, I have it set so if I tap anywhere on the pad it makes a left click. There should be, and there are, many ways in the mouse configuration window to simulate a right click using only a touchpad. None of these work. Changing mouse orientation doesn't do anything, "dwell click" also does nothing, and, the oddest part of this problem, whenever I try to turn "Simulated Secondary Click" off (it doesn't work anyways, but just to try to toggle it), the entire theme of my desktop changes to a gray Windows '95ey look. The only way to get rid of this is to close and reopen the mouse preferences window. My computer is fairly new and the Ubuntu installation is less than a day old. I didn't do anything that I think could cause this. The problem is that I can't right click. Help, please?s that I can't right click. Help, please? Afterword: I installed two scripts from http://sansmicrosoft.blogspot.com/2010/10/pavilion-dm4-1160-erratic-touchpad.html . They didn't do anything I couldn't already do, and they did not make it possible for me to right click. :(

    Read the article

  • Flex: Menubar, menu click

    - by javanes
    I do not know why but I see that itemclick event on a menubar do not fired unless you click a sub item. What is the clean way to handle clicks on menuitems which are on the top level and do not have sub menu items. For example I want to fire an event whenever MenuItem B is clicked. <?xml version="1.0"?> <!-- menus/MenuBarControl.mxml --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > <mx:MenuBar id="myMenuBar" labelField="@label" itemClick="{itemClick(event)}" > <mx:XMLList> <menuitem label="MenuItem A"> <menuitem label="SubMenuItem A-1"/> <menuitem label="SubMenuItem A-2"/> </menuitem> <menuitem label="MenuItem B"/> </mx:XMLList> </mx:MenuBar> </mx:Application>

    Read the article

  • Synthetic click doesn't switch application's menu bar (Mac OS X)

    - by Rok
    Hi. I'm developing some sort of air mouse application for iPhone platform. This applications connects to one computer service which generates mouse events on Mac OS X. I'm generating this events with CGEventCreateMouseEvent() and CGEventPost(). But I've encountered one problem. Let's say you are using Safari and then you click on free desktop space. If you do this with regular mouse it will hide Safari's top menu bar and show Finder menu bar. But on these synthetic events it doesn't act like that. Do I have to post some other event or set some additional properties? Here is my code for mouse up, mouse down: - (void)mouseUp:(int)button { int type = (button == LEFT_BUTTON) ? kCGEventLeftMouseUp : kCGEventRightMouseUp; int mouseButton = (button == LEFT_BUTTON) ? kCGMouseButtonLeft : kCGMouseButtonRight; leftMouseDown = (button == LEFT_BUTTON) ? NO : leftMouseDown; rightMouseDown = (button == RIGHT_BUTTON) ? NO : rightMouseDown; CGEventSourceRef source = CGEventSourceCreate(kCGEventSourceStateHIDSystemState); CGEventRef event = CGEventCreateMouseEvent (source, type, CGSCurrentInputPointerPosition(), mouseButton); CGEventSetType(event, type); CGEventPost(kCGHIDEventTap, event); CFRelease(event); } - (void)mouseDown:(int)button { int type = (button == LEFT_BUTTON) ? kCGEventLeftMouseDown : kCGEventRightMouseDown; int mouseButton = (button == LEFT_BUTTON) ? kCGMouseButtonLeft : kCGMouseButtonRight; leftMouseDown = (button == LEFT_BUTTON) ? YES : leftMouseDown; rightMouseDown = (button == RIGHT_BUTTON) ? YES : rightMouseDown; CGEventSourceRef source = CGEventSourceCreate(kCGEventSourceStateHIDSystemState); CGEventRef event = CGEventCreateMouseEvent (source, type, CGSCurrentInputPointerPosition(), mouseButton); CGEventSetType(event, type); CGEventPost(kCGHIDEventTap, event); CFRelease(event); }

    Read the article

  • update data after click tab

    - by alkitbi
    I want to add to this simple file ... When you click on a tab updated contents of the page or reload . <script type="text/javascript" src="yetii.js"></script> <script type="text/javascript" src="yetii-min.js"></script> <div class="Tabber"><div id="aldirazi"><ul id="aldirazi-nav"><li><a href="#UAEDES1">page1</a></li> </ul><div id="aldirazi-tabs"> <div class="tab" id="UAEDES1"> <? include("page1.php");?></div> </div> </div> </div> <script type="text/javascript"> var tabber1 = new Yetii({ id: 'aldirazi', persist: true }); </script>

    Read the article

  • jquery anchor click doesn't seem to work....

    - by Pandiya Chendur
    Here is function , <script type="text/javascript"> $(document).ready(function() { getRecordspage(1, 5); $("a.page-numbers").click(function() { alert(1); getRecordspage($(this).text(), 5); return false; }); }); And in my page i am appending anchors dynamically to this div, <div id="pager" class="pager"> //my anchors will be present here... </div> i am appending anchors dynamically... All anchors will have class="page-numbers"... How it can be done... When inspected through firebug my pager div had this when i clicked 3, <div class="pager" id="pager"> <a class="page-numbers prev" href="#">Prev</a> <a class="page-numbers" href="#">1</a> <a class="page-numbers" href="#">2</a> <span class="page-numbers current">3</span> <a class="page-numbers" href="#">4</a> <a class="page-numbers next" href="#">Next</a></div>

    Read the article

  • How can I further optimize this color difference function?

    - by aLfa
    I have made this function to calculate color differences in the CIE Lab colorspace, but it lacks speed. Since I'm not a Java expert, I wonder if any Java guru around has some tips that can improve the speed here. The code is based on the matlab function mentioned in the comment block. /** * Compute the CIEDE2000 color-difference between the sample color with * CIELab coordinates 'sample' and a standard color with CIELab coordinates * 'std' * * Based on the article: * "The CIEDE2000 Color-Difference Formula: Implementation Notes, * Supplementary Test Data, and Mathematical Observations,", G. Sharma, * W. Wu, E. N. Dalal, submitted to Color Research and Application, * January 2004. * available at http://www.ece.rochester.edu/~gsharma/ciede2000/ */ public static double deltaE2000(double[] lab1, double[] lab2) { double L1 = lab1[0]; double a1 = lab1[1]; double b1 = lab1[2]; double L2 = lab2[0]; double a2 = lab2[1]; double b2 = lab2[2]; // Cab = sqrt(a^2 + b^2) double Cab1 = Math.sqrt(a1 * a1 + b1 * b1); double Cab2 = Math.sqrt(a2 * a2 + b2 * b2); // CabAvg = (Cab1 + Cab2) / 2 double CabAvg = (Cab1 + Cab2) / 2; // G = 1 + (1 - sqrt((CabAvg^7) / (CabAvg^7 + 25^7))) / 2 double CabAvg7 = Math.pow(CabAvg, 7); double G = 1 + (1 - Math.sqrt(CabAvg7 / (CabAvg7 + 6103515625.0))) / 2; // ap = G * a double ap1 = G * a1; double ap2 = G * a2; // Cp = sqrt(ap^2 + b^2) double Cp1 = Math.sqrt(ap1 * ap1 + b1 * b1); double Cp2 = Math.sqrt(ap2 * ap2 + b2 * b2); // CpProd = (Cp1 * Cp2) double CpProd = Cp1 * Cp2; // hp1 = atan2(b1, ap1) double hp1 = Math.atan2(b1, ap1); // ensure hue is between 0 and 2pi if (hp1 < 0) { // hp1 = hp1 + 2pi hp1 += 6.283185307179586476925286766559; } // hp2 = atan2(b2, ap2) double hp2 = Math.atan2(b2, ap2); // ensure hue is between 0 and 2pi if (hp2 < 0) { // hp2 = hp2 + 2pi hp2 += 6.283185307179586476925286766559; } // dL = L2 - L1 double dL = L2 - L1; // dC = Cp2 - Cp1 double dC = Cp2 - Cp1; // computation of hue difference double dhp = 0.0; // set hue difference to zero if the product of chromas is zero if (CpProd != 0) { // dhp = hp2 - hp1 dhp = hp2 - hp1; if (dhp > Math.PI) { // dhp = dhp - 2pi dhp -= 6.283185307179586476925286766559; } else if (dhp < -Math.PI) { // dhp = dhp + 2pi dhp += 6.283185307179586476925286766559; } } // dH = 2 * sqrt(CpProd) * sin(dhp / 2) double dH = 2 * Math.sqrt(CpProd) * Math.sin(dhp / 2); // weighting functions // Lp = (L1 + L2) / 2 - 50 double Lp = (L1 + L2) / 2 - 50; // Cp = (Cp1 + Cp2) / 2 double Cp = (Cp1 + Cp2) / 2; // average hue computation // hp = (hp1 + hp2) / 2 double hp = (hp1 + hp2) / 2; // identify positions for which abs hue diff exceeds 180 degrees if (Math.abs(hp1 - hp2) > Math.PI) { // hp = hp - pi hp -= Math.PI; } // ensure hue is between 0 and 2pi if (hp < 0) { // hp = hp + 2pi hp += 6.283185307179586476925286766559; } // LpSqr = Lp^2 double LpSqr = Lp * Lp; // Sl = 1 + 0.015 * LpSqr / sqrt(20 + LpSqr) double Sl = 1 + 0.015 * LpSqr / Math.sqrt(20 + LpSqr); // Sc = 1 + 0.045 * Cp double Sc = 1 + 0.045 * Cp; // T = 1 - 0.17 * cos(hp - pi / 6) + // + 0.24 * cos(2 * hp) + // + 0.32 * cos(3 * hp + pi / 30) - // - 0.20 * cos(4 * hp - 63 * pi / 180) double hphp = hp + hp; double T = 1 - 0.17 * Math.cos(hp - 0.52359877559829887307710723054658) + 0.24 * Math.cos(hphp) + 0.32 * Math.cos(hphp + hp + 0.10471975511965977461542144610932) - 0.20 * Math.cos(hphp + hphp - 1.0995574287564276334619251841478); // Sh = 1 + 0.015 * Cp * T double Sh = 1 + 0.015 * Cp * T; // deltaThetaRad = (pi / 3) * e^-(36 / (5 * pi) * hp - 11)^2 double powerBase = hp - 4.799655442984406; double deltaThetaRad = 1.0471975511965977461542144610932 * Math.exp(-5.25249016001879 * powerBase * powerBase); // Rc = 2 * sqrt((Cp^7) / (Cp^7 + 25^7)) double Cp7 = Math.pow(Cp, 7); double Rc = 2 * Math.sqrt(Cp7 / (Cp7 + 6103515625.0)); // RT = -sin(delthetarad) * Rc double RT = -Math.sin(deltaThetaRad) * Rc; // de00 = sqrt((dL / Sl)^2 + (dC / Sc)^2 + (dH / Sh)^2 + RT * (dC / Sc) * (dH / Sh)) double dLSl = dL / Sl; double dCSc = dC / Sc; double dHSh = dH / Sh; return Math.sqrt(dLSl * dLSl + dCSc * dCSc + dHSh * dHSh + RT * dCSc * dHSh); }

    Read the article

  • How to temporarily stop web pages intercepting a right-click?

    - by callum
    Some websites like Google Drive intercept right-clicks and provide their own context menu. This is usually what I want, but sometimes I still want to do a normal, native browser right-click. Is there any modifier key or something like that to make it so a right-click doesn't trigger a click event on the web page, so it can't show it's context menu? I want to do this per-click, not by changing a setting somewhere. If there are different techniques depending on browser/OS, please list them.

    Read the article

  • Amazon travaillerait sur une version inédite des tablettes Kindle, à double affichage LCD / encre électronique

    Amazon travaillerait sur une version inédite des tablettes Kindle À double affichage LCD / encre électronique Un nouveau dépôt de brevet signé Amazon et dévoilé ce jeudi décrit un dispositif incorporant un double affichage inédit. On y retrouve un écran LCD (ou OLED) d'un côté et un écran statique E-INK (encre électronique ou papier électronique) de l'autre. [IMG]http://idelways.developpez.com/news/images/kindle-lcd-e-ink.jpg[/IMG] Une idée prometteuse que celle d'Amazon en pensant à créer une tablette tactile à double écran Kindle ? Kindle Fire. L'écran Kindle doté d'un affichage à faible éclairage offre un outil eReader avec un plus grand confort de le...

    Read the article

  • building median for each string in IList<IDictionary<string, double>>

    - by Oliver
    Actually i have a little brain bender and and just can't find the right direction to get it to work: Given is an IList<IDictionary<string, double>> and it is filled as followed: Name|Value ----+----- "x" | 3.8 "y" | 4.2 "z" | 1.5 ----+----- "x" | 7.2 "y" | 2.9 "z" | 1.3 ----+----- ... | ... To fill this up with some random data i used the following methods: var list = CreateRandomPoints(new string[] { "x", "y", "z" }, 20); This will work as followed: private IList<IDictionary<string, double>> CreateRandomPoints(string[] variableNames, int count) { var list = new List<IDictionary<string, double>>(count); list.AddRange(CreateRandomPoints(variableNames).Take(count)); return list; } private IEnumerable<IDictionary<string, double>> CreateRandomPoints(string[] variableNames) { while (true) yield return CreateRandomLine(variableNames); } private IDictionary<string, double> CreateRandomLine(string[] variableNames) { var dict = new Dictionary<string, double>(variableNames.Length); foreach (var variable in variableNames) { dict.Add(variable, _Rand.NextDouble() * 10); } return dict; } Also i can say that it is already ensured that every Dictionary within the list contains the same keys (but from list to list the names and count of the keys can change). So that's what i got. Now to the things i need: I'd like to get the median (or any other math aggregate operation) of each Key within all the dictionaries, so that my function to call would look something like: IDictionary<string, double> GetMedianOfRows(this IList<IDictionary<string, double>> list) The best would be to give some kind of aggregate operation as a parameter to the function to make it more generic (don't know if the func has the correct parameters, but should imagine what i'd like to do): private IDictionary<string, double> Aggregate(this IList<IDictionary<string, double>> list, Func<IEnumerable<double>, double> aggregator) Also my actual biggest problem is to do the job with a single iteration over the list, cause if within the list are 20 variables with 1000 values i don't like to iterate 20 times over the list. Instead i would go one time over the list and compute all twenty variables at once (The biggest advantage of doing it that way would be to use this also as IEnumerable<T> on any part of the list in a later step). So here is the code i already got: public static IDictionary<string, double> GetMedianOfRows(this IList<IDictionary<string, double>> list) { //Check of parameters is left out! //Get first item for initialization of result dictionary var firstItem = list[0]; //Create result dictionary and fill in variable names var dict = new Dictionary<string, double>(firstItem.Count); //Iterate over the whole list foreach (IDictionary<string, double> row in list) { //Iterate over each key/value pair within the list foreach (var kvp in row) { //How to determine median of all values? } } return dict; } Just to be sure here is a little explanation about the Median.

    Read the article

  • Google Analytic Metric to use for off-site banner click comparison

    - by EricPatterson
    I have all my off-site banner ads correctly campaign tracked/tagged but I want to know what metrics I should be looking at in the GA for the closest comparison to the ad servers clicks. I am pretty sure it wouldn't be Visits but I also see there is PageViews and UniquePageViews. My GA data is coming in way off from what the ad server manager people are telling my clicks are for said banners on their site. My other question is what type of percentage are other people seeing there data being off?

    Read the article

  • Click Tabbar to Open Email view in iphone

    - by Pugal Devan
    HI, I am new to iphone development.I have created tabbar as programmatically and sets two view in the tabbar. Now i want to load a email application view when i clicked the tabbar and it opened and works properly.Then i clicked the next tabbar and come back to the email view, it doesnot displayed.So i am facing the problem is only one time open my mail application. I want to display the email view while clicked the tabbar. Now i have written in my code is viewDidLoad. So please guide me. Here is my code, - (void)viewDidLoad { [super viewDidLoad]; MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init]; mail.mailComposeDelegate = self; if ([MFMailComposeViewController canSendMail]) { [mail setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]]; [mail setSubject:@"Title"]; [self presentModalViewController:mail animated:NO]; } [mail release]; } Thanks.

    Read the article

  • Has form post behavior changed in modern browsers? (or How are double clicks handled by the browser)

    - by Alex Czarto
    Background: We are in the process of writing a registration/payment page, and our philosophy was to code all validation and error checking on the server side first, and then add client side validation as a second step (un-obstructive jQuery). We wanted to disable double clicks server side, so we wrote some locking, thread-safe code to handle simultaneous posts/race conditions. When we tried to test this, we realized that we could not cause a simultaneous post or race condition to occur. I thought that (in older browsers anyway) double clicking a submit button worked as follows: User double clicks submit button. Browser sends a post on the first click On the second click, browser cancels/ignores initial post, and initiates a second post (before the first post has returned with a response). Browser waits for second post to return, ignoring initial post response. I thought that from the server side it looked like this: Server gets two simultaneous post requests, executes and responds to them both (unaware that no one is listening to the first response). From our testing (FireFox 3.0, IE 8.0) this is what actually happens: User double clicks submit button Browser sends a post for the first click Browser queues up second click, but waits for the response from the first click. Response returns from first click (response is ignored?). Browser sends a post for the second click. So from a server side: Server receives a single post which it executes and responds to. Then, server receives a second request wich it executes and responds to. My question is, has this always worked this way (and I'm losing my mind)? Or is this a new feature in modern browsers that prevents simultaneous posts to be sent to the server? It seems that for server side double click prevention, we don't have to worry about simultaneous posts or race conditions. Only need to worry about queued up posts. Thanks in advance for any feedback / comments. Alex

    Read the article

  • Connecting click signal to QGraphicsView

    - by viraptor
    Hi, how can I connect a clicked() signal to a widget which doesn't seem to handle it (like QGraphicsView). If I try to rely on autoconnect, I get only: QMetaObject::connectSlotsByName: No matching signal for on_xxx_clicked() What's the solution for situations like that? Thanks

    Read the article

  • Simulating a mouse button click in Windows

    - by Ncarlson
    Hi everyone, I'm writing Remote Desktop clone in C++ using QT. So far I'm able to move the mouse cursor around fine. QT has a nice setPos function for that. However, I'm a bit lost as to what API/Library to use for simulating mouse button clicks. One method I'm aware of is to send the WM_(event) to a window using the window's HWND. However, I was hoping there was a more salient method for taking complete control over a mouse. Is there any other way to tell the operating system that the left mouse button has been clicked? Thanks.

    Read the article

  • ctrl+click or shift+click not always firing the onclick event

    - by Erik
    Hi, I recently discovered that different browsers handle the onclick event differently when the control of shift key is pressed. Same thing for following links with the middle mouse button. <a href="http://www.example.com/" onclick="alert('onclick');">go to example.com</a> Onclick browser support table Mouse Keyboard Chrome Firefox Safari Opera IE5.5 IE6 IE7 IE8 IE9 Left None yes yes yes yes yes yes yes yes yes Left Ctrl yes yes yes yes ? yes no no ? Left Shift yes yes yes yes ? yes yes yes ? Middle None yes no yes no ? N/A no no ? Can someone please fill in the question marks for me? Also; I'm wondering if the behaviour differs for each version of Chrome, Firefox, Safari and Opera. Finding a logical pattern in this behaviour would be even nicer, but I don't think there is :). Thanks a lot.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >