Search Results

Search found 215 results on 9 pages for 'lg'.

Page 2/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • How do you get the language from a session in Joomla?

    - by Moak
    I have some code that sets the lang var to the site default language. $lg = &JFactory::getLanguage(); $lg = explode('-',$lg->_default); $dlg = $lg[0]; if(!JRequest::getWord('lang', false )) JRequest::setVar('lang', $dlg ); however before setting it to $dlg I would like to find out if the language is stored in the user information or session. Can someone tell me how to check the session for language information?

    Read the article

  • xen debian: domU can't get out side

    - by iftol
    hi every body. i'm a trainee as a sysAdmin, it is my first expérience with virtualization. i have a server setup debian xen 3 with 2 physical interfaces. eth 0 for local network 10.0.0.1 and eth1 for internet (194.X.X.4). i created 3 VMs (web server, mail server and dabase server) with local ip addresses 172.10.0.x/24. the problem i had first is that domU can't ping dom0. i asked the sysAdmin of our ISP and he sais that he fogot to setup the bridginb. so he ceated a bridge with 172.10.0.1/24 after that i was able to ping the real server (194.X.X.4). but i can't go out side from my VMs, how can i fixe this issue? real or physical server ifconfig eth0 Link encap:Ethernet HWaddr 23:26:34:84:ce:xe inet adr:10.1.3.12 Bcast:10.1.3.255 Masque:255.255.255.0 adr inet6: fe80::226:b9ff:fe84:ceb4/64 Scope:Lien UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:412006 errors:0 dropped:0 overruns:0 frame:0 TX packets:411296 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000 RX bytes:31410957 (29.9 MiB) TX bytes:31178370 (29.7 MiB) Interruption:36 Mémoire:d6000000-d6012100 eth1 Link encap:Ethernet HWaddr 23:26:34:84:ce:xe inet adr:194.x.x.4 Bcast:194.254.167.255 Masque:255.255.255.0 adr inet6: fe80::226:b9ff:fe84:ceb6/64 Scope:Lien UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:25872332 errors:0 dropped:0 overruns:0 frame:0 TX packets:414578 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 RX bytes:2642278343 (2.4 GiB) TX bytes:35436775 (33.7 MiB) lo Link encap:Boucle locale inet adr:127.0.0.1 Masque:255.0.0.0 adr inet6: ::1/128 Scope:Hôte UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1308073 errors:0 dropped:0 overruns:0 frame:0 TX packets:1308073 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 RX bytes:109871395 (104.7 MiB) TX bytes:109871395 (104.7 MiB) peth1 Link encap:Ethernet HWaddr 23:26:34:84:ce:xe UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX packets:31818694 errors:0 dropped:0 overruns:0 frame:0 TX packets:414818 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000 RX bytes:5197318822 (4.8 GiB) TX bytes:37904897 (36.1 MiB) Interruption:48 Mémoire:d8000000-d8012100 vif281.0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff adr inet6: fe80::fcff:ffff:feff:ffff/64 Scope:Lien UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX packets:207 errors:0 dropped:0 overruns:0 frame:0 TX packets:298 errors:0 dropped:2 overruns:0 carrier:0 collisions:0 lg file transmission:32 RX bytes:24629 (24.0 KiB) TX bytes:28404 (27.7 KiB) vif281.1 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff adr inet6: fe80::fcff:ffff:feff:ffff/64 Scope:Lien UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:45 errors:0 dropped:47063 overruns:0 carrier:0 collisions:0 lg file transmission:32 RX bytes:0 (0.0 B) TX bytes:4449 (4.3 KiB) vif282.0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff adr inet6: fe80::fcff:ffff:feff:ffff/64 Scope:Lien UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX packets:78 errors:0 dropped:0 overruns:0 frame:0 TX packets:13 errors:0 dropped:1 overruns:0 carrier:0 collisions:0 lg file transmission:32 RX bytes:5041 (4.9 KiB) TX bytes:714 (714.0 B) xenbr0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff inet adr:172.10.0.1 Bcast:172.10.0.255 Masque:255.255.255.0 adr inet6: fe80::5c72:c6ff:fe49:7fe/64 Scope:Lien UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:7180 errors:0 dropped:0 overruns:0 frame:0 TX packets:8615 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 RX bytes:756804 (739.0 KiB) TX bytes:791206 (772.6 KiB) brtcl show bridge name bridge id STP enabled interfaces eth1 8000.0026b984ceb6 no peth1 vif281.1 xenbr0 8000.feffffffffff no vif281.0 vif282.0 network-multi-bridge /etc/xen/scripts/network-virtual start vifnum="0" bridgeip="172.10.0.1/24" brnet="172.10.0.0/24" VM webserver eth0 Link encap:Ethernet HWaddr 00:16:3E:42:33:70 inet addr:172.10.0.2 Bcast:172.10.0.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe42:3370/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3 errors:0 dropped:0 overruns:0 frame:0 TX packets:27 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:126 (126.0 b) TX bytes:2036 (1.9 KiB) 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:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Thank you for your help.

    Read the article

  • Python and displaying HTML

    - by Tyler Seymour
    I've gotten pretty comfortable with Python and now I'm looking to make a rudimentary web application. I was somewhat scared of Django and the other Python frameworks so I went caveman on it and decided to generate the HTML myself using another Python script. Maybe this is how you do it anyways - but I'm just figuring this stuff out. I'm really looking for a tip-off on, well, what to do next. My Python script PRINTS the HTML (is this even correct? I need it to be on a webpage!), but now what? Thanks for your continued support during my learning process. One day I will post answers! -Tyler Here's my code: from SearchPhone import SearchPhone phones = ["Iphone 3", "Iphone 4", "Iphone 5","Galaxy s3", "Galaxy s2", "LG Lucid", "LG Esteem", "HTC One S", "Droid 4", "Droid RAZR MAXX", "HTC EVO", "Galaxy Nexus", "LG Optimus 2", "LG Ignite", "Galaxy Note", "HTC Amaze", "HTC Rezound", "HTC Vivid", "HTC Rhyme", "Motorola Photon", "Motorola Milestone", "myTouch slide", "HTC Status", "Droid 3", "HTC Evo 3d", "HTC Wildfire", "LG Optimus 3d", "HTC ThunderBolt", "Incredible 2", "Kyocera Echo", "Galaxy S 4g", "HTC Inspire", "LG Optimus 2x", "Samsung Gem", "HTC Evo Shift", "Nexus S", "LG Axis", "Droid 2", "G2", "Droid x", "Droid Incredible" ] print """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>table of phones</title> </head> <body> </body> </html> """ #table print '<table width="100%" border="1">' for x in phones: y = SearchPhone(x) print "\t<tr>" print "\t\t<td>" + str(y[0]) + "</td>" print "\t\t<td>" + str(y[1]) + "</td>" print "\t\t<td>" + str(y[2]) + "</td>" print "\t\t<td>" + str(y[3]) + "</td>" print "\t\t<td>" + str(y[4]) + "</td>" print "\t</tr>" print "</table>

    Read the article

  • An alternative to reading input from Java's System.in

    - by dvanaria
    I’m working on the UVa Online Judge problem set archive as a way to practice Java, and as a way to practice data structures and algorithms in general. They give an example input file to submit to the online judge to use as a starting point (it’s the solution to problem 100). Input from the standard input stream (java.lang.System.in) is required as part of any solution on this site, but I can’t understand the implementation of reading from System.in they give in their example solution. It’s true that the input file could consist of any variation of integers, strings, etc, but every solution program requires reading basic lines of text input from System.in, one line at a time. There has to be a better (simpler and more robust) method of gathering data from the standard input stream in Java than this: public static String readLn(int maxLg) { byte lin[] = new byte[maxLg]; int lg = 0, car = -1; String line = “”; try { while (lg < maxLg) { car = System.in.read(); if ((car < 0) || (car == ‘\n’)) { break; } lin[lg++] += car; } } catch (java.io.IOException e) { return (null); } if ((car < 0) && (lg == 0)) { return (null); // eof } return (new String(lin, 0, lg)); } I’m really surprised by this. It looks like something pulled directly from K&R’s “C Programming Language” (a great book regardless), minus the access level modifer and exception handling, etc. Even though I understand the implementation, it just seems like it was written by a C programmer and bypasses most of Java’s object oriented nature. Isn’t there a better way to do this, using the StringTokenizer class or maybe using the split method of String or the java.util.regex package instead?

    Read the article

  • Generate SVG in Javascript

    - by Shadowbob
    I'm trying to load a SVG with Javascript. I did it quite often with success, but this time it has a strange return. Here is my JS var xmlns = 'http://www.w3.org/2000/svg'; var container = document.getElementById('svgContainer'); var svg = document.createElementNS(xmlns, 'svg'); svg.setAttribute('xmlns', xmlns); svg.setAttribute('version', '1.2'); var defs = document.createElementNS(xmlns, 'defs'); var lg = document.createElementNS(xmlns, 'linearGradient'); lg.setAttribute('id', 'lg'); defs.appendChild(lg); var stop1 = document.createElementNS(xmlns, 'stop'); stop1.setAttribute('offset', '0'); stop1.setAttribute('style', 'stop-color:#ffffff;stop-opacity:1'); lg.appendChild(stop1); var stop2 = document.createElementNS(xmlns, 'stop'); stop2.setAttribute('offset', '1'); stop2.setAttribute('style', 'stop-color:#000000;stop-opacity:1'); lg.appendChild(stop2); var rg = document.createElementNS(xmlns, 'radialGradient'); rg.setAttribute('cx', '171.20810'); rg.setAttribute('cy', '196.85463'); rg.setAttribute('r', '200.00000'); rg.setAttribute('fx', '171.20810'); rg.setAttribute('fy', '196.85463'); rg.setAttribute('id', 'rg'); rg.setAttribute('xlink:href', '#lg'); rg.setAttribute('gradientUnits', 'userSpaceOnUse'); rg.setAttribute('gradientTransform', 'matrix(1.040418,0.796229,-0.814518,1.064316,153.4218,-150.4353)'); defs.appendChild(rg); svg.appendChild(defs); var g = document.createElementNS (xmlns, 'g'); g.setAttribute('transform', 'scale(0.2,0.2)'); svg.appendChild(g); container.appendChild(svg); var path = document.createElementNS (xmlns, 'path'); path.setAttribute('d', 'M 450.00000 255.00000 A 200.00000 205.00000 0 1 1 50.000000,255.00000 A 200.00000 205.00000 0 1 1 450.00000 255.00000 z'); path.setAttribute('style', 'opacity:1.0000000;fill:url(#rg);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:8.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1'); g.appendChild(path); So it generates the perfect HTML DOM elements in the proper order, but it doesn't show anything. When I copy the HTML from the source and paste it, it renders the HTML but not the Javascript, but it's the exact same code. You can see the source here. The weird thing is that when I put the radialGradient in the DOM, it works. You can see it in here. So how should I do this? This problem is on all browsers. Thank you for your help.

    Read the article

  • Double Layer DVD+R burning problem - I/O Error

    - by Mehper C. Palavuzlar
    I have a modern PC (Quad Core CPU, 4 GB RAM, Win7 Home Premium 64-bit) but I have a problem with burning .dvd images to Double Layer (8.5 GB) DVDs. I wasted too many DVD+R DL discs but to no avail. Here is a short explanation of what I did: I'm using ImgBurn v2.5.0.0 (latest version). I'm trying to burn an image file (.dvd) which is together with the related .iso file in the same folder. In ImgBurn, I select the file with .dvd extension, and set writing speed to 2.4x. Burning process starts normally, but around 7% of the process, it gives a I/O Write Error, which is as follows: I wasted 3 discs (Magic, Made in Taiwan, DVD+R DL, 8.5 GB) trying the same thing. My DVD writer is LG GH22NP20 with IDE connection type. I updated its firmware from 1.04 to 2.00 but no success in burning again. Then my cousin brought his LG (an older model) which, he claims, was successful in writing DL discs with the same brand (Magic). I plugged off my LG and plugged the older one in, and tried to burn the image again. It also gave an I/O Error even without standing till 7%. I tried another burning program (CloneCD), but failed again. Then I bought other brands (TDK and VERBATIM) and tried to burn the image. Burning process started successfully, but around 14% (for Verbatim) and 25% (for TDK) failed again. Here is a screeny from ImgBurn: I've burned lots of 4.7 GB DVD+Rs and DVD-Rs successfully, even without a single error, with this LG DVD writer, but this case is very bothering for me. What should I do? Should I buy a new DVD writer other than LG? Could this be related to Windows or my hardware configuration? Thanks for your help. Edit: My burner works on my cousin's machine. So the problem must be related to my system. What could be the reason? Latest news: I borrowed an external USB DVD writer from a friend, which is PHILIPS SPD3000CC (an old model). Guess what! It's burning DVD+R DLs successfully! How come an internal DVD writer of a brand new computer system cannot burn DL DVDs? Now I'm considering buying a new internal DVD writer with not IDE, but SATA connection...

    Read the article

  • Bonding and default gateway problem (CentOS)

    - by lg
    I configured network bonding on two machine with centos 5.5. Bonding works well, but the problem is default gateway: it is not configured! I follow this tutorial. I added GATEWAY in both (and either) /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-bond0. But, when I restart network (or server) there is no default gateway (route command). This is ip route ls output after network restart: 10.0.0.0/16 dev bond0 proto kernel scope link src 10.0.0.88 Where is my mistake?

    Read the article

  • Predicate problem in ToSelectList

    - by Stefanvds
    the ToSelectList method I have: public static IList<SelectListItem> ToSelectList<T>(this IEnumerable<T> itemsToMap, Func<T, string> textProperty, Func<T, string> valueProperty, Predicate<T> isSelected) { var result = new List<SelectListItem>(); foreach (var item in itemsToMap) { result.Add(new SelectListItem { Value = valueProperty(item), Text = textProperty(item), Selected = isSelected(item) }); } return result; } when I call this method here: public static List<SelectListItem> lesgeverList(int selectedID) { NASDataContext _db = new NASDataContext(); var lesg = (from l in _db.Lesgevers where l.LG_Naam != "leeg" orderby l.LG_Naam select l).ToSelectList(m => m.LG_Naam + " " + m.LG_Vnaam, m => m.LG_ID.ToString(), m => m.LG_ID == selectedID); return lesg.ToList(); } the selectlist I get has the selectedID as selected. now, when I want to have multiple selected items, I give a list of Lesgevers public static List<SelectListItem> lesgeverList(List<Lesgever> lg) { NASDataContext _db = new NASDataContext(); var test = (from l in _db.Lesgevers where l.LG_Naam != "leeg" && lg.Contains(l) orderby l.LG_Naam, l.LG_Vnaam select l).ToList(); var lesg = (from l in _db.Lesgevers where l.LG_Naam != "leeg" orderby l.LG_Naam, l.LG_Vnaam select l).ToSelectList(m => m.LG_Naam + " " + m.LG_Vnaam, m => m.LG_ID.ToString(), m => lg.Contains(m)); return lesg.ToList(); } the var test does return the Lesgevers that i have in the lg List, in my 'var lesg', there are no selectlistitem's selected at all. where is my mistake? :) how do I fix thix?

    Read the article

  • Few questions on dvd ram/rom

    - by Nrew
    Why other dvd rom/ram can read data from scratched disk and others cannot. For me its a comparison between LG and Lite On. Lite on, gets errors while reading disk with scratches. LG can read disk with scratches with no problems. Why is that? Is it possible to modify the software or the driver of the dvd rom so that it won't get errors when copying data from disk with scratches?

    Read the article

  • OSX: How to get a volume name (or bsd name) from a IOUSBDeviceInterface or location id

    - by LG
    Hi, I'm trying to write an app that associates a particular USB string descriptor (of a USB mass storage device) with its volume or bsd name. So the code goes through all the connected USB devices, gets the string descriptors and extracts information from one of them. I would like to get the volume name of those USB devices. I can't find the right API to do that. I have tried to do that: DASessionRef session = DASessionCreate(kCFAllocatorDefault); DADiskRef disk_ref = DADiskCreateFromIOMedia(kCFAllocatorDefault, session, usb_device_ref); const char* name = DADiskGetBSDName(disk_ref); But the DADiskCreateFromIOMedia function returned nil, I assume the usb_device_ref that I passed was not compatible with the io_service_t that the function is expecting. So how can I get the volume name of a USB device? Could I use the location id to do that? Thanks for reading. -L FOO_Result result = FOO_SUCCESS; mach_port_t master_port; kern_return_t k_result; io_iterator_t iterator = 0; io_service_t usb_device_ref; CFMutableDictionaryRef matching_dictionary = NULL; // first create a master_port if (FOO_FAILED(k_result = IOMasterPort(MACH_PORT_NULL, &master_port))) { fprintf(stderr, "could not create master port, err = %d\n", k_result); goto cleanup; } if ((matching_dictionary = IOServiceMatching(kIOUSBDeviceClassName)) == NULL) { fprintf(stderr, "could not create matching dictionary, err = %d\n", k_result); goto cleanup; } if (FOO_FAILED(k_result = IOServiceGetMatchingServices(master_port, matching_dictionary, &iterator))) { fprintf(stderr, "could not find any matching services, err = %d\n", k_result); goto cleanup; } while (usb_device_ref = IOIteratorNext(iterator)) { IOReturn err; IOCFPlugInInterface **iodev; // requires <IOKit/IOCFPlugIn.h> IOUSBDeviceInterface **dev; SInt32 score; err = IOCreatePlugInInterfaceForService(usb_device_ref, kIOUSBDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &iodev, &score); if (err || !iodev) { printf("dealWithDevice: unable to create plugin. ret = %08x, iodev = %p\n", err, iodev); return; } err = (*iodev)->QueryInterface(iodev, CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID*)&dev); (*iodev)->Release(iodev); // done with this FOO_String string_value; UInt8 string_index = 0x1; FOO_Result result = FOO_SUCCESS; CFStringRef device_name_as_cf_string; do { if (FOO_SUCCEEDED(result = FOO_GetStringDescriptor(dev, string_index, 0, string_value))) { printf("String at index %i is %s\n", string_index, string_value.GetChars()); // extract the command code if it is the FOO string if (string_value.CompareN("FOO:", 4) == 0) { FOO_Byte code = 0; FOO_HexToByte(string_value.GetChars() + 4, code); // Get other relevant information from the device io_name_t device_name; UInt32 location_id = 0; // Get the USB device's name. err = IORegistryEntryGetName(usb_device_ref, device_name); device_name_as_cf_string = CFStringCreateWithCString(kCFAllocatorDefault, device_name, kCFStringEncodingASCII); err = (*dev)->GetLocationID(dev, &location_id); // TODO: get volume or BSD name // add the device to the list break; } } string_index++; } while (FOO_SUCCEEDED(result)); err = (*dev)->USBDeviceClose(dev); if (err) { printf("dealWithDevice: error closing device - %08x\n", err); (*dev)->Release(dev); return; } err = (*dev)->Release(dev); if (err) { printf("dealWithDevice: error releasing device - %08x\n", err); return; } IOObjectRelease(usb_device_ref); // no longer need this reference }

    Read the article

  • OSX / Kernel extensions: problem locating a driver (that extends IOSCSIPeripheralDeviceType00)

    - by LG
    Hi, I'm implementing a driver that extends IOSCSIPeripheralDeviceType00 as I need to send custom SCSI commands to a device. I'm following the VendorSpecificType00 and SimpleUserClient examples and http://wagerlabs.com/writing-a-mac-osx-usb-device-driver-that-impl as an example. I built my kernel extension and it loads fine with kextload and it shows up in kextstat. The problem is that I can't locate it in my user space code. Here's the important (I think) part of: my driver code: #define super IOSCSIPeripheralDeviceType00 OSDefineMetaClassAndStructors(com_mycompany_driver_Foo, IOSCSIPeripheralDeviceType00) my user client code: #define super IOUserClient OSDefineMetaClassAndStructors(com_mycompany_driver_FooUserClient, IOUserClient) the plist: CFBundleIdentifier -> com.mycompany.driver.Foo IOCLass -> com_mycompany_driver_Foo IOUserClientClass -> com_mycompany_driver_FooUserClient IOProviderClass -> IOSCSIPeripheralDeviceNub Here's how I try to locate the driver in my user space code (similar to SimpleUserClient): dictRef = IOServiceMatching("com_mycompany_driver_Foo"); kernResult = IOServiceGetMatchingServices(kIOMasterPortDefault, dictRef, &iterator); When I execute the code, iterator is 0. I noticed that in the VendorSpecificType00 code, the localization of the driver is done differently: dictRef = IOServiceMatching("IOBlockStorageServices"); kr = IOServiceGetMatchingServices(kIOMasterPortDefault, dictRef, &iter); while ((service = IOIteratorNext(iter))) { io_registry_entry_t parent; kr = IORegistryEntryGetParentEntry(service, kIOServicePlane, &parent); ... // We're only interested in the parent object if it's our driver class. if (IOObjectConformsTo(parent, "com_apple_dts_driver_VendorSpecificType00")) { I tried doing that but it didn't work either. Thanks for reading and your help, -L

    Read the article

  • Problem with parsing SQL into table variable

    - by Stanley Ross
    I'm using the following code to read a SQL XML Variable into a table variable. I am getting the following error. " Incorrect syntax near '.'. " Can't quite Figure it out DECLARE @LOBS Table ( LineGUID varchar(40) ) DECLARE @lg xml SET @lg = '<?xml version="1.0" encoding="utf-16" standalone="yes"?> <Table> <LOB> <LineGuid>d6e3adad-8c53-4768-91a3-745c0dae0e08</LineGuid> </LOB> <LOB> <LineGuid>4406db8f-0d19-47da-953b-afc1db38b124</LineGuid> </LOB> </Table>' INSERT INTO @LOBS(LineGUID) SELECT ParamValues.ID.value('.','VARCHAR(40)') FROM @lg.nodes('/Table/LOB/LineGuid') AS ParamValues(ID)

    Read the article

  • Problem with parsing XML into table variable

    - by Stanley Ross
    I'm using the following code to read a SQL XML Variable into a table variable. I am getting the following error. " Incorrect syntax near '.'. " Can't quite Figure it out DECLARE @LOBS Table ( LineGUID varchar(40) ) DECLARE @lg xml SET @lg = '<?xml version="1.0" encoding="utf-16" standalone="yes"?> <Table> <LOB> <LineGuid>d6e3adad-8c53-4768-91a3-745c0dae0e08</LineGuid> </LOB> <LOB> <LineGuid>4406db8f-0d19-47da-953b-afc1db38b124</LineGuid> </LOB> </Table>' INSERT INTO @LOBS(LineGUID) SELECT ParamValues.ID.value('.','VARCHAR(40)') FROM @lg.nodes('/Table/LOB/LineGuid') AS ParamValues(ID)

    Read the article

  • Optimality of Binary Search

    - by templatetypedef
    Hello all- This may be a silly question, but does anyone know of a proof that binary search is asymptotically optimal? That is, if we are given a sorted list of elements where the only permitted operation on those objects is a comparison, how do you prove that the search can't be done in o(lg n)? (That's little-o of lg n, by the way.) Note that I'm restricting this to elements where the only operation permitted operation is a comparison, since there are well-known algorithms that can beat O(lg n) on expectation if you're allowed to do more complex operations on the data (see, for example, interpolation search). Thanks so much! This has really been bugging me since it seems like it should be simple but has managed to resist all my best efforts. :-)

    Read the article

  • Push html attribute to array onClick

    - by Hunkeone
    I'm trying to push number attribute of the element to the array onclick with a simple function, but array contains only empty values separated with commas. Here's html code. <button type="button" class="btn btn-success btn-lg" number="12" onclick="basket.push(this.number)">toBakset</button> <button type="button" class="btn btn-success btn-lg" number="15" onclick="basket.push(this.number)">toBakset</button> <button type="button" class="btn btn-success btn-lg" number="18" onclick="basket.push(this.number)">toBakset</button> from the start "basket" array is empty. Seems this question is so dumb but I can't find a solution :(

    Read the article

  • KVM swtitch , screen resolution problem

    - by Vagelism
    I use the lates ubuntu version. Till to day I use it with an acer trravelmate4070 and an LG screen in order to expand my destkop. Works great. Till today that I desided to connect my LG screen to a KVM switch in order to share the big screen with an other pc when I need it. In the KVM switch the resolution is lower and I can not manually change it. I read many solutions about making an .conf file but since I am new to Ubuntu I am afraid , more over I realized that these articles talk for the same problem but not as an expantion screen but as a main screen. Any idea how to config correct this file? I send the links of these articles here: http://robert.penz.name/219/workarou...-kvm-switches/ Where is the X.org config file? How do I configure X there? Thank you!

    Read the article

  • Ripping CD Audio simultaneously from 2 drives on one PC via USB or PATA - rip accuracy preserved?

    - by Rob
    I'm considering ripping audio (reading audio) from CDs using 2 drives simultaneously to speed up the process of ripping the CDs - i.e. 2 at a time rather than 1. Are there any issues with achieving maximum rip accuracy? In general I wondered if people have tried this and if the simultaneous streams from both rip activities would overload the host machine and cause packet loss or read retries resulting in a sub-standard CD-DA Audio CD rip? If it just means the rip is slightly slower (but still faster than sequentially doing one rip followed by another) but still of maximum accuracy then that is OK for me. I will be using dbPowerAmp to rip the CDs and converting to FLAC lossless format. Specific examples: There are 2 machines I intend to do it on: A Toshiba NB100 1.6Ghz Atom netbook, 2Gb RAM, running Windows XP Home with 1 external LG DVD/CD burner and external 1 LG Blu-ray burner attached via USB 2.0, ripping to the machine's 5400rpm internal hard drive. This rips from one CD drive very well, more than adequate, it is a nippy, fast little machine for its specification. A Desktop PC running Windows 7 Home Premium with MSI P4M900M2-L/ MS-7255v2.0 motherboard and 1.86Ghz Intel Core 2 Duo E6320, 7200rpm hard drive and 2Gb RAM, with an internal LG PATA DVD/CD burner (master) and a Philips DVD/CD burner (slave) on the same PATA bus (perhaps separate buses would be another option to consider here). Thoughts?

    Read the article

  • Monitor reset itself and now I can't set the resolution/settings back to how it was before

    - by verve
    I've had my LG 24" widescreen monitor since 2009 and 2 weeks ago I noticed the monitor turned itself off (never had it done this before) so I switched it back on to find all the settings like gamma, resolution etc. different = looked like it had been reset. Everyone in the house swears they never unplugged and plugged it back in. When I opened a webpage the fonts and zoom on the pages were different and my desktop was strange too; fonts of the icons were different etc. The screen seems blurry and when I watch movies the faces look distorted so I thought I would try to first figure out the resolution it used to be but when I go under "Adjust screen resolution" none of the options work and there is no recommended resolution marked; all the options stretch out the screen and looks terrible so right now I have it set to the least distorted one. Then since the resolution wasn't working I set the other manual settings(done by physical buttons on the monitor) back to how it used to be (luckily, I had written these down). The monitor looks better but the resolution makes it a strain to use. I thought maybe some Windows update caused this crap so I tried to System Restore: didn't work. What went wrong? A few questions: 1) What was the likely cause of the monitor shutting down itself and screwing up the settings I have been using since the day I bought the monitor? 2) Why have the fonts changed everywhere unless this is a HDD/video card problem? 3) How do I find the perfect resolution it used to be? The monitor wants me to set it to 1920 x 1080 but that isn't one of the options although I don't remember what resolution I used before. I use the 16:9 setting while I try the available resolution options but nothing looks good! How do I find what it used to be? Manual available in PDF under Support: http://www.lg.com/ca_en/computer-products/monitors/LG-lcd-monitor-W2442PA-BF.jsp Win 7. IE 9.

    Read the article

  • Calling compiled C from R with .C()

    - by Sarah
    I'm trying to call a program (function getNBDensities in the C executable measurementDensities_out) from R. The function is passed several arrays and the variable double runsum. Right now, the getNBDensities function basically does nothing: it prints to screen the values of passed parameters. My problem is the syntax of calling the function: array(.C("getNBDensities", hr = as.double(hosp.rate), # a vector (s x 1) sp = as.double(samplingProbabilities), # another vector (s x 1) odh = as.double(odh), # another vector (s x 1) simCases = as.integer(x[c("xC1","xC2","xC3")]), # another vector (s x 1) obsCases = as.integer(y[c("yC1","yC2","yC3")]), # another vector (s x 1) runsum = as.double(runsum), # double DUP = TRUE, NAOK = TRUE, PACKAGE = "measurementDensities_out")$f, dim = length(y[c("yC1","yC2","yC3")]), dimnames = c("yC1","yC2","yC3")) The error I get, after proper execution of the function (i.e., the right output is printed to screen), is Error in dim(data) <- dim : attempt to set an attribute on NULL I'm unclear what the dimensions are that I should be passing the function: should it be s x 5 + 1 (five vectors of length s and one double)? I've tried all sorts of combinations (including sx5+1) and have found only seemingly conflicting descriptions/examples online of what's supposed to happen here. For those who are interested, the C code is below: #include <R.h> #include <Rmath.h> #include <math.h> #include <Rdefines.h> #include <R_ext/PrtUtil.h> #define NUM_STRAINS 3 #define DEBUG void getNBDensities( double *hr, double *sp, double *odh, int *simCases, int *obsCases, double *runsum ); void getNBDensities( double *hr, double *sp, double *odh, int *simCases, int *obsCases, double *runsum ) { #ifdef DEBUG for ( int s = 0; s < NUM_STRAINS; s++ ) { Rprintf("\nFor strain %d",s); Rprintf("\n\tHospitalization rate = %lg", hr[s]); Rprintf("\n\tSimulation probability = %lg",sp[s]); Rprintf("\n\tSimulated cases = %d",simCases[s]); Rprintf("\n\tObserved cases = %d",obsCases[s]); Rprintf("\n\tOverdispersion parameter = %lg",odh[s]); } Rprintf("\nRunning sum = %lg",runsum[0]); #endif } naive solution While better (i.e., potentially faster or syntactically clearer) solutions may exist (see Dirk's answer below), the following simplification of the code works: out<-.C("getNBDensities", hr = as.double(hosp.rate), sp = as.double(samplingProbabilities), odh = as.double(odh), simCases = as.integer(x[c("xC1","xC2","xC3")]), obsCases = as.integer(y[c("yC1","yC2","yC3")]), runsum = as.double(runsum)) The variables can be accessed in >out.

    Read the article

  • LED Monitor brightness

    - by Yuval
    I am in the market for a new monitor. I've been looking around and it seems that the general brightness for monitors is between 250-320 cd/m2. After hours of searching, I narrowed it down to the LG W2453V-PF vs. the LG E2350V-SN The W2453V-PF is not LED backlit yet it has a brightness level of 310 cd/m2 and a response time of 2ms. The E2350V-SN, on the other hand, has a brightness level of 250 cd/m2 and a response time of 5ms but it is LED backlit. My questions are, looking at these overall specs: Which monitor is better? What makes LED backlight better? Is the LED backlight worth the decreased brightness level? Thanks! p.s. if you have any other comparable monitor suggestions (that are not samsung - I read their customer service is absolutely terrible), feel free to share. thanks!

    Read the article

  • "MAS SMS-CDMA" Bluetooth service

    - by TuxRug
    I have my phone (LG Rumor Touch on Sprint) connected to my Windows 7 computer by Bluetooth. Usually, one of the services is unidentified and no driver is installed. Occasionally I have an issue that is solved by removing and re-pairing my phone with my computer. The last few times I have paired my computer and phone, the unidentified service was found and installed, as "MAS SMS-CDMA". It sounds like an interface that allows sending and reading SMS messages via Bluetooth. However, there is no software available from Sprint or LG that I have found that offers such functionality. Searching Google for "MAS SMS-CMDA" (with quotes) did not provide anything useful, only what appear to be CMDA information written in Spanish. What can I use this service for, and how do I use it?

    Read the article

  • Cannot enter BIOS due to broken screen

    - by gamer
    Lately my laptop(hp g42 247sb) screen is damaged, so I hook it up with a external monitor(LG something) and it works fine now. But the only annoying thing is I cannot navigate the BIOS menu for some tweaking because the BIOS not shown on the external monitor,instead, it only shown on the broken laptop screen, and it only output to my external monitor when windwos/os is loged-on. So, is there anyway I can force output during BIOS/BOOT/POST to my external monitor? Things I have done and didn't work: (1)Set my LG monitor as primary display on both window properties and Intel Graphics panel (2)Enter the bios (F10 key) and press the fn+F4 key(change display output). (3)Disable and uninstall my internal screen(broken laptop screen) using device manager and restart, but windows(bios?) install it back on log-on. Please help me!

    Read the article

  • How to Generate XML from Database

    - by Nisarg Mehta
    Hi , I am fetching data from two tables CARRIER_IFTA ,IFTA_NAME. My Select Query is like below.. SELECT t1.IFTA_LICENSE_NUMBER,t1.IFTA_BASE_STATE,t2.NAME_TYPE,t2.NAME from CARRIER_IFTA t1 inner join IFTA_NAME t2 on t1.IFTA_LICENSE_NUMBER=t2.IFTA_LICENSE_NUMBER My Data is coming in this way... IFTA_LICENSE_NUMBER IFTA_BASE_STATE NAME_TYPE NAME -------------------------------------------------------- 630908333 US LG XYZ 630908333 US MG PQR 730908344 US LG ABC Now using XSLT I want to generate XML like this <T0019> <IFTA_ACCOUNT> <IFTA_LICENSE_NUMBER>630908333</IFTA_LICENSE_NUMBER> <IFTA_BASE_STATE>US</IFTA_BASE_STATE> <IFTA_NAME> <NAME_TYPE>LG<NAME_TYPE> <NAME>XYZ</NAME> </IFTA_NAME> <IFTA_NAME> <NAME_TYPE>MG<NAME_TYPE> <NAME>PQR</NAME> <IFTA_NAME> </IFTA_ACCOUNT> <IFTA_ACCOUNT> <IFTA_LICENSE_NUMBER>730908344</IFTA_LICENSE_NUMBER> <IFTA_BASE_STATE>US</IFTA_BASE_STATE> <IFTA_NAME> <NAME_TYPE>LG<NAME_TYPE> <NAME>ABC</NAME> </IFTA_NAME> </IFTA_ACCOUNT> </T0019> i have used below xslt but it is not giveng me desire result ... <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:template match="/ROWSET"> <xsl:element name="T0019"> <xsl:apply-templates select="IFTAACCOUNT"/> </xsl:element> </xsl:template> <xsl:template match="IFTAACCOUNT"> <xsl:element name="IFTAACCOUNT"> <xsl:apply-templates select="IFTA_CARRIER_ID_NUMBER"/> </xsl:element> </xsl:template> <xsl:template match="IFTA_LICENSE_NUMBER"> <xsl:element name="IFTA_LICENSE_NUMBER"> <xsl:apply-templates /> </xsl:element> </xsl:template> <xsl:template match="IFTA_BASE_STATE"> <xsl:element name="IFTA_BASE_STATE"> <xsl:apply-templates /> </xsl:element> </xsl:template> <xsl:template match="IRP_NAME"> <IRP_NAME> <xsl:apply-templates select="NAME"/> <xsl:apply-templates select="NAME_TYPE"/> </IRP_NAME> </xsl:template> <xsl:template match="NAME"> <xsl:element name="NAME"> <xsl:value-of select="." /> </xsl:element> </xsl:template> <xsl:template match="NAME_TYPE"> <xsl:element name="NAME_TYPE"> <xsl:apply-templates /> </xsl:element> </xsl:template> </xsl:stylesheet> but it is not giving desire result ... Please help me ... Thanks in Advance...

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >