Daily Archives

Articles indexed Saturday January 15 2011

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

  • jquery / javascript for a user to select 1 of n images

    - by TesterTurnedDeveloper
    I want to display a few images (probably 5 max) and have a user click to select one. First thing I tried was radio buttons and putting the images inside labels. <input type="radio" name="BackgroundId" id="BackgroundId" value="1" /> <label for="BackgroundId"><img src="../../Content/images/thumb_1.jpg" /></label> Firefox will select the radio button when the user clicks the image, but IE doesn't. Is there a jquery plugin that will make the images clickable? Fancy-form looks like something I could use, but it isn't jquery and I've already got jquery in my project. Or can someone point me to a better way of selecting a single image?

    Read the article

  • iPhone Application failing to come back from sigkill

    - by overscore
    I have no idea if this is intended behaviour, but whenever the application exits (say, the user is double-clicking the home button and pressing on the red dash on the icon) I get the dreaded SIGKILL. Now, when I try to launch the app again all I get is the old screen state and a frozen (I presume ?) program. It could be because of clunky memory management, but NSZombieEnabled doesn't seem to agree. Any thoughts ?

    Read the article

  • _CrtDumpMemoryLeaks truncated output??

    - by Marin
    Hello, I am trying to use Visual Studio's capability to detect memory leaks, but I keep getting truncated output, like: Dumping objects -> {174} normal block at 0x0099ADB8, 48 bytes long. Data: <h:\najnovije\tru> 68 3A 5C 6E 61 6A 6E 6F 76 69 6A 65 5C 74 72 75 {170} normal block at 0x0099AD58, 32 bytes long. Data: <h:\najnovije\tru> 68 3A 5C 6E 61 6A 6E 6F 76 69 6A 65 5C 74 72 75 Object dump complete. What am I doing wrong? I added #define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> to the beginning of my code. Thank you.

    Read the article

  • Common Utility for Exception Searching

    - by Andrew
    I wrote this little helper method to search the exception chain for a particular exception (either equals or super class). However, this seems like a solution to a common problem, so was thinking it must already exist somewhere, possibly in a library I have already imported. So, any ideas on if/where this might exist? boolean exceptionSearch(Exception base, Class<?> search) { Throwable e = base; do { if (search.isAssignableFrom(e.getClass())) { return true; } } while ((e = e.getCause()) != null); return false; }

    Read the article

  • In Blackberry, how are shared objects in runtimestore recognized by other applications

    - by Carbonizer
    In Blackberry Runtime Store, when sharing objects between applications. How can we call methods of the shared object in another application, if the object itself is not recognized in the other application ? i am getting a runtime error when object gets typecasted, as that object is not defined in the calling applicatoin . If i typecast it to super interface and have the interface in another application. When i call getClass() on the object returned from the runtimestore. It shows as concrete class instance stored in the RunTimeStore. How can a share a object in runtimestore and use it across different applications ?

    Read the article

  • How to make a plot from summaryRprof?

    - by ThorDivDev
    This is a question for an university assignment. I was given three algorithms to calculate the GCD that I already did. My problem is getting the Rprof results to a plot so I can compare them side by side. From what little understanding I have about Rprof, summaryRprof and plot is that Rprof is used like this: Rprof() #To start #functions here Rprof(NULL) #TO end summaryRprof() # to print results I understand that plot has many different types of inputs, x and y values and something called a data frame which I assume is a fancy word for table. and to draw different lines and things I need to use this: http://www.harding.edu/fmccown/r/ what I cant figure out is how to get the summaryRprof results to the plot() function. > Rprof(filename="RProfOut2.out", interval=0.0001) > gcdBruteForce(10000, 33) [1] 1 > gcdEuclid(10000, 33) [1] 1 > gcdPrimeFact(10000, 33) [1] 1 > Rprof(NULL) > summaryRprof() ?????plot???? I have been reading on stack overflow that and other sites that I can also try to use profr and proftools although I am not very clear on the usage. The only graph I have been able to make is one using plot(system.time(gcdFunction(10,100))) As always any help is appreciated.

    Read the article

  • Autodiscover service seems to reply with User Principal Name instead of email address

    - by Jeff McJunkin
    After this latest round of Windows updates (on 1/11/11, in fact) my Exchange 2007 server of course rebooted. This may have had the side effect of making any changes I'd inadvertently made take effect. Since then, the Autodiscover service in Exchange 2007 from Outlook 2007 seems to reply with the User Principal Name ([email protected] instead of [email protected]). I'm specifically seeing this from within the "Test Email AutoConfiguration" tool in Outlook (the UPN appears in the first text box labeled "E-mail") and when creating a new profile in Outlook. If I disregard the UPN and instead fill in my email address, Autodiscover works as expected and I can connect without issue. I've confirmed using ADSI Edit that the SMTP email address is properly set for my users. I even went a bit crazy and set the UPN to the email address using ADSI Edit. I've re-installed the Client Access role on the server in question. Exchange server is Server 2008, 64-bit of course. Clients are mostly XP 32-bit, though the issue happens from a Windows 7 machine as well.

    Read the article

  • Is it possible to change the Raid5 chunk size of an existing device?

    - by AlexCombas
    I have an existing raid5 device which I created using mdadm on Linux. When I created the device I set the chunk size to 64 but I would like to test the performance of various sizes but I don't want to have to rebuild my entire system to do so. If it is not possible to do it live then is it possible to do this by booting with a rescue disk? Any advice on the steps how to do this, either live or with a rescue disk, will be greatly appreciated.

    Read the article

  • Using Plesk for webhosting on Ubuntu - Security risk or reasonably safe?

    - by user66952
    Sorry for this newb-question I'm pretty clueless about Plesk, only have limited debian (without Plesk) experience. If the question is too dumb just telling me how to ask a smarter one or what kind of info I should read first to improve the question would be appreciated as well. I want to offer a program for download on my website hosted on an Ubuntu 8.04.4 VPS using Plesk 9.3.0 for web-hosting. I have limited the ssh-access to the server via key only. When setting up the webhosting with Plesk it created an FTP-login & user is that a potential security risk that could bypass the key-only access? I think Plesk itself (even without the ftp-user-account) through it's web-interface could be a risk is that correct or are my concerns exaggerated? Would you say this solution makes a difference if I'm just using it for the next two weeks and then change servers to a system where I know more about security. 3.In other words is one less likely to get hacked within the first two weeks of having a new site up and running than in week 14&15? (due to occurring in less search results in the beginning perhaps, or for whatever reason... )

    Read the article

  • Ubuntu Laptop as a wireless hotspot on bridge mode

    - by nixnotwin
    I have a wired router to which my ubuntu laptop connects via ethernet. The wierless NIC of the laptop acts as a wireless hotspot on master mode. I use hostapd fo this. I have bridged eth0 and wlan0, so my wireless clients that connect to my laptop over wifi get ip from the wired router via dhcp, so the devices get registered at the wired router ( and the laptop is just an access point). I use the following commands to get my laptop+accesspoint working: sudo brctl addbr br0 sudo brctl addif br0 eth0 sudo hostapd /etc/hostapd/hostapd.conf & sudo dhclient -d br0 & sudo ifconfig wlan0 192.168.1.15 netmask 255.255.255.0 up sudo brctl addif br0 wlan0 These commands enable me to access internet on my wireless clients and also on the laptop which is acting as wireless accesspoint. But if I reboot the wired router (without rebooting the laptop that is acting as accesspoint), Internet access on the laptop+accesspoint gets lost, but on wireless clients it works fine. Even I have not been able to figure out a command which will reset the laptop interfaces to default settings, so everytime the router reboots, I have to reboot the laptop too to get into default settings so that I can re-enter the above mentioned commands. My first question is How can I have my bridge+accesspoint up and running even-though the router reboots? And is there a command to set the interfaces to a default state? (ifdown -a doesn't work, after issuing the command the bridge still remained).

    Read the article

  • nginx and awstats and 404's

    - by user66700
    I'm running awstats server stats log from another machine, nginx.conf: http://pastebin.com/buKAdfdd cgi-bin.conf: http://pastebin.com/qbbJ1rwK But I'm getting 404 when I visit http://domain2.com/awstats/awstats.domain.com.html (and the 23 files are there..) in /var/www/awstats/ I was following this, but not sure how to resolve the 404's http://www.goitworld.com/analysis-access-logs-of-nginx-by-awstats/

    Read the article

  • Unable to create a Windows 7 system image of a failing hard drive

    - by Rahul
    The hard disk of my one year old T400 Thinkpad has started failing periodic hardware tests. I get a "Targeted Read Test Failed" error. The "SMART short self test" times out. I am now trying to create a Windows 7 System image of the hard disk but it fails without giving any specific error messages. I tried using Comodo Backup but got an error (code 101117) there as well. I have copied the important files in Dropbox but would like to take a full System backup as I have plenty of software installed on the machine. Does anyone know why this is happening and how I can take a backup of the system image ?

    Read the article

  • gnome-terminal — get path by draging files into terminal

    - by user62046
    I use colinux, see http://www.colinux.org/ ; I used the ubuntu image (ubuntu without desktop environment) and install the packages gdm ?x-window-system-core and gnome-core and update to 10.04. the default user ( which is the only one user) is root. When I try to drag a file into gnome-terminal, I don't get the path of this file, instead the image of this file just came back to the original place. Anyone knows why this happened?

    Read the article

  • Wireless internet connection connects but internet does not work (no packets received). Wired does.

    - by Rodney
    When I connect my PC via ethernet cable to my ADSL router it works fine. When I connect via Wireless it connects and the internet will work for a random amount of time and then stop working. It stays connected with a strong signal but no packets are received. My laptop/iphone are right next to it and wireless works fine. If I open the Wireless USB status, it says it is connected to my SSID with full strength (54 mps - I am 3 meteres away from my router) and the activty shows as Packets 594 SENT and 105 RECEIVED (this goes up VERY slowly) I have tried the following: Turned off anitvirus and firewall completely. Tested the wifi signal- I am writing this on my laptop which is next to my PC and also has full wifi strength. Tried a different wireless adapter - I dug out an old PCI wireless card - it does the exact same thing. Compared all wireless settings to my laptop. I can ping google.com and it replies (sometimes with packet loss) When I reboot the PC it will connect for a minute or two (random time) and then just stops again. I tried Firefox, IE etc. no joy I have updated all latest versions (Netgear WG111v2) and drivers Checked Event Log - nothing unusual Ping the router (and even connect as admin for the few minutes when the internet does work) Changed the MTU down to 1200 using DrTCP Checked Device Manager for conflicts - none. I ping the router from the PC (192.168.0.10 - 192.168.0.1) and it replies with 4 packets. BUT, on my router admin page (which I access via http on my laptop wirelessly) - if I ping 192.168.0.10 all packets timeout (pinging my laptop 192.168.0.12 works fine) My router admin page shows the leased IP address for 192.168.0.10 (ie it is definitely talking to the router initially) Now I am out of ideas - please help. I think it is an OS/Software issue as I have tried 2 different wireless adapaters (PCI and USB) with the same result but all other wireless devices work fine around mine). It's not the firewall. It is getting assigned an IP address correctly (my PC gets 192.168.0.10, my laptop is .12) It is assigned by DHCP. As soon as I plug in the ethernet cable it all works fine. Repairing the adapter sometimes helps but it will always stop working after a random time. The wireless adapter always shows as connected with Excellent signal but the internet does not work. I am running Windows XP SP3 and have tried a Netgear WG111v2 USB adapter. Thanks in advance! UPDATE: The internet seems to be working, it is just either sending packets too small or slow to work (some small pages load bits of them very slowly but then hang). XP seems to have a networking diagnostic app - here is the output: Last diagnostic run time: 08/30/10 08:16:38 IP Configuration Diagnostic Invalid IP address info Valid IP address detected: 192.168.0.10 IP Layer Diagnostic Corrupted IP routing table info The default route is valid info The loopback route is valid info The local host route is valid info The local subnet route is valid Invalid ARP cache entries action The ARP cache has been flushed Gateway Diagnostic Gateway info The following proxy configuration is being used by IE: Automatically Detect Settings:Disabled Automatic Configuration Script: Proxy Server: Proxy Bypass list: info This computer has the following default gateway entry(ies): 192.168.0.1 info This computer has the following IP address(es): 192.168.0.10 info The default gateway is in the same subnet as this computer info The default gateway entry is a valid unicast address info The default gateway address was resolved via ARP in 1 try(ies) info The default gateway was reached via ICMP Ping in 1 try(ies) info TCP port 80 on host 65.55.12.249 was successfully reached info The Internet host www.microsoft.com was successfully reached info The default gateway is OK DNS Client Diagnostic DNS - Not a home user scenario info Using Web Proxy: no info Resolving name ok for (www.microsoft.com): yes No DNS servers DNS failure HTTP, HTTPS, FTP Diagnostic HTTP, HTTPS, FTP connectivity info FTP (Passive): Successfully connected to ftp.microsoft.com. info HTTP: Successfully connected to www.microsoft.com. warn HTTPS: Error 12002 connecting to www.microsoft.com: The operation timed out warn HTTPS: Error 12002 connecting to www.passport.net: The operation timed out error Could not make an HTTPS connection. info Redirecting user to support call WinSock Diagnostic WinSock status info All base service provider entries are present in the Winsock catalog. info The Winsock Service provider chains are valid. info Provider entry MSAFD Tcpip [TCP/IP] passed the loopback communication test. info Provider entry MSAFD Tcpip [UDP/IP] passed the loopback communication test. info Provider entry RSVP UDP Service Provider passed the loopback communication test. info Provider entry RSVP TCP Service Provider passed the loopback communication test. info Connectivity is valid for all Winsock service providers. Wireless Diagnostic Wireless - Service disabled Wireless - User SSID action User input required: Specify network name or SSID Wireless - First time setup info The Wireless Network name (SSID) to which the user would like to connect = RodSof Wifi. Wireless - Radio off info Valid IP address detected: 192.168.0.10 Wireless - Out of range Wireless - Hardware issue Wireless - Novice user Wireless - Ad-hoc network Wireless - Less preferred Wireless - 802.1x enabled Wireless - Configuration mismatch Wireless - Low SNR Network Adapter Diagnostic Network location detection info Using home Internet connection Network adapter identification info Network connection: Name=Local Area Connection 2, Device=Realtek RTL8168C(P)/8111C(P) PCI-E Gigabit Ethernet NIC, MediaType=LAN, SubMediaType=LAN info Network connection: Name=Wireless USB, Device=NETGEAR WG111v2 54Mbps Wireless USB 2.0 Adapter, MediaType=LAN, SubMediaType=WIRELESS info Both Ethernet and Wireless connections available, prompting user for selection action User input required: Select network connection info Wireless connection selected Network adapter status info Network connection status: Connected HTTP, HTTPS, FTP Diagnostic HTTP, HTTPS, FTP connectivity info FTP (Active): Successfully connected to ftp.microsoft.com. warn HTTP: Error 12007 connecting to www.microsoft.com: The server name or address could not be resolved warn HTTP: Error 12002 connecting to www.hotmail.com: The operation timed out warn HTTPS: Error 12002 connecting to www.passport.net: The operation timed out warn HTTPS: Error 12002 connecting to www.microsoft.com: The operation timed out error Could not make an HTTP connection. error Could not make an HTTPS connection.

    Read the article

  • Second CPU missing of Dual Core

    - by Zardoz
    My Lenovo T61 has a dual core CPU. I just noticed that under Ubuntu 10.10 only one CPU is recognized. I know that once both CPUs worked. Not sure since when the second CPU is missing. Maybe since the last kernel update. Currently I am using linux-image-2.6.35-23-generic (for x86_64). What can I do to enable the second CPU again? Here the ouput of /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz stepping : 6 cpu MHz : 800.000 cache size : 3072 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm ida dts tpr_shadow vnmi flexpriority bogomips : 4189.99 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: Any help is welcome. I really need that CPU power for my work here.

    Read the article

  • Motivating developers in a project perceived as **dull** ?

    - by Fanatic23
    As a manager, I can't always end up generating work that'd be cutting edge. Some of the projects do run on maintenance mode, and generate a healthy free cash flow for the company. As a developer what would it take for you to stick around in this project? I have been thinking of re-branding the work, but I could do with a lot of help here. Appreciate a single response per post. Please don't suggest an increased pay-packet, this creates more problems than it solves.

    Read the article

  • USB mouse freezes

    - by Zabba
    A simple Microsoft Optical mouse 1000 (USB) that runs perfectly on Windows, freezes up under Ubuntu 10.x and Fedora 1x after about 10 minutes of using the OS.Rebooting, the same problem comes up again in a few minutes. Interestingly, the problem does not occur when Ubuntu is installed in Oracle VirtualBox VM. Installing Ubuntu "as usual" (i.e. not in a VM), causes the problem to occur. Has any one here faced the same problem or have a solution for it? Maybe using a different mouse that is known to work with Ubuntu 10.x? If it helps my system is: Asus P5NSLI motherboard (nVidia nForce 570 chipset), 4 GB RAM Ubuntu 10.10 refers to "32 bit" version of Ubuntu It seems that Ubuntu has a lot of all types of freeze issues. Can someone recommend a version of Ubuntu that is fairly recent and stable ? I intend to use Ubuntu for Ruby on Rails development.

    Read the article

  • Projects to learn Python

    - by Andrew
    I know this isn't a question about a specific snippet of code or anything, but here goes - I've been messing around with the idea of learning Python since I'm pretty bored with PHP (and web development in general), but I can't think of any projects to help me learn. I've already worked through some of Project Euler with Python, but it's getting old. I know the basics, and I want to write something more fun that will introduce me to new things in Python. Is there a cliche beginner project for Python? (for example, PHP's would be a blog or something similiar) Are there any common Python projects for newcomers, or any uncommon ones that you'd suggest? Any ideas would help.

    Read the article

  • Sending JSON to a server

    - by SK9
    I'm running the following Java, an HttpURLConnection PUT request with JSON data that will be sent from an Android device. I'll handle any raised exceptions after this is working. Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(nameString, pwdString.toCharArray()); } }); url = new URL(myURLString); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setDoOutput(true); urlConnection.setChunkedStreamingMode(0); urlConnection.setRequestMethod("PUT"); urlConnection.setRequestProperty("Content-Type", "application/json"); OutputStream output = null; try { output = urlConnection.getOutputStream(); output.write(jsonArray.toString().getBytes()); } finally { if (output != null) { output.close(); } } int status = ((HttpURLConnection) urlConnection).getResponseCode(); System.out.println("" + status); urlConnection.disconnect(); I'm receiving an HTTP 500 error (internal error code), that an unexpected property is blocking the request. The JSONArray comprises JSONObjects whose keys I know are correct. The server is pretty standard, and expects HTTP PUTs with JSON bodies. Am I missing something glaring? Thanking you kindly in advance.

    Read the article

  • prevent onmouseout when hovering child element of the parent absolute div

    - by John
    Hi I am having trouble with the onmouseout function in a absolute positoned div. When the mouse hits a child element in the div, the mouseout event fires, but I do not want it to fire until the mouse is out of the parent, absolute div. How can I prevent the mouseout event from firing when it hits a child element WITHOUT jquery. I know this has something to do with event bubbling, but I am having no luck on finding out how to work this out. A similar post I found here: How to disable mouseout events triggered by child elements? How ever that solution uses jquery.

    Read the article

  • CodeBlocks, GCC: change project language c and c++?

    - by user394242
    When I select console project to start with, it lets you select c or c++, but once its created.. i can't figure out where to change it, and when you create a win32 gui application, it doesn't give you the option at all, and its default is c++.. where can i change to c? i have been looking in all the project settings for AGES. renaming my file from cpp to .c doesn't seem to do anything, it compiles the file as cpp. i know that without the ide, you just change your exe from g++ to gcc, but how do i set this for the current project in codeblocks?

    Read the article

  • Objective-C: Allocation in one thread and release in other

    - by user423977
    Hi I am doing this in my Main Thread: CCAnimation *anim; //class variable [NSThread detachNewThreadSelector:@selector(loadAimation) toTarget:self withObject:nil]; In loadAimation: -(void) loadAimation { NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init]; anim = [[CCAnimaton alloc] init]; [autoreleasepool drain]; } And in main thread I release it: [anim release]; Now I want to ask if this is fine regarding memory management.

    Read the article

  • Compose synthetic English phrase that would contain 160 bits of recoverable information

    - by Alexander Gladysh
    I have 160 bits of random data. Just for fun, I want to generate pseudo-English phrase to "store" this information in. I want to be able to recover this information from the phrase. Note: This is not a security question, I don't care if someone else will be able to recover the information or even detect that it is there or not. Criteria for better phrases, from most important to the least: Short Unique Natural-looking The current approach, suggested here: Take three lists of 1024 nouns, verbs and adjectives each (picking most popular ones). Generate a phrase by the following pattern, reading 20 bits for each word: Noun verb adjective verb, Noun verb adjective verb, Noun verb adjective verb, Noun verb adjective verb. Now, this seems to be a good approach, but the phrase is a bit too long and a bit too dull. I have found a corpus of words here (Part of Speech Database). After some ad-hoc filtering, I calculated that this corpus contains, approximately 50690 usable adjectives 123585 nouns 15301 verbs This allows me to use up to 16 bits per adjective (actually 16.9, but I can't figure how to use fractional bits) 15 bits per noun 13 bits per verb For noun-verb-adjective-verb pattern this gives 57 bits per "sentence" in phrase. This means that, if I'll use all words I can get from this corpus, I can generate three sentences instead of four (160 / 57 ˜ 2.8). Noun verb adjective verb, Noun verb adjective verb, Noun verb adjective verb. Still a bit too long and dull. Any hints how can I improve it? What I see that I can try: Try to compress my data somehow before encoding. But since the data is completely random, only some phrases would be shorter (and, I guess, not by much). Improve phrase pattern, so it would look better. Use several patterns, using the first word in phrase to somehow indicate for future decoding which pattern was used. (For example, use the last letter or even the length of the word.) Pick pattern according to the first bytes of the data. ...I'm not that good with English to come up with better phrase patterns. Any suggestions? Use more linguistics in the pattern. Different tenses etc. ...I guess, I would need much better word corpus than I have now for that. Any hints where can I get a suitable one?

    Read the article

  • Java how does Key Event Handling Mechanism(KeyListeners notified) work ?

    - by Carbonizer
    How does application/JVM know which classes if implemented key handling interfaces ? Does it use java Reflections or does it check all the classes for methods ? How can a application or executing JVM understanding to deliver the user event or call the specific methods on a class that implemented the keylistener interface. Does it look at all the classes if those methods are implemented or how does it know which classes implmented keylistener interface ? If you dont implement the keylistener Interface for a class but still implmentation all its methods. Do the class still process the user event occurred ?

    Read the article

  • Django Template - Convert python list into a javascript object

    - by amcashcow
    I am working on a django / python website I have a page where I want to display a table of search results The list of results is passed in to the template as normal I also want to make this list of objects accessible to the javascript code My first solution was just create another view that returned json format. But each page load required calling the query twice. So then I tried only downloading the data using the json view and printing the table using javascript. but this is also not desirable as now the presentation layer is mixed into the javascript code. is there a way to create a javascript object from the python list as the page is rendered?

    Read the article

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