Search Results

Search found 1066 results on 43 pages for 'silly dg'.

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

  • C# MultiThread Safe Class Design

    - by Robert
    I'm trying to designing a class and I'm having issues with accessing some of the nested fields and I have some concerns with how multithread safe the whole design is. I would like to know if anyone has a better idea of how this should be designed or if any changes that should be made? using System; using System.Collections; namespace SystemClass { public class Program { static void Main(string[] args) { System system = new System(); //Seems like an awkward way to access all the members dynamic deviceInstance = (((DeviceType)((DeviceGroup)system.deviceGroups[0]).deviceTypes[0]).deviceInstances[0]); Boolean checkLocked = deviceInstance.locked; //Seems like this method for accessing fields might have problems with multithreading foreach (DeviceGroup dg in system.deviceGroups) { foreach (DeviceType dt in dg.deviceTypes) { foreach (dynamic di in dt.deviceInstances) { checkLocked = di.locked; } } } } } public class System { public ArrayList deviceGroups = new ArrayList(); public System() { //API called to get names of all the DeviceGroups deviceGroups.Add(new DeviceGroup("Motherboard")); } } public class DeviceGroup { public ArrayList deviceTypes = new ArrayList(); public DeviceGroup() {} public DeviceGroup(string deviceGroupName) { //API called to get names of all the Devicetypes deviceTypes.Add(new DeviceType("Keyboard")); deviceTypes.Add(new DeviceType("Mouse")); } } public class DeviceType { public ArrayList deviceInstances = new ArrayList(); public bool deviceConnected; public DeviceType() {} public DeviceType(string DeviceType) { //API called to get hardwareIDs of all the device instances deviceInstances.Add(new Mouse("0001")); deviceInstances.Add(new Keyboard("0003")); deviceInstances.Add(new Keyboard("0004")); //Start thread CheckConnection that updates deviceConnected periodically } public void CheckConnection() { //API call to check connection and returns true this.deviceConnected = true; } } public class Keyboard { public string hardwareAddress; public bool keypress; public bool deviceConnected; public Keyboard() {} public Keyboard(string hardwareAddress) { this.hardwareAddress = hardwareAddress; //Start thread to update deviceConnected periodically } public void CheckKeyPress() { //if API returns true this.keypress = true; } } public class Mouse { public string hardwareAddress; public bool click; public Mouse() {} public Mouse(string hardwareAddress) { this.hardwareAddress = hardwareAddress; } public void CheckClick() { //if API returns true this.click = true; } } }

    Read the article

  • Amazon Product Advertising API: XXX is not a valid value for BrowseNodeId

    - by Chris
    Hello, I am using the Amazon product Advertising API to fetch the product categories. For US categories it is working. But using browse nodes from different sites I get the following error: "569604 is not a valid value for BrowseNodeId. Please change this value and retry your request." I got the browse-nodes from the following site: http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?BrowseNodeIDs.html Where is the problem? Thanks for your help!

    Read the article

  • Toggle row visibility one at a time

    - by kuswantin
    I have a couple of tables with similar structures like this: <table> <tbody> <tr>content</tr> <tr>content</tr> <tr>content</tr> <tr>content</tr> <tr>content</tr> <tr>content</tr> <tr>content</tr> <tr>content</tr> ..etc --- The fake button is added here <div class="addrow">Add another</div> </tbody> </table> Since this is a long list, I have a need to toggle the rows one at a time. I just need to show the first row, of course, the rest should be toggled. The action is when I click a dynamic fake button, it will show row no. 2, and clicking again will show another next row. This is what I have done so far: $("table#field_fruit_values tr.draggable").not(':first').hide(); $("table#field_vegetables_values tr.draggable").not(':first').hide(); $("body.form table.content-multiple-table tbody").append('<div class="addrow">Add</div>'); $(".addrow").click(function() { var hiddenRow = $(this).prev('tr.draggable'); $(this).prev(hiddenRow + 1).show(); //if (hiddenRow + ':last').length) { // <= silly logic // $(this).hide(); //} }); The button only works for one row. I must have done something wrong :) When the final is reached, I also want the button to disappear. Sorry if this question sound silly. Any help would be very much appreciated. Thanks.

    Read the article

  • Correct way to do timer function in Python

    - by bwawok
    Hi. I have a GUI application that needs to do something simple in the background (update a wx python progress bar, but that doesn't really matter). I see that there is a threading.timer class.. but there seems to be no way to make it repeat. So if I use the timer, I end up having to make a new thread on every single execution... like : import threading import time def DoTheDew(): print "I did it" t = threading.Timer(1, function=DoTheDew) t.daemon = True t.start() if __name__ == '__main__': t = threading.Timer(1, function=DoTheDew) t.daemon = True t.start() time.sleep(10) This seems like I am making a bunch of threads that do 1 silly thing and die.. why not write it as : import threading import time def DoTheDew(): while True: print "I did it" time.sleep(1) if __name__ == '__main__': t = threading.Thread(target=DoTheDew) t.daemon = True t.start() time.sleep(10) Am I missing some way to make a timer keep doing something? Either of these options seems silly... I am looking for a timer more like a java.util.Timer that can schedule the thread to happen every second... If there isn't a way in Python, which of my above methods is better and why?

    Read the article

  • permanently map a network drive osx leopard

    - by kevyn
    I want to have a mapped drive in OSX which points to my NAS - however I've found that I have to do it after every single reboot. I'm a mac noob, so would like to just have the drive mapped at all times like windows does, but instead each time I reboot and forget to map the drive, I accidentally open itunes and find no music as it's all stored on my NAS! is there a simple way of doing this? have I missed something really silly?

    Read the article

  • Amazon EC2 - HTTPS - Certificate body is invalid. The body must not contain a private key

    - by Tam Minh
    I'm very new to Amazon EC2. I am trying to setup https for my website, I follow the offical instruction from amazon doc: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https.html When I Upload a Signed Certificate using AWS command aws iam upload-server-certificate --server-certificate-name dichcumga --certificate-body file://mycert.pem --private-key file://signedkey.pem --certificate-chain file://mychain.pem And I got error A client error (MalformedCertificate) occurred when calling the UploadServerCert ificate operation: Certificate body is invalid. The body must not contain a private key. mycert.pem is a combination of private.pem and signedkey.pem (which return by VeriSign) copy private.pem+signedkey.pem mycert.pem Please help to shed a light. Thank you in advance.

    Read the article

  • Having problems install py2app 0.5.2

    - by Francis Young
    Hi there, I am a beginner at python so please excuse me for silly comments or rookie mistakes that i make. I was trying to install py2app 0.5.2 and i hit an error: $Best match: altgraph 0.7.1 $Downloading http://pypi.python.org/packages/source/a/altgraph/altgraph-$0.7.1.tar.gz#md5=f65988bf153410a8514bcdad6a3a8ba6 $Processing altgraph-0.7.1.tar.gz $Running altgraph-0.7.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-GGBuKJ/altgraph-$\0.7.1/egg-dist-tmp-NdWVjC $error: doc/changelog.rst: No such file or directory I was wondering what the solution to this problem is?

    Read the article

  • Upload a Signed Certificate to Amazon EC2

    - by Tam Minh
    I'm very new to Amazon EC2. I am trying to setup https for my website, I follow the offical instruction from amazon doc: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https.html And I get stuck at Upload the Signed Certificate step aws iam upload-server-certificate --server-certificate-name <certificate_object_name> --certificate-body <public_key_certificate_file> --private-key <privatekey.pem> --certificate-chain <certificate_chain_file> As a instruction, I just create a private key (privatekey.pem) and A Certificate Signing Request (csr.pem), but in the command line they request 4 params 1. certificate_object_name 2. public_key_certificate_file 3. *private-key --> I only have this one* 4. certificate_chain_file I don't know where to get 3 remain params, please help to shed a light. Thank you in advance.

    Read the article

  • AMD Phenom 2 is idling at 50°C, can I get it cooler?

    - by liam
    Is it possible to damage a CPU so that it works, but only at high temperatures? My Phenom 2 1090T is idling at 50°C and I have tried everything to get it down. I can play Deus Ex HR, Arkham City, or Dirt 3 and it hovers around 60. I have cleaned out all my fans: 2 intake (front and side), 1 exhaust (Arctic Freezer). My machine is a brand new Antec 520 high current gamer. Also: Extreme3 770 8 GB Kingston DDR3 (2x4 GB) 750 GB Seagate Barracuda ASUS Xonar DG Radeon HD 5670 New Arctic Freezer Pro Rev 2 (days old and mounted properly with Arctic Silver 5). I also dropped an Athlon 250 dual core into my rig and that ran at under 30. Is the CPU dying? I know that 50°C idle for an AMD is not normal.

    Read the article

  • beanstalk using php-git on windows client

    - by ntidote
    I am trying to install beanstalk for php using git. I am using a Windows Client machine. I am done with the prerequisite installations , credentials setup. I am following the link http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_PHP.sdlc.html The following step does not workout (i use git bash for git related commands) From your Git repository directory, type the following command. git aws.config This gives the error git : 'aws.config' is not a git command. Please suggest how to deal with the issue.

    Read the article

  • Cant access a remote server due mistake by setting firewall rule

    - by LMIT
    I need help due a my silly mistake! So for long time i have a dedicate server hosted by register.it Usually i access remotly to this server (Windows 2008 server) by Terminal Server. Today i wanted to block one site that continually send request to my server. So i was adding a new rule in the firewall (the native firewall on windows 2008 server), as i did many time, but this time, probably i was sleeping with my brain i add a general rules that stop everything! So i cant access to the server anymore, as no any users can browse the sites, nothing is working because this rule block everything. I know that is a silly mistake, no need to tell me :) so please what i can do ? The only 1 thing that my provider let me is reboot the server by his control panel, but this not help me in any way because the firewall block me again. i have administrator username and password, so what i really can do ? there are some trick some tecnique, some expert guru that can help me in this very bad situation ? UPDATE i follow the Tony suggest and i did a NMAP to check if some ports are open but look like all closed: NMAP RESULT Starting Nmap 6.00 ( http://nmap.org ) at 2012-05-29 22:32 W. Europe Daylight Time NSE: Loaded 93 scripts for scanning. NSE: Script Pre-scanning. Initiating Parallel DNS resolution of 1 host. at 22:32 Completed Parallel DNS resolution of 1 host. at 22:33, 13.00s elapsed Initiating SYN Stealth Scan at 22:33 Scanning xxx.xxx.xxx.xxx [1000 ports] SYN Stealth Scan Timing: About 29.00% done; ETC: 22:34 (0:01:16 remaining) SYN Stealth Scan Timing: About 58.00% done; ETC: 22:34 (0:00:44 remaining) Completed SYN Stealth Scan at 22:34, 104.39s elapsed (1000 total ports) Initiating Service scan at 22:34 Initiating OS detection (try #1) against xxx.xxx.xxx.xxx Retrying OS detection (try #2) against xxx.xxx.xxx.xxx Initiating Traceroute at 22:34 Completed Traceroute at 22:35, 6.27s elapsed Initiating Parallel DNS resolution of 11 hosts. at 22:35 Completed Parallel DNS resolution of 11 hosts. at 22:35, 13.00s elapsed NSE: Script scanning xxx.xxx.xxx.xxx. Initiating NSE at 22:35 Completed NSE at 22:35, 0.00s elapsed Nmap scan report for xxx.xxx.xxx.xxx Host is up. All 1000 scanned ports on xxx.xxx.xxx.xxx are filtered Too many fingerprints match this host to give specific OS details TRACEROUTE (using proto 1/icmp) HOP RTT ADDRESS 1 ... ... ... 13 ... 30 NSE: Script Post-scanning. Read data files from: D:\Program Files\Nmap OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 145.08 seconds Raw packets sent: 2116 (96.576KB) | Rcvd: 61 (4.082KB) Question: The provider locally can access by username and password ?

    Read the article

  • My 5.1 audio system not working properly when I connect to Internet

    - by Gemboz
    I just bought a Genuis 5005 5.1 audio system, and I have an issue with it: It won't work properly when I get on the Internet (the central speaker isn't working). I also bought an Asus Xonar DG 5.1 sound card which works perfectly. I installed it and also installed the driver for it. When I play music/videos from my hard drive, all the speakers work fine, but when I connected to Internet to play videos/music, the center speaker won't work. How can I fix this issue?

    Read the article

  • Install compiled linux program on multiple computers

    - by jtnire
    I'm sorry if this sounds like a silly question, but when I compile something on linux using the usual "./configure, make, make install" steps, how can I install the programs on other servers without having to recompile? I am trying to avoid having to install the build tools on production servers, however I need the latest version of a particular piece of software, so using RPMs isn't an option in this case. Any help is appreciated. Thanks

    Read the article

  • Networked filesystem with user level security for linux

    - by Konrads
    Hi, I want to enable file sharing between servers and clients, both linux. I don't want to rely on machine trust like in NFSv4 because client users will have root privileges. What are my options besides SMB (SAMBA)? Does OpenAFS support user level authentication & access? Using mounted WebDAV/ftp/sshfs seems silly for LAN.

    Read the article

  • How to make Google Search look dumb?

    - by nasekt
    I know its a silly question,but i want the search results to be intentionally inaccurate. Sorry, i am not fluent in english,so i will explain using the images below with Breaking Bad tv series as an example : Pic[1]: http://i.imgur.com/QN741LV.jpg Pic[2]: http://i.imgur.com/QcaoV8c.jpg Using (-) sign i can exclude unwanted results,but dont want the other users become aware of it Any script and software that can help me achieve this? Thank you for your help in advance.

    Read the article

  • ubuntu gnome short cut keys

    - by benjipete
    Hi, I have done something quite silly and not sure how to fix it. I modified some of the gnome keyboard short cuts and was trying to disable the "Run Application" command. In the process I assigned it to the delete key and every time I hit delete the "Run Application" window comes up. It would not normally be a problem but the "Keyboard Shortcuts" no long has the short cut in the window so I can't disable it. Any help advice would be appreciated. Cheers Ben

    Read the article

  • How to set up "vi" shell environment as default

    - by Ency
    It could by silly question, but I can not find answer anywhere. So, I'd like to use vi (you know set -o vi can do the trick) as default in my shell instead of emacs, but I do not want to put it into bash startup scripts. Why? Because I work as verification engineer and I am using several user accounts, which are also quite often reinstalled. Changing of default profile is not answer too, because some of software creates its own home directory (independent on default profile).

    Read the article

  • Grub2 + Xen: How to solve "Can't find hypervisor information in sysfs"

    - by Jack
    I am trying to solve the "Can't find hypervisor information in sysfs" problem when invoking "xm". I have found in some sites that the solution is to rename *10_linux* into *50_linux*, however if I do this, whenever I reboot my computer, the memtest starts (so I have to reset the previous grub configuration through a live cd). I am aware that it might be a silly question, but does anyone have a workaround?

    Read the article

  • What are the default groups assigned to the first user in Ubuntu Server?

    - by Wayne Koorts
    I just made a silly mistake on my Ubuntu Server box: I added myself to a group using usermod -G, after which I discovered the -a option... The result is that I am now out of the admin group, and lost my sudo rights. I can sort that out, but I want to know what other groups I may been removed from? My user was the first one so what I'm looking for is a list of groups that the first user gets added to at installation time.

    Read the article

  • Transform a NTFS partition type into EISA

    - by doug
    hi there Some time ago I've installed windows 7 on my laptop which has a EISA partition with MS Vista. I really don't remember what I did(I'm silly i Know) but now, that EISA partition has NTFS type but is also hidden. Does anyone knows how can I make that NTFS partition into a EISA partition type, as it was build when I've buyed the laptop? TY

    Read the article

  • Disable scroll acceleration (windows/lenovo)

    - by dhardy
    Exactly the opposite of http://superuser.com/questions/101482/global-scroll-acceleration-in-windows, is there a way to disable scroll-accelartion on windows (touchpad -- maybe from lenovo drivers). It's heck of annoying -- using no accelartion but high sensitivity like on linux is so much more precise. ( With this silly acceleration, I either have incredibly slow scrolling, or scrolling so fast it skips whole chunks of text at once. Speed control but not acceleration control. Could say the same for mouse cursor, though that's less annoying. )

    Read the article

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