Search Results

Search found 784 results on 32 pages for 'cody gray'.

Page 6/32 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • MySQL specifying exact order with WHERE `id` IN (...)

    - by Gray Fox
    Is there an easy way to order MySQL results respectively by WHERE id IN (...) clause? Example: SELECT * FROM articles WHERE articles.id IN (4, 2, 5, 9, 3) to return Article with id = 4 Article with id = 2 Article with id = 5 Article with id = 9 Article with id = 3 and also SELECT * FROM articles WHERE articles.id IN (4, 2, 5, 9, 3) LIMIT 2,2 to return Article with id = 5 Article with id = 9

    Read the article

  • How to pass a value between Silverlight pages for WP7?

    - by Sebastian Gray
    I've got a MainPage.xaml page a Detail.xaml page. I've passed variables to the Detail.xaml from MainPage.xaml by using a static variable and referencing it in Detail.xaml (the detail page is acting like a dialog). However once I've updated the content of another object, I want to call a method in MainPage.xaml to refresh the content of that page using the updated object from the Detail.xaml page. I assume I am not using the correct paradigm for this and should probably be using MVVM or something but I'm not familiar with the implementation and was hoping there was a simple way to do this?

    Read the article

  • Create a variable which is named depending on an ID number?

    - by gray
    Is there any way to create a variable, and add an ID to the end of the actual variable name? I have a variable called 'gauge', used to create a new Gauge object: var gauge = new Gauge(target).setOptions(opts); I want to add an ID to the variable, so something like: var gauge+id = new Gauge(target).setOptions(opts); It's because I'm creating a number of these objects, and have a specific ID already for each one, which I want to attach to the gauge object if possible? All my code for this function is below, if it gives you a better idea of what i need to do: function go(id, votes) { var val = $('#votes_'+id).text(); var target = document.getElementById('foo_'+id); // your canvas element var gauge = new Gauge(target).setOptions(opts); // create sexy gauge! gauge.maxValue = 100; // set max gauge value gauge.animationSpeed = 20; // set animation speed (32 is default value) var a=votes+0.5; gauge.set(val); // set actual value } My main problem arises on the last line. It says gauge.set(val), and it only sets the last object, ignoring all the other ones...

    Read the article

  • Creating a Colormap Legend in Matplotlib

    - by Vince
    Hi fellow Stackers! I am using imshow() in matplotlib like so: import numpy as np import matplotlib.pyplot as plt mat = '''SOME MATRIX''' plt.imshow(mat, origin="lower", cmap='gray', interpolation='nearest') plt.show() How do I add a legend showing the numeric value for the different shades of gray. Sadly, my googling has not uncovered an answer :( Thank you in advance for the help. Vince

    Read the article

  • JQUERY Effect highlight, control the Start & End colors

    - by nobosh
    I have the following: $(".notifycell_email_dailydigest").effect('highlight'); The element I want to highlight is over a gray background. Problem is the highlight goes from Yellow to white, and has this ugly slow pause at the end on the white which makes the animation look horrible. How can I modify the highlighy to start with the yellow but end on the gray so it matches the background? Thanks

    Read the article

  • Blurry text in WPF even with ClearTypeHinting enabled?

    - by rFactor
    I have a grid with this template and styles in WPF/XAML: <Setter Property="TextOptions.TextFormattingMode" Value="Display" /> <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type DataGridCell}"> <Border Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"> <ContentPresenter x:Name="CellContent" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RenderOptions.ClearTypeHint="Enabled" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter TargetName="CellContent" Property="TextOptions.TextFormattingMode" Value="Display" /> <Setter TargetName="CellContent" Property="RenderOptions.ClearTypeHint" Value="Enabled" /> <Setter TargetName="CellContent" Property="Effect"> <Setter.Value> <DropShadowEffect ShadowDepth="2" BlurRadius="2" Color="Black" RenderingBias="Quality" /> </Setter.Value> </Setter> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> The DropShadowEffect I have when you select a grid row, seems to make the text rendering blurry (gray anti-aliasing): When I remove the drop shadow effect, it looks clear because it now uses ClearType and not gray sub-pixel anti-aliasing: I have tried applying RenderOptions.ClearTypeHint="Enabled" to the ContentPresenter as seen above, but it does not help. How do I force WPF to render the text that gets displayed with drop shadow effect to retain Cleartype anti-aliasing, instead of that ugly blurry gray sub-pixel anti-aliasing? Some believe it's blurry because of the drop shadow -- this is not true. It's blurry only because ClearType is not used. This is how it looks like in Firefox when shadow AND ClearType: ClearType enabled text is colorful -- but that blurry text is not, because it does not use ClearType -- it uses gray sub-pixel anti-aliasing and that's not how ClearType works: http://en.wikipedia.org/wiki/ClearType The question is: how do I enable ClearType for this text?

    Read the article

  • Header Div Position Edit according to Content Div

    - by Melih Mucuk
    I want to design my web site. I have two main div, one of them "header", other "content". I want to set width property:80% and I set center for both of them. But I don't do that. Other question about header div. I uploaded an image and I want to design like this. How can I do all of them? My CSS: #main { margin:0px auto; margin-left:50px; margin-right:50px; margin-top:25px; margin-bottom:25px; height:auto; text-align:center;} #content { width:80%; height:auto; margin:0px auto; } #header { width:80%; height:100px; top:20px; } #header_left { float:left ; height: 100px; text-align: center; } #header_right { margin:0px auto; height:30px; text-align:center; margin-top:35px; } #header_social { float:right; height:30px; text-align:center; margin-top:35px;} My client code: <div id="main"> <div id="content"> <div id="header"> <div id="header_left"> <asp:Image ID="Image1" runat="server" /> </div> <div id="header_right"> <asp:LinkButton ID="LinkButton5" runat="server" ForeColor="Gray"></asp:LinkButton>&nbsp;| <asp:LinkButton ID="LinkButton4" runat="server" ForeColor="Gray" ></asp:LinkButton>&nbsp;| <asp:LinkButton ID="LinkButton3" runat="server" ForeColor="#FF3300" ></asp:LinkButton>&nbsp;| <asp:LinkButton ID="LinkButton2" runat="server" ForeColor="Gray" ></asp:LinkButton>&nbsp;| <asp:LinkButton ID="LinkButton1" runat="server" ForeColor="Gray" ></asp:LinkButton> </div> <div id="header_social"> <asp:ImageButton ID="ImageButton1" runat="server"/> <asp:ImageButton ID="ImageButton2" runat="server"/> </div> </div> ******CONTENT FIELD***** </div> </div>

    Read the article

  • Creating a grid overlay over image.

    - by neteus
    Hi everybody, I made a script (using mootools library) that is supposed to overlay an image with a table grid and when each grid cell is clicked/dragged over its background color changes 'highlighting' the cell. Current code creates a table and positions it over the element (el, image in this case). Table was used since I am planning to add rectangle select tool later on, and it seemed easiest way to do it. <html> <head> <title></title> <script type="text/javascript" src="mootools.js"></script> <script type="text/javascript"> var SetGrid = function(el, sz, nr, nc){ //get number of rows/columns according to the 'grid' size numcols = el.getSize().x/sz; numrows = el.getSize().y/sz; //create table element for injecting cols/rows var gridTable = new Element('table', { 'id' : 'gridTable', 'styles' : { 'width' : el.getSize().x, 'height' : el.getSize().y, 'top' : el.getCoordinates().top, 'left' : el.getCoordinates().left } }); //inject rows/cols into gridTable for (row = 1; row<=numrows; row++){ thisRow = new Element('tr', { 'id' : row, 'class' : 'gridRow' }); for(col = 1; col<=numcols; col++){ thisCol = new Element('td', { 'id' : col, 'class' : 'gridCol0' }); //each cell gets down/up over event... down starts dragging|up stops|over draws area if down was fired thisCol.addEvents({ 'mousedown' : function(){ dragFlag = true; startRow = this.getParent().get('id'); startCol = this.get('id'); }, 'mouseup' : function(){ dragFlag = false; }, 'mouseover' : function(){ if (dragFlag==true){ this.set('class', 'gridCol'+$$('#lvlSelect .on').get('value')); } }, 'click' : function(){ //this.set('class', 'gridCol'+$$('#lvlSelect .on').get('id').substr(3, 1) ); str = $$('#lvlSelect .on').get('id'); alert(str.substr(2, 3)); } }); thisCol.inject(thisRow, 'bottom'); }; thisRow.inject(gridTable, 'bottom'); }; gridTable.inject(el.getParent()); } //sens level selector func var SetSensitivitySelector = function(el, sz, nr, nc){ $$('#lvlSelect ul li').each(function(el){ el.addEvents({ 'click' : function(){ $$('#lvlSelect ul li').set('class', ''); this.set('class', 'on'); }, 'mouseover' : function(){ el.setStyle('cursor','pointer'); }, 'mouseout' : function(){ el.setStyle('cursor',''); } }); }); } //execute window.addEvent('load', function(){ SetGrid($('imagetomap'), 32); SetSensitivitySelector(); }); </script> <style> #imagetomapdiv { float:left; display: block; } #gridTable { border:1px solid red; border-collapse:collapse; position:absolute; z-index:5; } #gridTable td { opacity:0.2; filter:alpha(opacity=20); } #gridTable .gridCol0 { border:1px solid gray; background-color: none; } #gridTable .gridCol1 { border:1px solid gray; background-color: green; } #gridTable .gridCol2 { border:1px solid gray; background-color: blue; } #gridTable .gridCol3 { border:1px solid gray; background-color: yellow; } #gridTable .gridCol4 { border:1px solid gray; background-color: orange; } #gridTable .gridCol5 { border:1px solid gray; background-color: red; } #lvlSelect ul {float: left; display:block; position:relative; margin-left: 20px; padding: 10px; } #lvlSelect ul li { width:40px; text-align:center; display:block; border:1px solid black; position:relative; padding: 10px; list-style:none; opacity:0.2; filter:alpha(opacity=20); } #lvlSelect ul li.on { opacity:1; filter:alpha(opacity=100); } #lvlSelect ul #li0 { background-color: none; } #lvlSelect ul #li1 { background-color: green; } #lvlSelect ul #li2 { background-color: blue; } #lvlSelect ul #li3 { background-color: yellow; } #lvlSelect ul #li4 { background-color: orange; } #lvlSelect ul #li5 { background-color: red; } </style> </head> <body> <div id="imagetomapdiv"> <img id="imagetomap" src="1.png"> </div> <div id="lvlSelect"> <ul> <li value="0" id="li0">0</li> <li value="1" id="li1">1</li> <li value="2" id="li2">2</li> <li value="3" id="li3">3</li> <li value="4" id="li4">4</li> <li value="5" id="li5" class="on">5</li> </ul> </div> </body> </html> A 'working' example: http://72.14.186.218/~alex/motion.php There are two problems: while it works just fine in FF, IE and Chrome do not create the table if the page is refreshed. If you go back to directory root and click on the link to the file the grid table is displayed, if you hit 'refresh' button -- the script runs but the table is not injected. Secondly, although the table HTML is injected in IE, it does not display it. I tried adding nbsp's to make sure its not ignored -- to no avail. Any suggestions on improving code or help with the issues is appreciated. Thanks!

    Read the article

  • need prefuse graph edges like arrows

    - by merve
    Hello, I did my homework and searched both google for a sample and a topic that is answered before on stackoverflow. But nothing has been found. My problem is ordinary edges who does not have a view like arrows. Here is what i do to hope there is forward arrows from target to destination: LabelRenderer nameLabel = new LabelRenderer("name"); nameLabel.setRoundedCorner(8, 8); DefaultRendererFactory rendererFactory = new DefaultRendererFactory(nameLabel); EdgeRenderer edgeRenderer; edgeRenderer = new EdgeRenderer(prefuse.Constants.EDGE_TYPE_LINE, prefuse.Constants.EDGE_ARROW_FORWARD); rendererFactory.setDefaultEdgeRenderer(edgeRenderer); vis.setRendererFactory(rendererFactory); Here is what i see about colour of edges, hoping these must not be transparent: int[] palette = new int[]{ColorLib.rgb(255, 180, 180), ColorLib.rgb(190, 190, 255)}; DataColorAction fill = new DataColorAction("socialnet.nodes", "gender", Constants.NOMINAL, VisualItem.FILLCOLOR, palette); ColorAction text = new ColorAction("socialnet.nodes", VisualItem.TEXTCOLOR, ColorLib.gray(0)); ColorAction edges = new ColorAction("socialnet.edges", VisualItem.STROKECOLOR, ColorLib.gray(200)); ColorAction arrow = new ColorAction("socialnet.edges", VisualItem.FILLCOLOR, ColorLib.gray(200)); ActionList colour = new ActionList(); colour.add(fill); colour.add(text); colour.add(edges); colour.add(arrow); vis.putAction("colour", colour); Thus, i wonder where am i wrong? Why my edges do not seem like arrows? Thanks for any idea. For more detail, i want to paste all of the code: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package prefusedeneme; import javax.swing.JFrame; import prefuse.data.*; import prefuse.data.io.*; import prefuse.Display; import prefuse.Visualization; import prefuse.render.*; import prefuse.util.*; import prefuse.action.assignment.*; import prefuse.Constants; import prefuse.visual.*; import prefuse.action.*; import prefuse.activity.*; import prefuse.action.layout.graph.*; import prefuse.controls.*; import prefuse.data.expression.Predicate; import prefuse.data.expression.parser.ExpressionParser; public class SocialNetworkVis { public static void main(String argv[]) { // 1. Load the data Graph graph = null; /* graph will contain the core data */ try { graph = new GraphMLReader().readGraph("socialnet.xml"); /* load the data from an XML file */ } catch (DataIOException e) { e.printStackTrace(); System.err.println("Error loading graph. Exiting..."); System.exit(1); } // 2. prepare the visualization Visualization vis = new Visualization(); /* vis is the main object that will run the visualization */ vis.add("socialnet", graph); /* add our data to the visualization */ // 3. setup the renderers and the render factory // labels for name LabelRenderer nameLabel = new LabelRenderer("name"); nameLabel.setRoundedCorner(8, 8); /* nameLabel decribes how to draw the data elements labeled as "name" */ // create the render factory DefaultRendererFactory rendererFactory = new DefaultRendererFactory(nameLabel); EdgeRenderer edgeRenderer; edgeRenderer = new EdgeRenderer(prefuse.Constants.EDGE_TYPE_LINE, prefuse.Constants.EDGE_ARROW_FORWARD); rendererFactory.setDefaultEdgeRenderer(edgeRenderer); vis.setRendererFactory(rendererFactory); // 4. process the actions // colour palette for nominal data type int[] palette = new int[]{ColorLib.rgb(255, 180, 180), ColorLib.rgb(190, 190, 255)}; /* ColorLib.rgb converts the colour values to integers */ // map data to colours in the palette DataColorAction fill = new DataColorAction("socialnet.nodes", "gender", Constants.NOMINAL, VisualItem.FILLCOLOR, palette); /* fill describes what colour to draw the graph based on a portion of the data */ // node text ColorAction text = new ColorAction("socialnet.nodes", VisualItem.TEXTCOLOR, ColorLib.gray(0)); /* text describes what colour to draw the text */ // edge ColorAction edges = new ColorAction("socialnet.edges", VisualItem.STROKECOLOR, ColorLib.gray(200)); ColorAction arrow = new ColorAction("socialnet.edges", VisualItem.FILLCOLOR, ColorLib.gray(200)); /* edge describes what colour to draw the edges */ // combine the colour assignments into an action list ActionList colour = new ActionList(); colour.add(fill); colour.add(text); colour.add(edges); colour.add(arrow); vis.putAction("colour", colour); /* add the colour actions to the visualization */ // create a separate action list for the layout ActionList layout = new ActionList(Activity.INFINITY); layout.add(new ForceDirectedLayout("socialnet")); /* use a force-directed graph layout with default parameters */ layout.add(new RepaintAction()); /* repaint after each movement of the graph nodes */ vis.putAction("layout", layout); /* add the laout actions to the visualization */ // 5. add interactive controls for visualization Display display = new Display(vis); display.setSize(700, 700); display.pan(350, 350); // pan to the middle display.addControlListener(new DragControl()); /* allow items to be dragged around */ display.addControlListener(new PanControl()); /* allow the display to be panned (moved left/right, up/down) (left-drag)*/ display.addControlListener(new ZoomControl()); /* allow the display to be zoomed (right-drag) */ // 6. launch the visualizer in a JFrame JFrame frame = new JFrame("prefuse tutorial: socialnet"); /* frame is the main window */ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(display); /* add the display (which holds the visualization) to the window */ frame.pack(); frame.setVisible(true); /* start the visualization working */ vis.run("colour"); vis.run("layout"); } }

    Read the article

  • Grid overlayed on image using javascript, need help getting grid coordinates.

    - by Alos
    Hi I am fairly new to javascript and could use some help, I am trying to overlay a grid on top of an image and then be able to have the user click on the grid and get the grid coordinate from the box that the user clicked. I have been working with the code from the following stackoverflow question: Creating a grid overlay over image. link text Here is the code that I have so far: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> </script> <script type="text/javascript"> var SetGrid = function(el, sz, nr, nc){ //get number of rows/columns according to the 'grid' size //numcols = el.getSize().x/sz; //numrows = el.getSize().y/sz; numcols = 48; numrows = 32; //create table element for injecting cols/rows var gridTable = new Element('table', { 'id' : 'gridTable', 'styles' : { 'width' : el.getSize().x, 'height' : el.getSize().y, 'top' : el.getCoordinates().top, 'left' : el.getCoordinates().left } }); //inject rows/cols into gridTable for (row = 1; row<=numrows; row++){ thisRow = new Element('tr', { 'id' : row, 'class' : 'gridRow' }); for(col = 1; col<=numcols; col++){ thisCol = new Element('td', { 'id' : col, 'class' : 'gridCol0' }); //each cell gets down/up over event... down starts dragging|up stops|over draws area if down was fired thisCol.addEvents({ 'mousedown' : function(){ dragFlag = true; startRow = this.getParent().get('id'); startCol = this.get('id'); }, 'mouseup' : function(){ dragFlag = false; }, 'mouseover' : function(){ if (dragFlag==true){ this.set('class', 'gridCol'+$$('#lvlSelect .on').get('value')); } }, 'click' : function(){ //this.set('class', 'gridCol'+$$('#lvlSelect .on').get('id').substr(3, 1) ); str = $$('#lvlSelect .on').get('id'); alert(str.substr(2, 3)); } }); thisCol.inject(thisRow, 'bottom'); }; thisRow.inject(gridTable, 'bottom'); }; gridTable.inject(el.getParent()); } //sens level selector func var SetSensitivitySelector = function(el, sz, nr, nc){ $$('#lvlSelect ul li').each(function(el){ el.addEvents({ 'click' : function(){ $$('#lvlSelect ul li').set('class', ''); this.set('class', 'on'); }, 'mouseover' : function(){ el.setStyle('cursor','pointer'); }, 'mouseout' : function(){ el.setStyle('cursor',''); } }); }); } //execute window.addEvent('load', function(){ SetGrid($('imagetomap'), 32); SetSensitivitySelector(); }); var gridSize = { x: 48, y: 32 }; var img = document.getElementById('imagetomap'); img.onclick = function(e) { if (!e) e = window.event; alert(Math.floor(e.offsetX/ gridSize.x) + ', ' + Math.floor(e.offsetY / gridSize.y)); } </script> <style> #imagetomapdiv { float:left; display: block; } #gridTable { border:1px solid red; border-collapse:collapse; position:absolute; z-index:5; } #gridTable td { opacity:0.2; filter:alpha(opacity=20); } #gridTable .gridCol0 { border:1px solid gray; background-color: none; } #gridTable .gridCol1 { border:1px solid gray; background-color: green; } #gridTable .gridCol2 { border:1px solid gray; background-color: blue; } #gridTable .gridCol3 { border:1px solid gray; background-color: yellow; } #gridTable .gridCol4 { border:1px solid gray; background-color: orange; } #gridTable .gridCol5 { border:1px solid gray; background-color: red; } #lvlSelect ul {float: left; display:block; position:relative; margin-left: 20px; padding: 10px; } #lvlSelect ul li { width:40px; text-align:center; display:block; border:1px solid black; position:relative; padding: 10px; list-style:none; opacity:0.2; filter:alpha(opacity=20); } #lvlSelect ul li.on { opacity:1; filter:alpha(opacity=100); } #lvlSelect ul #li0 { background-color: none; } #lvlSelect ul #li1 { background-color: green; } #lvlSelect ul #li2 { background-color: blue; } #lvlSelect ul #li3 { background-color: yellow; } #lvlSelect ul #li4 { background-color: orange; } #lvlSelect ul #li5 { background-color: red; } </style> </div> <div id="lvlSelect"> <ul> <li value="0" id="li0">0</li> <li value="1" id="li1">1</li> <li value="2" id="li2">2</li> <li value="3" id="li3">3</li> <li value="4" id="li4">4</li> <li value="5" id="li5" class="on">5</li> </ul> </div> In this example the grid box changes color when the image is grid box is clicked, but I would like to be able to have the coordinates of the box. Any help would be great. Thank you

    Read the article

  • block z-positioning without z-index

    - by Peter
    Please, have a look at: http://twitter.github.com/bootstrap/base-css.html There are many examples like this one: if you look closer to the block borders, you can see that the gray block is under the white one. Using the browser's developer tools you can see that both boxes have an inherited z-index: auto; I can't reproduce this effect on my website (without using z-index). So, my question is: Why is the gray block under the white one?

    Read the article

  • How do I set the text color of a Cocoa tooltip?

    - by Adam Preble
    I am using BGHUDAppKit for an outline view within a HUD-style (black) NSPanel. As such the text in my outline view cells is light gray or white. Unfortunately this means that when I hover to bring up a tooltip for a cell's value, it shows up as light gray text on yellow, which is illegible. How can I set the text color for the tooltip, or is there a way that I can modify the control itself (without changing its appearance) to work better with the tooltip mechanism?

    Read the article

  • Set Round Border of an android TextView already having a background color

    - by vaibhav
    I want a TextView to have a rounded border. This can be done by using a drawable, specifying a shape in the drawable, and then using the drawable as the background of the TextView. android:background="@layout/border" Also shown here However, my TextView already has a background color (which is gray) and thus I'm unable to use the above method to set a rounded border. Is there any other method to do this which allows the background color of the TextView to remain gray and also surrounds it with a rounded border?

    Read the article

  • Functions connected to signals in QtScript (on Qt 4.5.2) are not firing

    - by Cody Brocious
    I've injected into a proprietary Qt (4.5.2) application, added my own compatible build of QtScript, and have managed to get access to all the signals I need. However, when connecting to them (via QtScript) my functions are never called. I've come up with a few theories for why this is and I've tested everything I can think of, but I've hit a bit of a wall. Note, I've never had any connection exceptions whatsoever. Here are my current theories: The signals I'm connecting to are already connected to other slots, and that's somehow blocking it (but as far as I know, all Qt signals fire to all slots with no extra work, and can't be restricted in this way) The signals are rejecting my connection, or disconnecting me after connection (but I see no facility for this) My connection is happening from another thread, and this is somehow causing it not to connect properly Are any of these theories plausible? If not, what have I missed?

    Read the article

  • RIA Services vs ADO.NET Data Services

    - by Cody C
    I'm currently in the process of creating a Silverlight 3 data driven application. To access the database, 2 common approaches are used: RIA Services and ADO.NET Data Services. Does anyone have any guidance on when/why to choose each approach? Here is what I've gathered from my research / experience. Any thoughts? ADO.NET seems to be only useful for strictly database calls. If you need to expose the data services to other applications (ignoring Silverlight 3's domain restriction), this is a good approach. Also, if the URL/Query syntax can be useful in your application, this is another advantage RIA Services seem to be a more flexible, accepted framework. It seems to give you more than strictly database access. It does have a limitation of only being used for the Silverlight / Web application as it is not exposed via a service. Thoughts? Ideas? Comments?

    Read the article

  • How can I change the images on an ImageButton in Android when using a OnTouchListener?

    - by Cody
    I have the following code which creates an ImageButton and plays a sound when clicked: ImageButton SoundButton1 = (ImageButton)findViewById(R.id.sound1); SoundButton1.setImageResource(R.drawable.my_button); SoundButton1.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN ) { mSoundManager.playSound(1); return true; } return false; } }); The problem is that I want the image on the ImageButton to change when you press it. The OnTouchListener appears to be overriding the touch and not allowing the images to change. As soon as I remove the OnTouchListener, the ImageButton swaps to a different image when pressed. Any ideas on how I can have the images change on the ImageButton while still using the OnTouchListener? Thank you very much!

    Read the article

  • Initializing links in jqtouch in AJAX loaded content

    - by Cody Caughlan
    I have an iphone web app built in jqtouch, when content is loaded by links ("a" tags) then any content on the next page is parsed by jqtouch and any links are initialized. However, when I load content via an AJAX call and append() it to an element then any links in that content are NOT initialized by jqtouch. Thus any clicks on those links are full-blown clicks to a new resource and are not handled by jqtouch, so at that point you've effectively broken out of jqtouch. My AJAX code is: #data <script type="text/javascript"> $.ajax({ url: '/mobile/nearby-accounts', type: 'GET', dataType: 'html', data: {lat: lat, lng: lng}, success: function(html) { $('#data').empty().append(html); // Is there some method I call on jqtouch to have any links in $('#data') be hooked up to the jqtouch lifecycle? } </script> Thanks in advance.

    Read the article

  • Switching to landscape mode in Android Emulator

    - by Cody
    This is probably a pretty easy to answer question, but I can't find the solution myself after a couple hours of searching the documentation and Google. I set the orientation of my Android app to landscape in the AndroidManifest.xml file: android:screenOrientation="landscape" However, when I run the app in the simulator, it appears sideways and in portrait mode. How can I switch the emulator to landscape mode on a mac? It's running the 1.6 SDK. Thanks!

    Read the article

  • didSelectRowAtIndexPath TableView Popover Issue

    - by Jack Cody
    I've tried a lot of different code examples including just brute force try this try that but, stumped. The popover left arrow seems to display just fine if the first row is displayed at the very top of the table view but, when the table scrolls down the popover left arrow doesn't align correctly with the table row selected. Solutions or suggestions would be most appreciated. CGRect myFrame = [tableView rectForRowAtIndexPath:indexPath]; [self.editViewPopoverController setPopoverContentSize:CGSizeMake(320, 400)]; [self.editViewPopoverController presentPopoverFromRect:CGRectMake(myFrame.origin.x, myFrame.origin.y + offset, 400, 0) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES]; Thanks.

    Read the article

  • Finding the last focused element with jQuery.

    - by Joshua Cody
    I'm looking to determine which element had the last focus in a series of inputs, that are added dynamically by the user. This code can only get the inputs that are available on page load: $('input.item').focus(function(){ $(this).siblings('ul').slideDown(); }); And this code sees all elements that have ever had focus: $('input.item').live('focus', function(){ $(this).siblings('ul').slideDown(); }); The HTML structure is this: <ul> <li><input class="item" name="goals[]"> <ul> <li>long list here</li> <li>long list here</li> <li>long list here</li> </ul></li> </ul> <a href="#" id="add">Add another</a> On page load, a single input loads. Then with each add another, a new copy of the top unordered list's contents are made and appended. And when each gets focus, I'd like to show the list beneath it. But I don't seem to be able to "watch for the most recently focused element, which exists now or in the future." Do I have some sort of fundamental assumption wrong?

    Read the article

  • Map /dev/bus/usb node to /sys node on Linux

    - by Cody Brocious
    I'm using libusb to find and access a USB device, but once I get the information I need from there, I need to map it to a /sys node. This could be to the actual USB bus it's on, the /sys/bus/usb-serial node (which is where I'm going to get eventually), or effectively anywhere else since I can walk the tree from there. I can get to a /dev/bus/usb node easily enough, but I'm a bit lost from there. What would be the best route to perform this mapping?

    Read the article

  • Scheme Infix to Postfix

    - by Cody
    Let me establish that this is part of a class assignment, so I'm definitely not looking for a complete code answer. Essentially we need to write a converter in Scheme that takes a list representing a mathematical equation in infix format and then output a list with the equation in postfix format. We've been provided with the algorithm to do so, simple enough. The issue is that there is a restriction against using any of the available imperative language features. I can't figure out how to do this in a purely functional manner. This is our fist introduction to functional programming in my program. I know I'm going to be using recursion to iterate over the list of items in the infix expression like such. (define (itp ifExpr) ( ; do some processing using cond statement (itp (cdr ifExpr)) )) I have all of the processing implemented (at least as best I can without knowing how to do the rest) but the algorithm I'm using to implement this requires that operators be pushed onto a stack and used later. My question is how do I implement a stack in this function that is available to all of the recursive calls as well?

    Read the article

  • Using a checkbox input on a form to send the form data to different email addresses

    - by Cody Thomas
    I am building a form for a client. Here is the rundown. The form will be used as a request to have a staff member contact the person filling out the form. However, there is a list of staff members that will contact them depending on what the subject matter is. So, I want to create a checkbox input section on the form with each staff person's email address attached to a corresponding checkbox. So, the person filling out the form can check only the staff people necessary for their needs. Finally, when the person clicks "submit", the form will be emailed to only the staff members who were checked in the form. I'm at a loss of how to set this up.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >