Search Results

Search found 519 results on 21 pages for 'william hu'.

Page 15/21 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Problem with SQL query

    - by William
    Here's the query INSERT INTO test_bans( ip, Expiration ) VALUES ( "0.0.0.0", DateAdd( "d", 1, Date( ) ) ) Here's the table creation query CREATE TABLE test_bans ( ID smallint(6) NOT NULL AUTO_INCREMENT, IP text NOT NULL, Expiration DATETIME NOT NULL, PRIMARY KEY (ID) ) TYPE=MyISAM; And here's the error #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')))' at line 1 Please help.

    Read the article

  • Align jQuery List

    - by William Lewis
    I'm creating a mobile website with jQuery, and I was wondering if there was a way to align a list to the bottom of a page, I just want the list to stay at the very bottom of the page, and be fixed in the spot. Thanks This is the list im trying to get fixed on the bottom of the page: <div data-role="content"> <div class="content-primary"> <ul data-role="listview"> <li><a href="link.html"><img src="file.jpg" /><h3>List name</h3></a> </li> </div>

    Read the article

  • Initializing a value through a Session variable

    - by William Calleja
    I need to Initialize a value in a Javascript by using a c# literal that makes reference to a Session Variable. I am using the following code <script type="text/javascript" language="javascript" > var myIndex = <%= !((Session["myIndex"]).Equals(null)||(Session["myIndex"]).Equals("")) ? Session["backgroundIndex"] : "1" %>; However the code above is giving me a classic Object reference not set to an instance of an object. error. Why? Shouldn't (Session["myIndex"]).Equals(null) capture this particular error?

    Read the article

  • How can I use Action Script 3.0 to make random placed Symbols fly by?

    - by William Calleja
    I'm trying to make a simple animation with Flash CS4 and Action Script 3.0 to make a number of Symbols fly by from right to left constantly. What I want is that once a symbol has reached the end of the screen it is destroyed and another one is placed at the start position. I intend to give each symbol a random speed and create a random symbol each time one is 'destroyed'. Any clues where I can start?

    Read the article

  • Django url rewrites and passing a parameter from Javascript

    - by William T Wild
    As a bit of a followup question to my previous , I need to pass a parameter to a view. This parameter is not known until the JS executes. In my URLConf: url(r'^person/device/program/oneday/(?P<meter_id>\d+)/(?P<day_of_the_week>\w+)/$', therm_control.Get_One_Day_Of_Current_Thermostat_Schedule.as_view(), name="one-day-url"), I can pass it this URL and it works great! ( thanks to you guys). http://127.0.0.1:8000/personview/person/device/program/oneday/149778/Monday/ In My template I have this: var one_day_url = "{% url personview:one-day-url meter_id=meter_id day_of_the_week='Monday' %}"; In my javascript: $.ajax({ type: 'GET', url: one_day_url , dataType: "json", timeout: 30000, beforeSend: beforeSendCallback, success: successCallback, error: errorCallback, complete: completeCallback }); When this triggers it works fine except I dont necessarily want Monday all the time. If I change the javascript to this: var one_day_url = "{% url personview:one-day-url meter_id=meter_id %}"; and then $.ajax({ type: 'GET', url: one_day_url + '/Monday/', dataType: "json", timeout: 30000, beforeSend: beforeSendCallback, success: successCallback, error: errorCallback, complete: completeCallback }); I get the Caught NoReverseMatch while rendering error. I assume because the URLconf still wants to rewrite to include the ?P\w+) . I seems like if I change the URL conf that breaks the abailty to find the view , and if I do what I do above it gives me the NoREverseMatch error. Any guidance would be appreciated.

    Read the article

  • Entity Framework 4 and Public Properties

    - by William
    I am working on a project and I am using Entity Framework 4 as my ORM. I am implementing POCO classes. Every example I see with EF 4 and POCOs implements all properties with public setters. Is that the only way I can use POCO classes with EF 4? Do all my setters need to be public?

    Read the article

  • Error #1064 in mySQL Query

    - by William
    I get the following error in the query below: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')))' at line 1 Code Snippet: INSERT INTO test_bans( ip, Expiration ) VALUES ( "0.0.0.0", DateAdd( "d", 1, Date( ) ) ) Table creation query CREATE TABLE test_bans ( ID smallint(6) NOT NULL AUTO_INCREMENT, IP text NOT NULL, Expiration DATETIME NOT NULL, PRIMARY KEY (ID) ) TYPE=MyISAM; What am I missing?

    Read the article

  • How to use window.location.replace javascript?

    - by william
    My URLs http://www.mysite.com/folder1/page1.aspx http://www.mysite.com/folder1/page1.aspx?id=1 http://www.mysite.com/folder1/page1.aspx?id=1&dt=20111128 Redirecting Page http://www.mysite.com/folder1/page2.aspx I want to redirect from page1.aspx to page2.aspx How to write a javascript in page1.aspx? window.location.replace("/page2.aspx"); window.location.replace("../page2.aspx"); window.location.replace("~/page2.aspx"); First 2 gave me this. http://www.mysite.com/page2.aspx Last 1 gave me this. http://www.mysite.com/folder1/~/page2.aspx What is the correct way to use?

    Read the article

  • PHP - ftp_get only works once

    - by William
    I'm connecting to an ftp server that I have no control over, and I'm pretty sure is using something old and outdated due to other issues I've run into. I'm simply using this code in a loop to get all the files in a directory. ftp_put($this->conn_id, $remote, $local, FTP_ASCII); The first time all goes well, but after that I get this error thrown for each file I try to get: "There is already an active transaction" I've tried both passive & active with no luck. It's the exact same code I use to connect to other FTP servers and get files with no problem. Any ideas? I suppose my last resort could be disconnecting and reconnecting for each file, but that seems like a huge waste.

    Read the article

  • port an iOS (iPhone) app to mac?

    - by William Jockusch
    Is there a preferred way to go about this? The app in question is not too large . . . single-player game that I wrote over the course of a couple of months. EDIT: I should add that I have no experience with mac development . . . outside of what comes naturally with being an iOS developer. EDIT: Classes heavily used in the game: subclasses of NSObject, UIView, and UIViewController. I don't know much about NSView, but I'm pretty sure all the UIView stuff will work in that class. Also some use of UITableViewController. I do also have Game Center, but I can leave that part out for now. There is no multi-touch.

    Read the article

  • Whats wrong with my CSS?

    - by William
    I'm trying to get my name and trip input fields to line, but they're all over the place. http://prime.programming-designs.com/test_forum/viewboard.php?board=0 #formdiv{ margin: auto; text-align: left; width: 30%; } .fielddiv1{ background-color: #222222; border: 2px solid #333333; vertical-align: middle; width: 45%; float: left; } .fielddiv2{ background-color: #222222; border: 2px solid #333333; vertical-align: middle; width: 100%; } .fieldtext{ width: 100%; background-color: #333333; }

    Read the article

  • Why does Ubuntu only detect one USB LAN adapters at a time?

    - by EGO
    I try to connect real switch with my computer for an exam preparation, for this purpose I need more than one LAN cards, and there is only one built in LAN card in my computer. So, to get more LAN cards, I bought 4 USB Ethernet adapters (as I have 4 usb ports in may laptop 2 usb 2.0 ports, 2 usb 3.0 ports). When I plug these adapters in my computer Ubuntu only detects one LAN card from 2.0 usb ports, and one LAN card from 3.0 ports. And sometimes detects only one USB LAN from all the usb ports. Actually the real problem is Ubuntu shows these USB LAN adapters in the "lsusb", but does not list them in "ifconfig". Kontron (Industrial Computer Source / ICS Advent) is my LAN USB ethernet. abc@ubuntu:~$ lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hu Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hu Bus 002 Device 012: ID 0fe6:9700 Kontron (Industrial Computer Source / ICS Advent) Bus 001 Device 003: ID 138a:0018 Validity Sensors, Inc. Bus 001 Device 004: ID 064e:e258 Suyin Corp. Bus 003 Device 011: ID 0fe6:9700 Kontron (Industrial Computer Source / ICS Advent) Bus 002 Device 013: ID 0fe6:9700 Kontron (Industrial Computer Source / ICS Advent) Bus 003 Device 012: ID 0fe6:9700 Kontron (Industrial Computer Source / ICS Advent) Bus 002 Device 005: ID 0a5c:21b4 Broadcom Corp. BCM2070 Bluetooth 2.1 + EDR -- etho is my built in LAN card, while eth1 is the only USB LAN card that ubuntu has detected. abc@ubuntu:~$ ifconfig eth0 Link encap:Ethernet HWaddr 2c:27:d7:a5:d2:39 inet6 addr: fe80::2e27:d7ff:fea5:d239/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:21056 errors:0 dropped:1 overruns:0 frame:0 TX packets:5669 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1407289 (1.4 MB) TX bytes:372566 (372.5 KB) Interrupt:49 Base address:0xa000 eth1 Link encap:Ethernet HWaddr 00:e0:4c:53:44:58 inet6 addr: fe80::2e0:4cff:fe53:4458/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:9230 errors:0 dropped:0 overruns:0 frame:0 TX packets:9230 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:557648 (557.6 KB) TX bytes:557648 (557.6 KB) wlan0 Link encap:Ethernet HWaddr cc:52:af:5e:78:05 inet addr:192.168.1.65 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::ce52:afff:fe5e:7805/64 Scope:LinkU UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:17389 errors:0 dropped:0 overruns:0 frame:0 TX packets:12231 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:22452248 (22.4 MB) TX bytes:1502750 (1.5 MB) If I unplug the USB LAN card which Ubuntu has detected, then Ubuntu will detect a USB LAN card from the remaining plugged adapters, and process go on untill I plug all the USB LAN adapters. Looking for some urgent help. Thanks

    Read the article

  • WPF RadioButton selected in UI, but seen by code as IsChecked == false

    - by Mike
    I have some radio buttons in a group box. I select the buttons randomly, and all works perfectly from a visual standpoint and also the event handler is called each time a new button is selected. Now I have a dependency property with a callback when the value changes. When in this callback procedure I read the IsChecked value of any button, the value is False, in spite the button is visually selected (they are all false at the same time, strange). The debugger also displays all buttons unchecked. Hu hu, I'm lacking ideas about the reason, after the basic verifications... <GroupBox> <StackPanel> <RadioButton x:Name="btNone" Content="Disconnected" IsChecked="True" Checked="OnSelChecked"/> <RadioButton x:Name="btManual" Content="Manual" Checked="OnSelChecked"/> </StackPanel> </GroupBox> Event handler: private void OnSelChecked(object sender, RoutedEventArgs e) { if (btManual.IsChecked == true) { // is called } } Dependency property: public static readonly DependencyProperty ManualProperty = DependencyProperty.Register("Manual", typeof(Position), typeof(SwitchBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender, new PropertyChangedCallback(OnManualChanged))); Dependency property callback: private static void OnManualChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { SwitchBox box = sender as SwitchBox; if (box.btManual.IsChecked == true) { // never true, why?? } }

    Read the article

  • Hashing Function for Map C++

    - by Josh
    I am trying to determine a hash function which takes an input (i, k) and determines a unique solution. The possible inputs for (i, k) range from 0 to 100. Consider each (i, k) as a position of a node in a trinomial tree. Ex: (0, 0) can diverge to (1, 1) (1, 0) (1, -1). (1, 1) can diverge to (2, 2) (2, 1) (2, 0). Sample given here: http://www.google.com/imgres?imgurl=http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/stfhtmlimg1156.gif&imgrefurl=http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/stfhtmlnode41.html&h=413&w=416&sz=4&tbnid=OegDZu-yeVitZM:&tbnh=90&tbnw=91&zoom=1&usg=__9uQWDNYNLV14YioWWbrqPgfa3DQ=&docid=2hhitNyRWjI_DM&hl=en&sa=X&ei=xAfFUIbyG8nzyAHv2YDICg&ved=0CDsQ9QEwAQ I am using a map map <double, double> hash_table I need a key value to be determined from pairs (i, k) to hash to to value for that (i, k) So far I was only able to come up with linear functions such as: double Hash_function(int i, int k) { //double val = pow(i, k) + i; //return (val % 4294967296); return (i*3.1415 + k*i*9.12341); } However, I cannot determine a unique key with a certain (i, k). What kind of functions can I use to help me do so?

    Read the article

  • Silverlight Cream for January 15, 2011 -- #1028

    - by Dave Campbell
    Note to #1024 Swag Winners: I'm sending emails to the vendors Sunday night, thanks for your patience (a few of you have not contacted me yet) In this Issue: Ezequiel Jadib, Daniel Egan(-2-), Page Brooks, Jason Zander, Andrej Tozon, Marlon Grech, Jonathan van de Veen, Walt Ritscher, Jesse Liberty, Jeremy Likness, Sacha Barber, William E. Burrows, and WindowsPhoneGeek. Above the Fold: Silverlight: "Building a Radar Control in Silverlight - Part 1" Page Brooks WP7: "Tutorial: Dynamic Tile Push Notification for Windows Phone 7" Jason Zander Training: "WP7 Unleashed Session I–Hands on Labs" Daniel Egan From SilverlightCream.com: Silverlight Rough Cut Editor SP1 Released Ezequiel Jadib has an announcement about the Rough Cut Editor SP1 release, and he walks you through the content, installation and a bit of the initial use. WP7 Unleashed Session I–Hands on Labs Daniel Egan posted Part 1 of 3 of a new WP7 HOL ... video online and material to download... get 'em while they're hot! WP7 Saving to Media Library Daniel Egan has another post up as well on saving an image to the media library... not the update from Tim Heuer... all good info Building a Radar Control in Silverlight - Part 1 This freakin' cool post from Page Brooks is the first one of a series on building a 'Radar Control' in Silverlight ... seriously, go to the bottom and run the demo... I pretty much guarantee you'll take the next link which is download the code... don't forget to read the article too! Tutorial: Dynamic Tile Push Notification for Windows Phone 7 Jason Zander has a nice-looking tutorial up on dynamic tile notifications... good diagrams and discussion and plenty of code. Reactive.buffering.from event. Andrej Tozon is continuing his Reactive Extensions posts with this one on buffering: BufferWithTime and BufferWIthCount ... good stuff, good write-up, and the start of a WP7 game? MEFedMVVM with PRISM 4 Marlon Grech combines his MEFedMVVM with Prism 4, and says it was easy... check out the post and the code. Adventures while building a Silverlight Enterprise application part #40 Jonathan van de Veen has a discussion up about things you need to pay attention to as your project gets close to first deployment... lots of good information to think about Silverlight or not. Customize Windows 7 Preview pane for XAML files Walt Ritscher has a (very easy) XAML extension for Windows 7 that allows previewing of XAML files in an explorer window... as our UK friends say "Brilliant!" Entity Framework Code-First, oData & Windows Phone Client From the never-ending stream of posts that is Jesse Liberty comes this one on EF Code-First... so Jesse's describing Code-First and OData all wrapped up about a WP7 app Sterling Silverlight and Windows Phone 7 Database Triggers and Auto-Identity Sterling and Database Triggers sitting in a tree... woot for WP7 from Jeremy Likness... provides database solutions including Validation, Data-specific concerns such as 'last modified', and post-save processing ... all good, Jeremy! A Look At Fluent APIs Sacha Barber has a great post up that isn't necessarily Silverlight, but is it? ... we've been hearing a lot about Fluent APIs... read on to see what the buzz is. Windows Phone 7 - Part 3 - Final Application William E. Burrows has Part 3 of his WP7 tutorial series up... this one completing the Golf Handicap app by giving the user the ability to manage scores. User Control vs Custom Control in Silverlight for WP7 WindowsPhoneGeek has a great diagram and description-filled post up on User Controls and Custom Controls in WP7... good external links too. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Linq IQueryable variables

    - by kevinw
    Hi i have a function that should return me a string but what is is doing is bringing me back the sql expression that i am using on the database what have i done wrong public static IQueryable XMLtoProcess(string strConnection) { Datalayer.HameserveDataContext db = new HameserveDataContext(strConnection); var xml = from x in db.JobImports where x.Processed == false select new { x.Content }; return xml; } this is the code sample this is what i should be getting back <PMZEDITRI TRI_TXNNO="11127" TRI_TXNSEQ="1" TRI_CODE="600" TRI_SUBTYPE="1" TRI_STATUS="Busy" TRI_CRDATE="2008-02-25T00:00:00.0000000-00:00" TRI_CRTIME="54540" TRI_PRTIME="0" TRI_BATCH="" TRI_REF="" TRI_CPY="main" C1="DEPL" C2="007311856/001" C3="14:55" C4="CUB2201" C5="MR WILLIAM HOGG" C6="CS12085393" C7="CS" C8="Blocked drain" C9="Scheme: CIS Home Rescue edi tests" C10="MR WILLIAM HOGG" C11="74 CROMARTY" C12="OUSTON" C13="CHESTER LE STREET" C14="COUNTY DURHAM" C15="" C16="DH2 1JY" C17="" C18="" C19="" C20="" C21="CIS" C22="0018586965 ||" C23="BD" C24="W/DE/BD" C25="EX-DIRECTORY" C26="" C27="/" C28="CIS Home Rescue" C29="CIS Home Rescue Plus Insd" C30="Homeserve Claims Management Ltd|Upon successful completion of this repair the contractor must submit an itemised and costed Homeserve Claims Management Ltd Job Sheet." N1="79.9000" N2="68.0000" N3="11.9000" N4="0" N5="0" N6="0" D1="2008-02-25T00:00:00.0000000-00:00" T2="EX-DIRECTORY" T4="Blocked drain" TRI_SYSID="9" TRI_RETRY="3" TRI_RETRYTIME="0" /> can anyone help me please

    Read the article

  • Parsing xml with php and xpath

    - by Hyung Suh
    Hey guys, I'm trying to parse an xml file to return a item with a specific id only, but having trouble making it work. here's what I have in php $xml_str = file_get_contents("test.xml"); $xml = simplexml_load_string($xml_str); $albid = $_GET['id']; $nodes = $xml->xpath('//library/book[@id=1]'); foreach($nodes as $node) { echo $node['title'].'<br/>'; } First, the php is not returning anything from the xml file. What would I need to fix to return the data? Also, how would I enter $albid into the xpath so that the id will be retrieved from the link? Any pointers in the right direction would be appreciated. Thanks! --and here's the sample xml file-- <library> <book id="1"> <title>PHP and MySQL</title> <author fname="miguel" lname="alvarez">Miguel Alvarez</author> </book> <book id="2"> <title>JAVA 123</title> <author fname="william" lname="vega">WIlliam Vega</author> </book>

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21  | Next Page >