Daily Archives

Articles indexed Saturday December 25 2010

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

  • How to integrate an open source C program instead of calling its executable through a system call?

    - by ihamer
    I have an executable (fossil scm) that is being invoked by my program externally through ::CreateProcess windows call. The stdout and stderr are then captured. Since the source code for fossil is available, I would prefer to create a static library out of it and issue calls directly. Currently, communication to fossil is done through the command line parameters, and the communication back is through the process return code, stdout and stderr. Fossil writes to stdout/err through printf and fprintf calls. What is the best way to solve this with minimum alteration of fossil source? Is there a reliable and cross-platform way to intercept stdout/err and send it into a memory buffer?

    Read the article

  • calculating a gps coordinate given a point, bearing and distance

    - by user530509
    Hello, I have a problem which draws my back in some project for some time now. Im basically looking to trap a polygon using x,y points drawn by some script ive written. lat1,lon1 are the center gps cords of the polygon and im looking for its surrounding polygon. here is a part of my code in python: def getcords(lat1,lon1,dr,bearing): lat2=asin(sin(lat1)*cos(dr)+cos(lat1)*sin(dr)*cos(bearing)) lon2=lon1+atan2(sin(bearing)*sin(dr)*cos(lat1),cos(dr)-sin(lat1)*sin(lat2)) return [lat2,lon2] my input goes like this: lat1,lon1 - are given in decimal degrees. -dr is the angular computed by dividing the distance in miles by the earth's -raiuds(=3958.82) -bearing between 0-360 degrees. however for the input getcorsds1(42.189275,-76.85823,0.5/3958.82,30) i get [-1.3485899508698462, -76.8576637627568], however [42.2516666666667,-76.8097222222222] is the right answer. as for the angular distance i calculate it simply by dividing the distance in miles by the earth's raiuds(=3958.82). anybody?

    Read the article

  • MySql query optimization help

    - by rohitgu
    I have few queries and am not able to figure out how to optimize them, QUERY 1 select * from t_twitter_tracking where classified is null and tweetType='ENGLISH' order by id limit 500; QUERY 2 Select count(*) as cnt, DATE_FORMAT(CONVERT_TZ(wrdTrk.createdOnGMTDate,'+00:00','+05:30'),'%Y-%m-%d') as dat from t_twitter_tracking wrdTrk where wrdTrk.word like ('dell') and CONVERT_TZ(wrdTrk.createdOnGMTDate,'+00:00','+05:30') between '2010-12-12 00:00:00' and '2010-12-26 00:00:00' group by dat; Both these queries run on the same table, CREATE TABLE `t_twitter_tracking` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `word` VARCHAR(200) NOT NULL, `tweetId` BIGINT(100) NOT NULL, `twtText` VARCHAR(800) NULL DEFAULT NULL, `language` TEXT NULL, `links` TEXT NULL, `tweetType` VARCHAR(20) NULL DEFAULT NULL, `source` TEXT NULL, `sourceStripped` TEXT NULL, `isTruncated` VARCHAR(40) NULL DEFAULT NULL, `inReplyToStatusId` BIGINT(30) NULL DEFAULT NULL, `inReplyToUserId` INT(11) NULL DEFAULT NULL, `rtUsrProfilePicUrl` TEXT NULL, `isFavorited` VARCHAR(40) NULL DEFAULT NULL, `inReplyToScreenName` VARCHAR(40) NULL DEFAULT NULL, `latitude` BIGINT(100) NOT NULL, `longitude` BIGINT(100) NOT NULL, `retweetedStatus` VARCHAR(40) NULL DEFAULT NULL, `statusInReplyToStatusId` BIGINT(100) NOT NULL, `statusInReplyToUserId` BIGINT(100) NOT NULL, `statusFavorited` VARCHAR(40) NULL DEFAULT NULL, `statusInReplyToScreenName` TEXT NULL, `screenName` TEXT NULL, `profilePicUrl` TEXT NULL, `twitterId` BIGINT(100) NOT NULL, `name` TEXT NULL, `location` VARCHAR(100) NULL DEFAULT NULL, `bio` TEXT NULL, `url` TEXT NULL COLLATE 'latin1_swedish_ci', `utcOffset` INT(11) NULL DEFAULT NULL, `timeZone` VARCHAR(100) NULL DEFAULT NULL, `frenCnt` BIGINT(20) NULL DEFAULT '0', `createdAt` DATETIME NULL DEFAULT NULL, `createdOnGMT` VARCHAR(40) NULL DEFAULT NULL, `createdOnServerTime` DATETIME NULL DEFAULT NULL, `follCnt` BIGINT(20) NULL DEFAULT '0', `favCnt` BIGINT(20) NULL DEFAULT '0', `totStatusCnt` BIGINT(20) NULL DEFAULT NULL, `usrCrtDate` VARCHAR(200) NULL DEFAULT NULL, `humanSentiment` VARCHAR(30) NULL DEFAULT NULL, `replied` BIT(1) NULL DEFAULT NULL, `replyMsg` TEXT NULL, `classified` INT(32) NULL DEFAULT NULL, `createdOnGMTDate` DATETIME NULL DEFAULT NULL, `locationDetail` TEXT NULL, `geonameid` INT(11) NULL DEFAULT NULL, `country` VARCHAR(255) NULL DEFAULT NULL, `continent` CHAR(2) NULL DEFAULT NULL, `placeLongitude` FLOAT NULL DEFAULT NULL, `placeLatitude` FLOAT NULL DEFAULT NULL, PRIMARY KEY (`id`), INDEX `id` (`id`, `word`), INDEX `createdOnGMT_index` (`createdOnGMT`) USING BTREE, INDEX `word_index` (`word`) USING BTREE, INDEX `location_index` (`location`) USING BTREE, INDEX `classified_index` (`classified`) USING BTREE, INDEX `tweetType_index` (`tweetType`) USING BTREE, INDEX `getunclassified_index` (`classified`, `tweetType`) USING BTREE, INDEX `timeline_index` (`word`, `createdOnGMTDate`, `classified`) USING BTREE, INDEX `createdOnGMTDate_index` (`createdOnGMTDate`) USING BTREE, INDEX `locdetail_index` (`country`, `id`) USING BTREE, FULLTEXT INDEX `twtText_index` (`twtText`) ) COLLATE='utf8_general_ci' ENGINE=MyISAM ROW_FORMAT=DEFAULT AUTO_INCREMENT=12608048; The table has more than 10 million records. How can I optimize it?

    Read the article

  • Java Map question

    - by user552961
    I have one Map that contains some names and numbers Map<String,Integer> abc = new TreeMap<String,Integer>(); It works fine. I can put some values in it but when I call it in different class it gives me wrong order. For example: I putted abc.put("a",1); abc.put("b",5); abc.put("c",3); some time it returns the order (b,a,c) and some time (a,c,b). What is wrong with it? Is there any step that I am missing when I call this map?

    Read the article

  • JAVA: How to use paint() method to update the previously drawn object?

    - by GamDroid
    How to use paint() such that when repaint() is called the previously drawn object should not get deleted when drawing the new object. That is the drawing area must get UPDATED only and not REDRAWN. In my code when one of many button is clicked, some aplhabet get displayed. I want to have functionality such that when other buttons are clicked the previously drawn alhabets must be present.Take is as if a string of alphabets getting created as the buttons are clicked. Im using Java Swing for coding. Some piece of my code: if(source == btnAlpha[i] ) bollyDraw.repaint(); //bollydraw is an object of a JPanel extended class having implemented the paintComponent(Graphics g) method In the paint() method: if (word[i] == key) { g.drawChars(word, i, 1, x, y); }

    Read the article

  • Is the W3 standard a major factor when google decides SERP position?

    - by Camran
    I have a dynamic php website which index only has around 800 errors according to the w3 validator online. I have tried checking major websites like ebay, stackoverflow and others also, all with around 400 errors. So my first thought is, what good is that validator when it always displays errors? Secondly, will the errors affect my SERP ranking? ie, will me fixing these errors as good as I can increase my Google search position? Thanks

    Read the article

  • Log RuntimeException thrown from thread created by Spring via the @Async annotation

    - by Eugen
    I'm having some difficulty logging RuntimeException from a thread. My system is: Java 7 (b118), Spring 3.0.5. The threads are not created by hand, but via Spring's @Async annotation, which creates it's own executor behind the scenes, so I don't really have the option of overriding any methods of the thread, FutureTask or anything low level. So my question is if Spring has any support or if there are any best practices for handling (logging) these type of exceptions? Any suggestions are appreciated. Thanks.

    Read the article

  • a program similar to ls with some modifications

    - by Bond
    Hi, here is a simple puzzle I wanted to discuss. A C program to take directory name as command line argument and print last 3 directories and 3 files in all subdirectories without using api 'system' inside it. suppose directory bond0 contains bond1, di2, bond3, bond4, bond5 and my_file1, my_file2, my_file3, my_file4, my_file5, my_file6 and bond1 contains bond6 my_file7 my_file8 my_file9 my_file10 program should output - bond3, bond4, bond5, my_file4, my_file5, my_file6, bond6, my_file8, my_file9, my_file10 My code for the above problem is here #include<dirent.h> #include<unistd.h> #include<string.h> #include<sys/stat.h> #include<stdlib.h> #include<stdio.h> char *directs[20], *files[20]; int i = 0; int j = 0; int count = 0; void printdir(char *); int count_dirs(char *); int count_files(char *); int main() { char startdir[20]; printf("Scanning user directories\n"); scanf("%s", startdir); printdir(startdir); } void printdir(char *dir) { printf("printdir called %d directory is %s\n", ++count, dir); DIR *dp = opendir(dir); int nDirs, nFiles, nD, nF; nDirs = 0; nFiles = 0; nD = 0; nF = 0; if (dp) { struct dirent *entry = 0; struct stat statBuf; nDirs = count_dirs(dir); nFiles = count_files(dir); printf("The no of subdirectories in %s is %d \n", dir, nDirs); printf("The no of files in %s is %d \n", dir, nFiles); while ((entry = readdir(dp)) != 0) { if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { continue; } char *filepath = malloc(strlen(dir) + strlen(entry->d_name) + 2); if (filepath) { sprintf(filepath, "%s/%s", dir, entry->d_name); if (lstat(filepath, &statBuf) != 0) { } if (S_ISDIR(statBuf.st_mode)) { nD++; if ((nDirs - nD) < 3) { printf("The directory is %s\n",entry->d_name); } } else { nF++; if ((nFiles - nF) < 3) { printf("The files are %s\n", entry->d_name); } //if } //else free(filepath); } //if(filepath) } //while while ((entry = readdir(dp)) != 0) { if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { continue; } printf("In second while loop *entry=%s\n",entry->d_name); char *filepath = malloc(strlen(dir) + strlen(entry->d_name) + 2); if (filepath) { sprintf(filepath, "%s/%s", dir, entry->d_name); if (lstat(filepath, &statBuf) != 0) { } if (S_ISDIR(statBuf.st_mode)) { printdir(entry->d_name); } } //else free(filepath); } //2nd while closedir(dp); } else { fprintf(stderr, "Error, cannot open directory %s\n", dir); } } //printdir int count_dirs(char *dir) { DIR *dp = opendir(dir); int nD; nD = 0; if (dp) { struct dirent *entry = 0; struct stat statBuf; while ((entry = readdir(dp)) != 0) { if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { continue; } char *filepath = malloc(strlen(dir) + strlen(entry->d_name) + 2); if (filepath) { sprintf(filepath, "%s/%s", dir, entry->d_name); if (lstat(filepath, &statBuf) != 0) { fprintf(stderr, "File Not found? %s\n", filepath); } if (S_ISDIR(statBuf.st_mode)) { nD++; } else { continue; } free(filepath); } } closedir(dp); } else { fprintf(stderr, "Error, cannot open directory %s\n", dir); } return nD; } int count_files(char *dir) { DIR *dp = opendir(dir); int nF; nF = 0; if (dp) { struct dirent *entry = 0; struct stat statBuf; while ((entry = readdir(dp)) != 0) { if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { continue; } char *filepath = malloc(strlen(dir) + strlen(entry->d_name) + 2); if (filepath) { sprintf(filepath, "%s/%s", dir, entry->d_name); if (lstat(filepath, &statBuf) != 0) { fprintf(stderr, "File Not found? %s\n", filepath); } if (S_ISDIR(statBuf.st_mode)) { continue; } else { nF++; } free(filepath); } } closedir(dp); } else { fprintf(stderr, "Error, cannot open file %s\n", dir); } return nF; } The above code I wrote is a bit not functioning correctly can some one help me to understand the error which is coming.So that I improve it further.There seems to be some small glitch which is not clear to me right now.

    Read the article

  • Azure flexibility in geolocation and specs

    - by bitbitbit
    Hi, I'm reading about Azure and there are a couple of things I don't understand: If I choose put a server on Europe, why can't I move it to another datacenter afterwards? If I choose a size for a worker/web role, could I upgrade it to a bigger one afterwards? I think I've read that I cannot put different instances of a worker/web role with different sizes working together? Am I right? And in affirmative case, why? What is cheaper? a big VM with a nicely multithreaded worker role or multiple single-threaded worker roles in several small VMs? Thanks in advance.

    Read the article

  • Add/remove validation rules Dynamically

    - by eddy
    Hi, I need to dynamically add validation rules to a text box when the user clicks on the checkbox in that row and remove it when the user unchecks it. This is what I did, and it works fine, but I'm not sure if it is the right way to do it. Here's my html code: <tbody> <c:forEach items="${list}" var="item"> <tr> <td align="center"> <input type="checkbox" name="selectItems" value="<c:out value="${item.numberPlate}"/>" /> </td> <td align="left"><c:out value="${item.numberPlate}"/></td> <td align="left"><c:out value="${item.driver.fullName}"/></td> <td align="left"><input type="text" name="mileage_<c:out value="${item.numberPlate}"/>" value="" /></td> </tr> </c:forEach> </tbody> and my jquery: $("input[name=selectItems]").change(function() { if (this.checked) { $(this).closest("tr").find("input[name^=mileage]").attr("class","required"); $(this).closest("tr").find("input[name^=mileage]").attr("number",true); } else { $(this).closest("tr").find("input[name^=mileage]").attr("class","") } }); any suggestion is welcome and... I almost forgot, Merry Xmas!

    Read the article

  • JSLint with Textmate

    - by mehdi
    I tried the instructions at this tutorial (http://www.phpied.com/jslint-on-mac-textmate/) to run jslint with textmate but getting stuck at step at the last step of "Step 1" Here is the error: Exception in thread "main" java.lang.NoClassDefFoundError: org/mozilla/javascript/tools/shell/Main Caused by: java.lang.ClassNotFoundException: org.mozilla.javascript.tools.shell.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Thanks

    Read the article

  • using Linux vncviewer

    - by Darkoni
    Hi ! when i am connecting to VNC server using wine on linux $ wine vncviewer.exe i have to enter: VNC Server: 1.1.1.21 Proxy/Reapeter: 195.29.18.33:1234 and then, when i connect, on top there is txt: 1.1.1.21:5900 (195.29.18.33:1234) mine question is: how to connect using vncviewer ? what to put in VNC_VIA_CMD ? $ export xlocalPort=1234 $ export xremoteHost=1.1.1.21 $ export xremotePort=5900 $ export xgateway=195.29.18.33 $ export VNC_VIA_CMD="/usr/bin/ssh -f -L $xlocalPort:$xremoteHost:$xremotePort $xgateway sleep 20" $ vncviewer $xremoteHost -via $xgateway and i get error: unable connect to socket: Connection refused (111) i was trying to help myself with page http://www.tightvnc.com/vncviewer.1.php Please help, couse i need to use "native" linux vncviewer installed by $ yum install tigervnc tigervnc.i686 0:1.0.90-0.13.20100420svn4030.fc13 Thnx

    Read the article

  • What's going on with my server? High load, lots of idle CPU time, low disk utilization

    - by Jonathan
    I run a web site and send a legitimate opt-in, daily email newsletter to subscribers. Both the web hosting and email sending are done by the same machine. I have about 100,000 subscribers who have opted in to my daily email newsletter. My PHP script did a pretty good job sending mail to all of them until fairly recently, but as the list has grown I can't keep up. When I run top, I have very high load--usually at least 6 or 7, sometimes as high as 15--even though I only have two CPUs. However, when I run sar, my CPU is idle an average of about 30% of the time. So, it seems I'm not CPU bound. When I run iostat, it seems as though I'm not disk bound because my %util for each device is very low (no more than 5%). Given that I don't seem to be CPU bound or disk bound, why is top reporting such high load? Additionally, since I don't seem to be CPU bound or disk bound, why is my email sending script not able to keep up? Here's what I see when running top: top - 11:33:28 up 74 days, 18:49, 2 users, load average: 7.65, 8.79, 8.28 Tasks: 168 total, 5 running, 162 sleeping, 0 stopped, 1 zombie Cpu(s): 38.9%us, 58.6%sy, 0.8%ni, 0.0%id, 0.7%wa, 0.2%hi, 0.8%si, 0.0%st Mem: 3083012k total, 2144436k used, 938576k free, 281136k buffers Swap: 2048248k total, 39164k used, 2009084k free, 1470412k cached Here's what I see when running iostat -mx: avg-cpu: %user %nice %system %iowait %steal %idle 34.80 1.20 55.24 0.37 0.00 8.38 Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util sda 0.19 71.70 1.59 29.45 0.02 0.07 5.90 0.55 17.82 1.16 3.59 sda1 0.00 0.00 0.00 0.00 0.00 0.00 7.10 0.00 13.80 13.72 0.00 sda2 0.05 50.45 1.13 24.57 0.01 0.29 24.25 0.35 13.43 1.15 2.97 sda3 0.05 10.17 0.20 2.33 0.01 0.05 43.75 0.05 20.96 2.45 0.62 sda4 0.00 0.00 0.00 0.00 0.00 0.00 2.00 0.00 70.50 70.50 0.00 sda5 0.07 0.22 0.03 0.07 0.00 0.00 32.84 0.08 856.19 8.03 0.08 sda6 0.02 5.45 0.03 0.72 0.00 0.02 67.55 0.02 26.72 5.26 0.39 sda7 0.00 1.56 0.00 0.42 0.00 0.01 38.04 0.00 8.88 5.84 0.24 sda8 0.01 3.84 0.20 1.35 0.00 0.02 28.55 0.05 31.90 4.08 0.63 Here's what I see when running sar: 09:40:02 AM CPU %user %nice %system %iowait %steal %idle 09:50:01 AM all 30.59 1.01 49.80 0.23 0.00 18.37 10:00:08 AM all 31.73 0.92 51.66 0.13 0.00 15.55 10:10:06 AM all 30.43 0.99 48.94 0.26 0.00 19.38 10:20:01 AM all 29.58 1.00 47.76 0.25 0.00 21.42 10:30:01 AM all 29.37 1.02 47.30 0.18 0.00 22.13 10:40:06 AM all 32.50 1.01 52.94 0.16 0.00 13.39 10:50:01 AM all 30.49 1.00 49.59 0.15 0.00 18.77 11:00:01 AM all 29.43 0.99 47.71 0.17 0.00 21.71 11:10:07 AM all 30.26 0.93 49.48 0.83 0.00 18.50 11:20:02 AM all 29.83 0.81 48.51 1.32 0.00 19.52 11:30:06 AM all 31.18 0.88 51.33 1.15 0.00 15.47 Average: all 26.21 1.15 42.62 0.48 0.00 29.54 Here are the top handful of processes listed at the particular time I happened to run top -c: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 8180 mysql 16 0 57448 19m 2948 S 26.6 0.7 4702:26 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/bristno.pid --skip-external-locking 26956 brristno 17 0 0 0 0 Z 8.0 0.0 0:00.24 [php] <defunct> 26958 brristno 17 0 94408 43m 37m R 5.0 1.4 0:00.15 /usr/bin/php /home/brristno/public_html/dbv.php 22852 nobody 16 0 9628 2900 1524 S 0.7 0.1 0:00.17 /usr/local/apache/bin/httpd -k start -DSSL 8591 brristno 34 19 96896 13m 6652 S 0.3 0.4 0:29.82 /usr/local/bin/php /home/brristno/bin/mailer.php 1qwqyb6 i0gbor 24469 nobody 16 0 9628 2880 1508 S 0.3 0.1 0:00.08 /usr/local/apache/bin/httpd -k start -DSSL 25495 nobody 15 0 9628 2876 1500 S 0.3 0.1 0:00.06 /usr/local/apache/bin/httpd -k start -DSSL 26149 nobody 15 0 9628 2864 1504 S 0.3 0.1 0:00.04 /usr/local/apache/bin/httpd -k start -DSSL

    Read the article

  • VoIP and IPv6 with IPsec

    - by PhilCisco
    Hi, I had some basic questions about VoIP in a IPv6 architecture, right now I'm running VoIP in a v4 architecture, and I was thinking about to change everything to v6. my questions are not that practical but I would like to understand it well. Question 1: if i had internet full v6 or v4 and that I enable IPsec on my v6 router do I still need a VPN through the internet ? because my routers will anyway exchange their pub/priv key or their certificate to ensure the communication. Question 2: If the answer to question 1 is yes then I only have two advantages to put my VoIP architecture to IPv6 the second advantage for me is the NAT which I will not have anymore. I know that right now I should anyway still use things like NAT-PT, Tunnelling and so one but in full v6 are their any other advantages ? Thank you

    Read the article

  • Search for partial IP address using Windows Search?

    - by Dr. Dre
    I have a folder, c:\projects\, added to Windows Index. I know the indexing is working because I search for stuff in this folder all the time and the results come up very fast, and I've never noticed any accuracy problem until now. (I have had to tweak Indexing options to expand which file types have their contents indexed rather than just the file name, etc, but after that Search has worked pretty well for me). I've encountered a problem while trying to search for references to a particular IP address subnet. I'm trying to find all references to IP's with the pattern "192.168.220.xxx" (AKA, the 192.168.220.0/24, AKA 192.168.220.0/255.255.255.0 IP/netmask). Within Windows Explorer: c:\projects**.* is indexed c:\projects\work\project1\network_list.txt contains several "192.168.220.xxx" IP's Indexing status says all items are indexed (193,000 items). When I try to search for partial IP match, there are no search results. Tried searching for: 192.168.220, 192.168, 192.168.220., 192.168.220., 192.168.220.?, 192.168.220.??, 192.168.220.???, 192.168., 192.168.. Also tried variants of all the above surrounded with double quotes. All the searches returned 0 results. Within MS Outlook 2007: My mailbox, and all my offline .pst's are indexed. I search in Outlook pretty frequently, so I'm pretty sure indexed searches work across inbox and all .pst's. Indexing status in Outlook says all items are indexed. I also have references to these IP's in email, and I'd like to find all of them. Basically same deal as above, can't search for "192.168.220.xxx" IP's. Any way to fix this?

    Read the article

  • My datacard goes online but doesn't gives internet access (Fedora 14).

    - by Harsh
    I am using MTS datacard. I have usb_modeswitch installed and have configured the wvdial.conf file. When I do sudo wvdial cdma, the IPs and DNS addresses are also allocated but I still cant access internet. The reply to dmesg | grep -e 'tty' -e 'modem' is: [ 0.000000] console [tty0] enabled [ 11.098238] USB Serial support registered for GSM modem (1-port) [ 11.098352] option 6-1:1.0: GSM modem (1-port) converter detected [ 11.102170] usb 6-1: GSM modem (1-port) converter now attached to ttyUSB0 [ 11.102207] option 6-1:1.1: GSM modem (1-port) converter detected [ 11.102334] usb 6-1: GSM modem (1-port) converter now attached to ttyUSB1 [ 11.102364] option 6-1:1.2: GSM modem (1-port) converter detected [ 11.102488] usb 6-1: GSM modem (1-port) converter now attached to ttyUSB2 [ 11.102522] option 6-1:1.3: GSM modem (1-port) converter detected [ 11.102643] usb 6-1: GSM modem (1-port) converter now attached to ttyUSB3 [ 11.102672] option 6-1:1.4: GSM modem (1-port) converter detected [ 11.102793] usb 6-1: GSM modem (1-port) converter now attached to ttyUSB4 [ 11.103074] option: v0.7.2:USB Driver for GSM modems Can anyone tell me what shall I do?

    Read the article

  • Can't connect Alienware M11x wireless to internet thru families router

    - by Jim Kron
    Morning All, Have an Alienware M11x loaded with Win 7 Premium with the Dell half card wifi. Also have a Netgear and Belkin USB external adapters (b/g and N to include dual radios. No joy either. Families Internet is served thru Charter and they use a Motorola Router. No matter if we reset the router, I cannot connect to the Net but can talk to the router. BTW... my brother only uses WEP as a number of connected items are old and my folks are not in a high threat area for attacks. Frustrated, as I know what I'm doing but this really has me stumped. Any thoughts? Much appreciated, Jim

    Read the article

  • Java Desktop app with Ms Access.

    - by zayar
    My Db connection is error "class not found exception!". I want to show in java jTable with query result.. static Connection databaseConnection()throws ClassNotFoundException{ Connection con=null; File file=new File("PlayDb/PlayIS.mdb"); try{ Class.forName("sun.jdbc.odbc.jdbcodbcDriver"); con =DriverManager.getConnection("jdbc:odbc:Driver="+"{Microsoft Access Driver(*.mdb,*.accdb)};DBQ="+file.getAbsoluteFile()); System.out.print("Success con!!"); } catch(Exception e){ System.out.print("connection fail!!"); e.printStackTrace(); } return con; }

    Read the article

  • Write XML File from a flex application back to a rails Server

    - by Markus
    Hi everybody, I have a XML-file, which I want to send to a rails server. To do so I use the following code: <mx:HTTPService id="dataService" result="resultHandler(event)" resultFormat="e4x"/> In a Function triggered by a save button, I do the following: var params:Object = {}; params["xml_file"] = xmlDoc; dataService.method = "POST"; dataService.url = "http://localhost:3000/containers"; dataService.send(params); Unfortunately there is always the Problem (see below) appearing. If I remove the params var, it runs a GET Request... [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream-Fehler. URL: http://localhost:3000/containers"]. URL: http://localhost:3000/containers"] what could be the problem? Thanks for any hints! Markus

    Read the article

  • NUnit Assert a list of objects in no order

    - by Shawn Mclean
    How do I Assert a collection of items in no particular order? I just want to make sure all the items are in the list. I'm heard of CollectionAssert but I do not see any method that would do what I want. My object looks like this: public class Vector2{ public float X {get; set;} public float Y {get; set;} } Assert - I want something like this: CollectionAssert.ContainsAll(mesh.GetPolygonVertices(0), aListOfVertices); mesh.GetPolygonVertices(int) returns a List<Vector2> and aListOfVertices contains all of what is returned, but not guaranteed that order.

    Read the article

  • Difference between two datetime strings: setting timezone

    - by Frank Nwoko
    //Difference between 2 dates This function works well but display wrong time format. Pls how can I change the time of this function from GMT to GMT+1? Displays 15hrs 22mins instead of 16hrs 22mins. Thanks function get_date_diff($start, $end="NOW") { $sdate = strtotime($start); $edate = strtotime($end); $timeshift = ""; $time = $edate - $sdate; if($time>=0 && $time<=59) { // Seconds $timeshift = $time.' seconds '; } elseif($time>=60 && $time<=3599) { // Minutes + Seconds $pmin = ($edate - $sdate) / 60; $premin = explode('.', $pmin); $presec = $pmin-$premin[0]; $sec = $presec*60; $timeshift = $premin[0].' min '.round($sec,0).' sec '."<b>ago</b>"; } elseif($time>=3600 && $time<=86399) { // Hours + Minutes $phour = ($edate - $sdate) / 3600; $prehour = explode('.',$phour); $premin = $phour-$prehour[0]; $min = explode('.',$premin*60); $presec = '0.'.$min[1]; $sec = $presec*60; $timeshift = $prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec '."<b>ago</b>"; } elseif($time>=86400) { // Days + Hours + Minutes $pday = ($edate - $sdate) / 86400; $preday = explode('.',$pday); $phour = $pday-$preday[0]; $prehour = explode('.',$phour*24); $premin = ($phour*24)-$prehour[0]; $min = explode('.',$premin*60); $presec = '0.'.$min[1]; $sec = $presec*60; $timeshift = $preday[0].' days '.$prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec '."<b>ago</b>"; } return $timeshift; }

    Read the article

  • Yii Many_Many Relationship and Form

    - by Thorpe Obazee
    // Post model return array( 'categories' => array(self::HAS_MANY, 'Category', 'posts_categories(post_id, category_id)') ); I already have the setup of tables posts id, title, content categories id, name posts_categories post_id, category_i The problem I have is that I am getting an error when creating this form: <?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'post-form', 'enableAjaxValidation'=>false, )); ?> <p class="note">Fields with <span class="required">*</span> are required.</p> <?php echo $form->errorSummary($model); ?> <div class="row"> <?php echo $form->labelEx($model,'title'); ?> <?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?> <?php echo $form->error($model,'title'); ?> </div> <div class="row"> <?php echo $form->labelEx($model,'uri'); ?> <?php echo $form->textField($model,'uri',array('size'=>60,'maxlength'=>255)); ?> <?php echo $form->error($model,'uri'); ?> </div> <div class="row"> <?php echo $form->labelEx($model,'content'); ?> <?php echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50)); ?> <?php echo $form->error($model,'content'); ?> </div> <div class="row"> <?php // echo $form->labelEx($model,'content'); ?> <?php echo CHtml::activeDropDownList($model,'category_id', CHtml::listData(Category::model()->findAll(), 'id', 'name')); ?> <?php // echo $form->error($model,'content'); ?> </div> <div class="row buttons"> <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?> </div> <?php $this->endWidget(); ?> The error is: Property "Post.category_id" is not defined. I am quite confused. What should I be doing to correct this?

    Read the article

  • Custom GMapTypeControl buttons (Google Maps V2 API)

    - by AndiDog
    A similar question was already asked, but does not have a satisfying answer. I want to change the CSS style for the map type selection buttons (which are actually DIVs that don't have a CSS class). The links in the referenced question show how to subclass controls, but the examples don't seem to work for GMapTypeControl. Tried the following function CustomGMapTypeControl() {} CustomGMapTypeControl.prototype = new GMapTypeControl() CustomGMapTypeControl.prototype.setButtonStyle_ = function(button) { button.style.backgroundColor = "red"; } but the setButtonStyle_ function doesn't even get called. Any solutions for this?

    Read the article

  • moving EDMX file System.Data.MetadataException: Unable to load the specified metadata resource.

    - by Dani
    I have a ASP.NET MVC 2 project. I've created edmx file on the class library project that holds the model. now I've created another class library called it shared and moved the edmx file over there. resolved some issues, everything compiles, but it can't find the connection string resource at runtime. I've copied the ConnectionString part of the Web.Config to the main file, the old class library app.config file and the new class library app.config file. Still get this error: System.Data.MetadataException: Unable to load the specified metadata resource. Line 75: public myProjdb() : base("name=myProjdb", "MyProjdb") in the MyProj.Designer.cs file. Any Idea how to resolve this issue ? Is there a better way to store connection string data ?

    Read the article

  • Make a shortcode echo in the middle of an URL in HREF

    - by Liso22
    The shortcode [mmjs-city] echoes the city the user is in. I want to make a link that takes the user to a results page with the user's city as search term. Basically the URL should be the results page URL + the result of the shortcode (the city). I tried to write it this way: Search for your city Normally I would just use PHP and assign the city to a value but I'm in a page not the theme and PHP doesn't work on pages for some reason, most likely It's possible but I don't know how. Anyway, anybody knows how could I do it? Thanks and merry christmas

    Read the article

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