Search Results

Search found 247 results on 10 pages for 'todd hunter'.

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

  • PowerShell: Read text, regex sort, write output to file and formatting

    - by Bill Hunter
    I am a Powershell novice and have run into a challenge in reading, sorting, and outputting a csv file. The input csv has no headers, the data is as follows: 05/25/2010,18:48:33,Stop,a1usak,10.128.212.212 05/25/2010,18:48:36,Start,q2uhal,10.136.198.231 05/25/2010,18:48:09,Stop,s0upxb,10.136.198.231 I use the following piping construct to read the file, sort and output to a file: (Get-Content d:\vpnData\u62gvpn2.csv) | %{,[regex]::Split($, ",")} | sort @{Expression={$[3]}},@{Expression={$_[1]}} | out-file d:\vpnData\u62gvpn3.csv The new file is written with the following format: 05/25/2010 07:41:57 Stop a0uaar 10.128.196.160 05/25/2010 12:24:24 Start a0uaar 10.136.199.51 05/25/2010 20:00:56 Stop a0uaar 10.136.199.51 What I would like to see in the output file is a similar format to the original input file with comma dilimiters: 05/25/2010,07:41:57,Stop,a0uaar,10.128.196.160 05/25/2010,12:24:24,Start,a0uaar,10.136.199.51 05/25/2010,20:00:56,Stop,a0uaar,10.136.199.51 But I can't quite seem to get there. I'm almost of the mind that I'll have to write another segment to read the newly produced file and reset its contents to the preferred format for further processing. Thoughts?

    Read the article

  • PHP - JSON Steam API query

    - by Hunter
    First time using "JSON" and I've just been working away at my dissertation and I'm integrating a few features from the steam API.. now I'm a little bit confused as to how to create arrays. function test_steamAPI() { $api = ('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key='.get_Steam_api().'&steamids=76561197960435530'); $test = decode_url($api); var_dump($test['response']['players'][0]['personaname']['steamid']); } //Function to decode and return the data. function decode_url($url) { $decodeURL = $url; $data = file_get_contents($url); $data_output = json_decode($data, true); return $data_output; } So ea I've wrote a simple method to decode Json as I'll be doing a fair bit.. But just wondering the best way to print out arrays.. I can't for the life of me get it to print more than 1 element without it retunring an error e.g. Warning: Illegal string offset 'steamid' in /opt/lampp/htdocs/lan/lan-includes/scripts/class.steam.php on line 48 string(1) "R" So I can print one element, and if I add another it returns errors. EDIT -- Thanks for help, So this was my solution: function test_steamAPI() { $api = ('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key='.get_Steam_api().'&steamids=76561197960435530,76561197960435530'); $data = decode_url($api); foreach($data ['response']['players'] as $player) { echo "Steam id:" . $player['steamid'] . "\n"; echo "Community visibility :" . $player['communityvisibilitystate'] . "\n"; echo "Player profile" . $player['profileurl'] ."\n"; } } //Function to decode and return the data. function decode_url($url) { $decodeURL = $url; $json = file_get_contents($decodeURL); $data_output = json_decode($json, true); return $data_output; } Worked this out by taking a look at the data.. and a couple json examples, this returns an array based on the Steam API URL (It works for multiple queries.... just FYI) and you can insert loops inside for items etc.. (if anyone searches for this).

    Read the article

  • Attempting to load a 64-bit application, how this CPU is not compatible with 64-bit mode

    - by Brandon Michael Hunter
    I have a Dell Studio 540, 64 bit OS Windows Home Premium. My CPU is supports Intel's virtualization technology, but I don't know how to enabled it on my machine. I saw that you can do it via the bios, but I didn't see this option when going through my BIOS. Is there another way to enabled this feature? Please let me know. I'm trying to installed Windows Server 2008 via Vircutal PC 2007. Thank You,

    Read the article

  • There has to be an easier way.. pulling data from mysql

    - by Daniel Hunter
    I need to pull 3 values from a table and assign each one to a variable each value is based on to columns, a type and an id $ht_live_query = mysql_query("SELECT htcode FROM coupon WHERE pid='$pid' AND type='L'"); $ht_live_result = mysql_fetch_array($ht_live_query); $htCODE_Live = $ht_live_result['htcode']; You can see that I am assigning the desired value to the variable $htL $ht_General_query = mysql_query("SELECT htcode FROM coupon WHERE pid='$pid' AND type='G'"); $ht_General_result = mysql_fetch_array($ht_General_query); $htCODE_General = $ht_General_result['htcode']; $ht_Reward_query = mysql_query("SELECT htcode FROM coupon WHERE pid='$pid' AND type='R'"); $ht_Reward_result = mysql_fetch_array($ht_Reward_query); $htCODE_Reward = $ht_Reward_result ['htcode']; I know I am doing this the hard way but can not figure out how to do the foreach or while loop to attain the desired results.

    Read the article

  • retrieved upload images in php

    - by hunter
    i want to retrieve image from client (ipod) programmed in objective c i use the following code $TARGET_PATH = "pics/"; $image = $_FILES['photo']; $TARGET_PATH =$TARGET_PATH . basename( $_FILES['photo']['name']); $TARGET_PATH =$TARGET_PATH.".jpg"; if(file_exists($TARGET_PATH)) { $TARGET_PATH =$TARGET_PATH .uniqid() . ".jpg"; } if (move_uploaded_file($image['tmp_name'], $TARGET_PATH)) { $TARGET_PATH="http://www.".$_SERVER["SERVER_NAME"]."/abc/".$TARGET_PATH; echo $TARGET_PATH; echo "image upload successfully";} else{ echo "could not upload image"; } this code upload five to six images successfully and after that it gives me error i.e Notice: Undefined index: photo in /home/abc/public_html/abc.com/fish/mycatch_post.php on line 42 Notice: Undefined index: photo in /home/abc/public_html/abc.com/fish/mycatch_post.php on line 53 could not upload image

    Read the article

  • String loops in Python

    - by Steve Hunter
    I have two pools of strings and I would like to do a loop over both. For example, if I want to put two labeled apples in one plate I'll write: basket1 = ['apple#1', 'apple#2', 'apple#3', 'apple#4'] for fruit1 in basket1: basket2 = ['apple#1', 'apple#2', 'apple#3', 'apple#4'] for fruit2 in basket2: if fruit1 == fruit2: print 'Oops!' else: print "New Plate = %s and %s" % (fruit1, fruit2) However, I don't want order to matter -- for example I am considering apple#1-apple#2 equivalent to apple#2-apple#1. What's the easiest way to code this? I'm thinking about making a counter in the second loop to track the second basket and not starting from the point-zero in the second loop every time.

    Read the article

  • C read X bytes from a file, padding if needed

    - by Hunter McMillen
    I am trying to read in an input file 64 bits at a time, then do some calculations on those 64 bits, the problem is I need to convert the ascii text to hexadecimal characters. I have searched around but none of the answers posted seem to work for my situation. Here is what I have: int main(int argc, int * argv) { char buffer[9]; FILE *f; unsigned long long test; if(f = fopen("input2.txt", "r")) { while( fread(buffer, 8, 1, f) != 0) //while not EOF read 8 bytes at a time { buffer[8] = '\0'; test = strtoull(buffer, NULL, 16); //interpret as hex printf("%llu\n", test); printf("%s\n", buffer); } fclose(f); } } For an input like this: "testing string to hex conversion" I get results like this: 0 testing 0 string t 0 o hex co 0 nversion Where I would expect: 74 65 73 74 69 6e 67 20 <- "testing" in hex testing 73 74 72 69 6e 67 20 74 <- "string t" in hex string t 6f 20 68 65 78 20 63 6f <- "o hex co" in hex o hex co 6e 76 65 72 73 69 6f 6e <- "nversion" in hex nversion Can anyone see where I misstepped?

    Read the article

  • click event working in Chrome but error in Firefox and IE

    - by Hunter Stanchak
    I am writing a messaging system with jquery. When you click on a thread title with the class '.open_message', It opens a thread with all the messages for that thread via Ajax. My issue is that when the thread title is clicked it is not recognizing the id attribute for that specific thread title in firefox and IE. It works fine in chrome, though. Here is the code: $('.open_message').on('click', function(e) { $(this).parent().removeClass('unread'); $(this).parent().addClass('read'); $('.message_container').html(''); var theID = e.currentTarget.attributes[0].value; theID = theID.replace('#', ''); var url = '".$url."'; var dataString = 'thread_id=' + theID; $('.message_container').append('<img id=\"loading\" src=\"' + url + '/images/loading.gif\" width=\"30px\" />'); $.ajax({ type: 'POST', url: 'get_thread.php', data: dataString, success: function(result) { $('#loading').hide(); $('.message_container').append(result); } }); return false; }); Thanks for the help!

    Read the article

  • Regex to find the text without a special character

    - by Hunter
    I have a paragraph, in that, some of the texts are surrounded with a specific html tag. I need to to find the text which are not surrounded by that specific html tag. For example AVG Antivirus for Smartphones and Tablets detects harmful apps and SMS. <font color='black'>AVG</font> Mobilation™ AntiVirus Pro for Android™ is a mobile security solution that helps protect your mobile device from viruses, malware, spyware and online exploitation in real-time. avg blah blah... I want to find the word AVG (case insensitive) which is not surrounded by <font color='black'> </font>. It can be part the word or single whole word. In the case of part of the text, the whole word containing the word AVG should not surrounded by that html tag How can I do it with Java?

    Read the article

  • SharePoint Search: processing filenames containing underscores

    - by Todd Owen
    We use SharePoint Server 2007 to allow employees to search network file shares, but it seems that underscores in filenames are not treated as word separators when indexing the files. As a result, a search for chocolate will: match "chocolate milkshake.doc" but not match "chocolate_cake.doc" (Of course, this is a simplified example; in practice the content of the second file might include the word "chocolate" and match on that instead of the filename. But the problem itself is real enough, because a common scenario in a corporate environment is that a user knows the the partial name of the file they are looking for and expects to see matching filenames at the top of the search results. And using underscores in filenames is a widely used convention within our company). Underscores are not treated as word separators in the file content either, although this is less of a concern for us. The root cause of this problem is possibly related to the behaviour of the word breakers that SharePoint uses (i.e. the language-specific DLLs that implement the IWorkBreaker interface), although I haven't confirmed this yet. Does anyone know of a workaround for this issue? I have tested with Search Server 2008 Express too (which is based on the same technology), and it is also affected. I do not know whether the problem is fixed in SharePoint 2010 or not.

    Read the article

  • Tool to determine filesystem on removable media

    - by Todd Brooks
    I have a CompactFlash card that is used in a custom piece of hardware. WAV files are written to it. Windows doesn't recognize the media and wants to format it, which rules out FAT 16/32, NTFS, UDF, etc. Is there a Windows tool that can determine what filesystem the media is using and possible read the contents? I've tried dskprobe.exe, but it did not work.

    Read the article

  • How to install Red Hat Enterprise Linux on Apple Macbook Pro MacBookPro4,1

    - by Todd V. Rovito
    I have a one year old Mac Book Pro that I am trying to get RHEL 5.4 installed on via bootcamp. No matter what I do I can't get the installer to boot. I have tried multiple DVD's and even verified the install works on a new Mac Book Pro. Most of the time the installer simply locks up. I usually use Linux text with all-generic-ide on the boot line. I removed the ide parameter and I just used linux text. The results I get are that a bunch of kernel messages appear then the background turns blue and a thin text box pops up saying its loading ata..... something it disappears too fast for me to read. Then the machine freezes. I pressed the alt function keys to see if I could look at the system log, here is what it says: Alt-f3 says "trying to mount CD device hda" Alt-f4 says status error: hda: lastFailedSense Hda: Failed opcode was: unknown Hda: Lost interrupt Hda: Drive not ready for command Ide-cd: command 0x3 timed out Above this junk it looks like it found the partition because it knew it was 20 GB and listed as /dev/sda3. I think it has something to do with the CD drive, is that possible? Thanks again for the support. PS I posted in the apple support forums ( Apple.com Support Discussions Boot Camp Installation and Storage) and didn't get an answer.

    Read the article

  • Upgrading MySQL Connector/Net

    - by Todd Grover
    I am trying to publish a website with our hosting provider. I am getting error due to the fact that they only allow a medium trust and the MySQL Connector/Net that I am using requires reflection to work. Unfortunately, reflection is not allowed in a medium trust. After some research I found out that the newest version of the MySQL Connector/Net may solve this problem. Connector/Net 6.6 includes enhancements to partial trust support to allow hosting services to deploy applications without installing the Connector/Net library in the GAC. I am thinking that will solve my problem. So, I unistalled MySQL Connector/Net 6.4.4 and I installed MySQL Connector/Net 6.6.4. When I run the application in Visual Studio 2010 I get the error: ProviderIncompatibleException was unhandled by user code The message is An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct. InnerException is The provider did not return a ProviderManifestToken string. Everything works fine when I have Connector/Net 6.4.4 installed. I can access the database and perform Read/Write/Delete action against it. I have a reference to the following in the project: MySql.Data MySql.Data.Entity MySql.Web My connection string in Web.config <connectionStrings> <add name="AESSmartEntities" connectionString="server=ec2-xxx-xx-xxx-xx.compute-1.amazonaws.com; user=root; database=nunya; port=3306; password=xxxxxxx;" providerName="MySql.Data.MySqlClient" /> </connectionStrings> What might I be doing wrong? Do I need any additional setting(s) to work with version 6.6.4 that wasn't required in the older version 6.4.4?

    Read the article

  • Complete Public Folder Migration from Exchange 2007 to Exchange 2010

    - by Michael Todd
    We were in the process of migrating from Exchange 2007 to Exchange 2010 and hit a brick wall when trying to migrate Public Folders. After resolving issues with connectivity (and another issue with an old Exchange 2003 server being listed in AD that was causing the replication to fail) it finally appeared that messages were migrating from one server to another. However, we appear to have jumped the gun and ran MoveAllReplicas before the process was complete. We are now stuck with about 210MB of public folders on the new server from a 7GB public folder store on the old server. The messages appear to be available on the old server since running get-publicfolderstatistics shows that there are messages available. We have waited several days for the move to continue but we are stuck at 210MB. Is there something we can do to complete the replication so that all of the messages move from the old server to the new server?

    Read the article

  • Turtle Beach Headset Chat Volume Wheel on Windows

    - by Todd Freed
    I have this headset http://www.turtlebeach.com/product-detail/headsets-legacy/ear-force-x11/235 I am using it with a Windows 8.1 PC using digital audio out on my motherboard (no dedicated sound card). The cable has 2 volume wheels labelled "Game" and "Chat". I would like to be able to control, say Google Hangouts or Skype volume with the chat wheel, and all other audio with the other wheel. Is this possible? The closest thing I can find is "Communications Device" vs "Device" under the Sound control panel in Windows.

    Read the article

  • DOS Batch file to find "new" files by date

    - by Todd McArthur
    My PC has entered an infinite BSOD loop - but I do have access to a safe-mode command prompt. I'm trying to get an idea of "what changed" that might have triggered this. e.g. I might have gotten a virus, or an app update went belly up. I'd like to thus see which files were created/modified in the last few days/week or at least the *.exe, *.dll, *.com, *.bat etc. I thought I was ok with my Batch-fu but I'm stumped on how to write a quick batch file/command that would list the files for me. REM This will find the files, but the results are all muddled REM all EXE files, reverse sort by date, recursively through sub-directories dir *.exe /O-D /S What I'd really like is to find all (executable filetypes) that were created/modified in the last 3-7 days. Can anyone point me in the right direction?

    Read the article

  • How can I accurately determine the age of a hard drive?

    - by Todd Stout
    Yes, if it's large, heavy, and only 65 Meg in capacity, you can assume it's ancient. An RLL controller would positively indicate the drive is from antiquity. What about drives that are only 3 or 4 years old? If I know the serial number, make and model is there a public database that indicates a manufacturing date? Update: As trite as this question might seem to some, the hard drive I was looking at that precipitated this question had no obvious manufacturing date stamped on it. I realize that most do. I think the answers given are very useful to myself and others.

    Read the article

  • How to install Red Hat Enterprise Linux on Apple Macbook Pro MacBookPro4,1

    - by Todd V. Rovito
    I have a one year old Mac Book Pro that I am trying to get RHEL 5.4 installed on via bootcamp. No matter what I do I can't get the installer to boot. I have tried multiple DVD's and even verified the install works on a new Mac Book Pro. Most of the time the installer simply locks up. I usually use Linux text with all-generic-ide on the boot line. I removed the ide parameter and I just used linux text. The results I get are that a bunch of kernel messages appear then the background turns blue and a thin text box pops up saying its loading ata..... something it disappears too fast for me to read. Then the machine freezes. I pressed the alt function keys to see if I could look at the system log, here is what it says: Alt-f3 says "trying to mount CD device hda" Alt-f4 says status error: hda: lastFailedSense Hda: Failed opcode was: unknown Hda: Lost interrupt Hda: Drive not ready for command Ide-cd: command 0x3 timed out Above this junk it looks like it found the partition because it knew it was 20 GB and listed as /dev/sda3. I think it has something to do with the CD drive, is that possible? Thanks again for the support. PS I posted in the apple support forums ( Apple.com Support Discussions Boot Camp Installation and Storage) and didn't get an answer.

    Read the article

  • Computer not finding hard drives on boot -sometimes-

    - by todd.pund
    Computer specs: Mobo: Gigabyte ultradurable 3 - GA-970A-UD3 Processor: First gen I7 3.2GHZ Ram: 8GB Kingston DDR3 1066 Video Card: EVGA NVidia GTX 460 1GB Hard Drive: 500MB 7200rpm x2 (can't remember brand, sorry I'm at work.) Last week my developer preview for Windows 8 ran out so I put my copy of windows 7 back on the computer. The computer at that point started suffering from frequent freezing and crashing. When I rebooted the computer sometimes it wouldn't find the system HD at all. When I looked at the post screen it seemed to show that it wasn't finding either of the HDs. Then yesterday when turning on the computer I just got GRUB as a message (not a GRUB prompt, just GRUB) I haven't had a dual boot of Linux for at least a year. I loaded windows 7 recovery console from the disk and ran: bootrec /fixboot bootrec /fixmbr Which did not help. At that point I just installed Ubuntu 13.04 over the windows 7 install and still received the GRUB post. I went into the BIOS and switched the Hard Drive priorities and then it loaded into Ubuntu fine. For several days everything was just hunky dory until I installed the Ubuntu version of Steam, install Portal and tried to run it. At that point the computer froze and after hard rebooting couldn't find the hard disks again. Then after restarting the system it loaded up fine again and no issues since. (I have not tried to launch portal again). My next thought is to remove the system hard drive and try to use the secondary as the master to see if the primary HD is bad. I'm sorry if this has been confusing, I'll answer any questions I can. Any thoughts?

    Read the article

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