Search Results

Search found 100 results on 4 pages for 'jess mckenzie'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Write a file in UTF-8 using FileWriter (Java)?

    - by user1280970
    I have the following code however, I want it to write as a UTF-8 file to handle foreign characters. Is there a way of doing this, is there some need to have a parameter? I would really appreciate your help with this. Thanks. try { BufferedReader reader = new BufferedReader(new FileReader("C:/Users/Jess/My Documents/actresses.list")); writer = new BufferedWriter(new FileWriter("C:/Users/Jess/My Documents/actressesFormatted.csv")); while( (line = reader.readLine()) != null) { //If the line starts with a tab then we just want to add a movie //using the current actor's name. if(line.length() == 0) continue; else if(line.charAt(0) == '\t') { readMovieLine2(0, line, surname.toString(), forename.toString()); } //Else we've reached a new actor else { readActorName(line); } } } catch (IOException e) { e.printStackTrace(); } }

    Read the article

  • Using a array variable in a foreach loop

    - by Jess McKenzie
    I am having an issue trying to work out how to use a function variable in a foreach loop so that I can do the following but its not working. $var = array(7) { [0]=> array(3) { ["listingId"]=> int(532712629) } [1]=> array(3) { ["listingId"]=> int(532712202) } Works but not right: foreach($var as $varr) { var_dump($varr['id']); { Goal - Having the array variable as the foreach value foreach($var['id'] as $item) { if($item === $foo) { } }

    Read the article

  • Good design of mapping Java Domain objects to Tables (using Hibernate)

    - by M. McKenzie
    Hey guys, I have a question that is more in the realm of design, than implementation. I'm also happy for anyone to point out resources for the answer and I'll gladly, research for myself. Highly simplified Java and SQL: Say I have a business domain POJO called 'Picture' with three attributes. class Picture int idPicture String fileName long size Say I have another business domain POJO called "Item" with 3 attributes Class Item int idItem String itemName ArrayList itemPictures These would be a normal simple relationship. You could say that 'Picture' object, will never exist outside an 'Item' object. Assume a picture belongs only to a specific item, but that an item can have multiple pictures Now - using good database design (3rd Normal Form), we know that we should put items and pictures in their own tables. Here is what I assume would be correct. table Item int idItem (primary key) String itemName table Picture int idPicture (primary key) varchar(45) fileName long size int idItem (foreign key) Here is my question: If you are making Hibernate mapping files for these objects. In the data design, your Picture table needs a column to refer to the Item, so that a foreign key relation can be maintained. However,in your business domain objects - your Picture does not hold a reference/attribute to the idItem - and does not need to know it. A java Picture instance is always instantiated inside an Item instance. If you want to know the Item that the Picture belongs to you are already in the correct scope. Call myItem.getIdItem() and myItem.getItemPictures(),and you have the two pieces of information you need. I know that Hibernate tools have a generator that can auto make your POJO's from looking at your database. My problem stems from the fact that I planned out the data design for this experiment/project first. Then when I went to make the domain java objects, I realized that good design dictated that the objects hold other objects in a nested way. This is obviously different from the way that a database schema is - where all objects(tables) are flat and hold no other complex types within them. What is a good way to reconcile this? Would you: (A) Make the hibernate mapping files so that Picture.hbm.xml has a mapping to the POJO parent's idItem Field (if it's even possible) (B) Add an int attribute in the Picture class to refer to the idItem and set it at instantiation, thus simplifying the hbm.xml mapping file by having all table fields as local attributes in the class (C) Fix the database design because it is wrong, dork. I'd truly appreciate any feedback

    Read the article

  • php mysql search

    - by mckenzie
    Hello, My code contain SELECT * FROM newchap WHERE company LIKE '%$company%' OR Category LIKE '%$cat%' It works perfectly however, when the field $company contain empty, it return all result in MYSQL. How to prevent it?

    Read the article

  • jquery two different date validation

    - by mckenzie
    hello, var cin = $("#datepicker").val(); var cout = $("#datepicker2").val(); dateformat is : dateFormat: 'DD, d MM, yy' how do i use jquery to check cin(checkin) date not past cout(checkout) date? which means, cout date cannot earlier then cin date

    Read the article

  • jquery sucess dropdown

    - by mckenzie
    hi, //codes success: function(html){ // this is for input box - working document.getElementById('val').value=''; $('#val').value=''; // how do i set it for dropdown box to reset after sucess? document.getElementById('val2').value=''; $('#val2').value=''; } Once user submit dropdown box, i need it to reset to value="" but now it sticks with user option even after submitted. Any idea how to achieve that?

    Read the article

  • Cannot access data in a xml string

    - by Jess McKenzie
    I am trying to create an array that I can include the perent category Name and the child category Name. I can so far access the below object fine using $xml->Subcategories; but if I try my code below I get an empty array why? PHP: foreach ($catDetailsXml->Category as $value) { $categoryDetails[] = array('CategoryNumber' => $value->Number); } Structure: object(SimpleXMLElement)#13 (1) { ["Category"]=> array(5) { [0]=> object(SimpleXMLElement)#14 (4) { ["Name"]=> string(19) "Commercial Property" ["Number"]=> string(10) "0350-0100-" ["Subcategories"]=> object(SimpleXMLElement)#35 (1) { ["Category"]=> array(3) { [0]=> object(SimpleXMLElement)#36 (4) { ["Name"]=> string(9) "Car parks" ["Number"]=> string(15) "0350-0100-8946-" ["Subcategories"]=> object(SimpleXMLElement)#39 (0) { } }

    Read the article

  • php array into mysql

    - by mckenzie
    Hello, $sql_where = ''; $exclude = '30,35,36,122,123,124,125'; if($exclude != '') { $exclude_forums = explode(',', $exclude); foreach ($exclude_forums as $id) { if ($id > 0) { $sql_where = ' AND forum_id <> ' . trim($id); } } } $sql = 'SELECT topic_title, forum_id, topic_id, topic_type, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_time FROM ' . TOPICS_TABLE . ' WHERE topic_status <> 2 AND topic_approved = 1 ' . $sql_where . ' ORDER BY topic_time DESC'; The above code i use to exclude the id of forum to be displayed on sql queries. Why doesn't it work and still display it? Any solution

    Read the article

  • Creating a multidimensional array

    - by Jess McKenzie
    I have the following response and I was wanting to know how can I turn it into an multidimensional array foreach item [0][1] etc Controller $rece Response: array(16) { ["digital_delivery"]=> int(1) ["original_referrer"]=> string(11) "No Referrer" ["shop_rule_us_state_code"]=> string(1) "0" ["subtotal_ex_vat"]=> string(4) "9.99" ["subtotal_inc_vat"]=> string(4) "9.99" ["tax_amount"]=> string(4) "0.00" ["delivery_price"]=> string(4) "0.00" ["discount_deduction"]=> string(4) "0.00" ["currency_code"]=> string(3) "GBP" ["total"]=> string(4) "9.99" ["paid"]=> int(1) ["created"]=> string(19) "2013-10-31 21:03:44" ["website_id"]=> string(2) "64" ["first_name"]=> string(3) "Joe" ["last_name"]=> string(5) "Blogs" ["email"]=> string(17) "[email protected]" } array(16) { ["digital_delivery"]=> int(1) ["original_referrer"]=> string(11) "No Referrer" ["shop_rule_us_state_code"]=> string(1) "0" ["subtotal_ex_vat"]=> string(4) "9.99" ["subtotal_inc_vat"]=> string(4) "9.99" ["tax_amount"]=> string(4) "0.00" ["delivery_price"]=> string(4) "0.00" ["discount_deduction"]=> string(4) "0.00" ["currency_code"]=> string(3) "GBP" ["total"]=> string(4) "9.99" ["paid"]=> int(1) ["created"]=> string(19) "2013-10-31 21:03:44" ["website_id"]=> string(2) "64" ["first_name"]=> string(3) "Joe" ["last_name"]=> string(5) "Blogs" ["email"]=> string(13) "[email protected]" } array(16) { ["digital_delivery"]=> int(1) ["original_referrer"]=> string(11) "No Referrer" ["shop_rule_us_state_code"]=> string(1) "0" ["subtotal_ex_vat"]=> string(4) "9.99" ["subtotal_inc_vat"]=> string(4) "9.99" ["tax_amount"]=> string(4) "0.00" ["delivery_price"]=> string(4) "0.00" ["discount_deduction"]=> string(4) "0.00" ["currency_code"]=> string(3) "GBP" ["total"]=> string(4) "9.99" ["paid"]=> int(1) ["created"]=> string(19) "2013-10-31 21:03:44" ["website_id"]=> string(2) "64" ["first_name"]=> string(3) "Joe" ["last_name"]=> string(5) "Blogs" ["email"]=> string(15) "[email protected]" } Controller: foreach ($this->receivers as $rece) { $order_data['first_name'] = $rece[0]; $order_data['last_name'] = $rece[1]; $order_data['email'] = $rece[2]; $order_id = $this->orders_model->add_order_multi($order_data, $order_products_data); $this-receivers function: public function parse_receivers($receivers) { $this->receivers = explode( "\n", trim($receivers) ); $this->receivers = array_filter($this->receivers, 'trim'); $validReceivers = false; foreach($this->receivers as $key=>$receiver) { $validReceivers = true; $this->receivers[$key] = array_map( 'trim', explode(',', $receiver) ); if (count($this->receivers[$key]) != 3) { $line = $key + 1; $this->form_validation->set_message('parse_receivers', "There is an error in the %s at line $line ($receiver)"); return false; } } return $validReceivers; }

    Read the article

  • form Validation white page not showing errors

    - by Jess McKenzie
    In the example below I am wanting to do all of the 'safety' checks on the $_POST variables but it seems when I click submit I get a white page why? I am wanting it to show the errors etc Form Process: /* check if the form is submitted */ if (isset($_POST['submitButton'])) { $fullName = $_POST['fullname']; if($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($fullName)) { if (!ctype_alpha(str_replace(array("'", "-"), "",$fullName))) { $errorfullName .= '<span class="errorfullName">*First name should be alpha characters only.</span>'; } if (strlen($fullName) < 3 OR strlen($fullName) > 40) { $errorfullName .= '<span class="errorfullName">*First name should be within 3-40 characters long.</span>'; } } }

    Read the article

  • Inexpensive Remote Assistance software?

    - by Jess
    Any recommendations for Remote Assistance software that does not require firewall modification for clients? To assist client with software problems and perform training, we currently use a tool called Remote Helpdesk to connect to their computers and guide them through the process. This tool was pretty cheap (~$400 onetime for 3 support staff), and worked great - the client's PC actually initiates the connection to us, so there's never any firewall issues (vs. Remote Desktop, VNC software, or many other similar tools). Unfortunately, the product doesn't work well with 64-bit O/S's and Vista in general (slows down by a factor of 10 or so). I am looking for alternatives that provide the same reverse connection capabilities to avoid firewall issues. The only solution I've found is WebEx's Remote Support, which is WAY too expensive ($449/month for us). Thanks for all the assistance!

    Read the article

  • Excel how to get an average for column for rows that meet multiple criteria

    - by Jess
    I would like to know the average days between open and close dates for an item with a close date in a particular month. So from the below example in Jan 2013 items 2,5 and 6 were closed (Closed can be RESOLVED or CANCELLED status), each were open for 26, 9 and 6 days respectivly. So of the jobs that have a closed date in Jan 2013 (between 01/01/2013 and 13/02/13) they have an average open time (between open and close date) of 13.67 days to 2dp. I have tried a few ways to get this to work and i think the issue I am having is with the AVERAGE function. First time using a forum so apologies if my question is unclear. Was unable to post image to have this comma seperated below Item_ID,Open_Date,Status,Close_Date 1,1/06/2012,RESOLVED,16/07/2012 2,20/12/2012,RESOLVED,16/01/2013 3,2/01/2013,IN PROGRESS, 4,3/01/2013,CANCELLED,7/05/2013 5,3/01/2013,RESOLVED,12/01/2013 6,4/01/2013,RESOLVED,10/01/2013 7,1/02/2013,RESOLVED,15/02/2013 8,2/02/2013,OPEN, 9,7/02/2013,CANCELLED,26/02/2013

    Read the article

  • JBoss 5 on AIX 5.3

    - by jess
    I am a very newbie for AIX and system monitoring. Actually our application currently run production on jboss 5.1 in AIX 5.3. Please check below configuration & system settings. AIX system configuration OS Level 5.3.9.0 (oslevel -g) Physical Memory size 24GB (svmon -G) Page space 4GB (lsps -s) processors 3 cores, Processor Type: PowerPC_POWER6, Processor Clock Speed: 4704 MHz (prtconf | grep Processor) Java version JRE 1.6.0 IBM AIX build pap6460sr10fp1-20120321_01 (SR10 FP1) (java -fullversion) JBoss configuration JBoss 5.1/JBoss ESB 4.11 Hornetq messaging with consumer flow control java opts : -d64 -Xms2g -Xmx4g -XX:MaxPermSize=1024m Sometime we observe very strange behavior in the JBoss that freeze without any error logs. Also server log stop without any further trace. We also not able to get thread dump (kill -3) and its not generate at that point. (kill -3 xxxxx works in normal circumstances) Only option available for us was restart the jboss server and its seem all messages that were in queues during the freeze time process after restarting. We try tweak some of setting in JBoss hornetq, we though issue was there. Hornetq Stuck By Default. But we haven't any luck and also unable to isolate the issue in any point. We looking at tool like nmon for monitoring this but no clue is that good enough to do so. Please provide some point to investigate this issue. Thanks

    Read the article

  • Acrobat Reader 9 Crashes Every Time

    - by Jess Sightler
    I have an XP machine on which Adobe Acrobat Reader crashes every time as soon as it starts. I've tried reinstalling 9 and it doesn't help at all. If I use it to open a PDF, it displays the first page, and can be scrolled for about 3 seconds before it crashes. Is there some way to debug this?

    Read the article

  • Database/Web Server and SQL Server Setup - Security?

    - by Jess
    This seems really basic, but I couldn't find an answer already ... we are looking to deploy a website to an IIS server, and a database to a separate server. We aren't sure how to best secure this for access by internal users and internet. The IIS Server is not connected to the domain, and neither is the database at the moment. Should it be? Also, if we use SQL Server authentication instead of Windows Authentication, should we just hard-code the user/password into our internal apps?

    Read the article

  • Windows 7 Professional N needs to be just Windows 7 Professional.

    - by Jess
    I have a laptop at work that originally had Windows 7 Home Premium on it. We have a tech that comes in a few times a week to do some of our support work, and we asked him to upgrade the laptop to Windows 7 Professional. Before he left he told us the upgrade didn't work and that we'd have to order a disk. Upon checking the computer it seemed he had upgraded to Windows Professional 7 N. It had not previously been Home Premium N, so I'm not exactly sure how he managed to upgrade it to an N edition. I do not understand why he didn't run the Any Time Upgrade, but that is now irrelevant. How can I change Professional N to regular Professional? I would like to avoid having to restore it back to Home if possible.

    Read the article

  • Unable to remove limit on memory usage for PHP script.

    - by Jess Telford
    The Situation I am having an issue with a PHP script getting the following error message: Fatal error: Out of memory (allocated 359923712) (tried to allocate 72 bytes) in /path/to/piwik/core/DataTable.php on line 969 The script I'm running is: /path/to/piwik/misc/cron/archive.sh I am assuming the numbers are Bytes, which means that total is approximately 360MB. For all intents and purposes, I have increased the memory limits on the server well above 360MB, yet this is the number (give or take a byte) it consistently errors out at. Please note: This question is not about fixing a memory leak in the script, nor about why the script itself is using so much memory. The script is part of the Piwik archiving process, so I cannot just fix any memory leaks, etc. For more info on this script and why I am increasing the memory limit, see "How to setup auto archiving" The question Given that the script is attempting to use over 360MB of memory, which I cannot change, why does it not seem possible for me to increase the amount of memory available to php on my server? What I've tried Increasing PHP's memory_limit Given the php.ini file: php -i | grep php.ini Configuration File (php.ini) Path => /usr/local/lib Loaded Configuration File => /usr/local/lib/php.ini I have edited that file, so the memory_limit directive reads; memory_limit = -1 Restart Apache, and check the new value has stuck; $ php -i | grep memory_limit memory_limit => -1 => -1 Run the script, and get the same error. I've also tried 1G, 768M, etc, all to the same result (ie; no change). Update 22nd June: Based on Vangel's help, I have attempted to set post_max_size to 20M in combination with setting memory_limit. Again, this has no effect. Removing the memory limit on child processes of Apache I have found and edited the httpd.conf file to make sure there is no RLimitMEM directive. I then used WHM's Apache Configuration Memory Usage Restrictions to generate a restriction, which it claimed was at 1000M (and confirmed by checking httpd.conf). Both of these resulted in no change to the script erroring at 360MB. Increasing the per process memory limits of Linux The current limits set on the system: $ ulimit -m 524288 $ ulimit -v 524288 I have attempted to set both of these to unlimited: $ ulimit -m unlimited $ ulimit -v unlimited $ ulimit -m unlimited $ ulimit -v unlimited Once again, this has resulted in absolutely no improvement in my problem. My setup $ cat /etc/redhat-release CentOS release 5.5 (Final) $ uname -a Linux example.com 2.6.18-164.15.1.el5 #1 SMP Wed Mar 17 11:30:06 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux $ php -i | grep "PHP Version" PHP Version => 5.2.9 $ httpd -V Server version: Apache/2.0.63 Server built: Feb 2 2011 01:25:12 Cpanel::Easy::Apache v3.2.0 rev5291 Server's Module Magic Number: 20020903:13 Server loaded: APR 0.9.17, APR-UTIL 0.9.15 Compiled using: APR 0.9.17, APR-UTIL 0.9.15 Architecture: 64-bit Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT="/usr/local/apache" -D SUEXEC_BIN="/usr/local/apache/bin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" Output of $ php -i: http://pastebin.com/EiRut6Nm

    Read the article

  • Problems with merge replication

    - by jess
    Hi, We are developing a multi-user desktop application with users located in different countries. The platform is - .net 3.5, SQL Server 2008, WinForms. Now, my client has used the help of a DBA who has implemented merge replication. To facilitate replication, we made all our primary keys as GUID. Now, we are facing these issues with replication - subscribers expiration sometimes stops replication and we have found no clean way to re-add every change to db schema requires to poll the whole data all over again! This seems to be strange, what could be the problem here? Also, sometimes we have duplicate keys, and that too stops replication I am sure these issues can be resolved. Maybe, we have not gone the right way to implement. Can you suggest how to go about implementing. Or, is the above information enough to diagnose the problem?

    Read the article

  • How well does Windows 7 MCE support Clear QAM?

    - by Jess Sightler
    How well does Windows 7 MCE support ClearQAM (no-cablecard, no HD), and are there any guidelines for which capture cards work best with it? Also, I have an old laptop with a 2 Ghz Pentium M with 1 GB of RAM. I believe that this will be able to handle 1 stream (as it currently does with non-QAM content under XP MCE. Would it also be able to handle 2 streams?

    Read the article

  • Need help with the Bing Bar.

    - by JESS
    I am needing help with the Bing Toolbar. I installed it and I liked everything about it I could customize the color of it etc. Two times now it's changed to this newer version, and I don't know how to stop it from changing to this new version, it does it on it's own. I go to bed with the older version that I had and want is there but when I wake up,this newer version tool-bar is on my PC. Can anyone help? Does anyone know why its doing this,and how to stop it from doing this again? I am also looking for the version I had Can anyone help?

    Read the article

  • Any problems with using a 301 redirect to force https traffic in IIS?

    - by Jess
    Is there any problem with using a 301 redirect to force all traffic to go to a secure-only site? We originally had redirect rules, but enforcing SSL-only seemed more secure. Here is how we set it up: Site 1: https://example.com/ Require SSL set Bound to 443 only Site 2: http://example.com Bound to 80 only Empty folder - no actual html or other data 301 Redirects to https://example.com This seems to work beautifully, but are there any issues with doing this? Would any browsers not recognize the 301 redirect, or could there be security warnings during the redirect?

    Read the article

  • Installing Ubuntu next to Windows XP

    - by jess
    I have iso image for Ubuntu 11.0.4 on a CD. My OS is windows XP. I have 3 partions c, E and F. Windows is installed on C, and F has data. E is empty drive. Now, after I start installation , I choose the third option. Then click forward and I am shown three figures -- /dev/sda1 52427(total)/50931(used) /dev/sda5 52427(total)/3221(used) -- surprised, since it should be empty. I had used wubi to install earlier but have uninstalled. /dev/sda5 215206(total)/37545(used) Now, it means I need to choose sda5. Now how should I go about creating 3 partions for /(root), /home and /swap. Click edit partion and give size for each of them?

    Read the article

  • UIScrollview setContentOffset immediate animation?

    - by Jess
    Is there anyway to get the setContentOffset animation to happen immediately instead of waiting until the app returns to the main run loop? I tried setting the animation property to NO and nesting inside of an animation block but it still waits until returning to the main run loop. I've also tried using a sub method to perform the animation. My problem is I perform some heavy work after setting the contentOffset so the scroll view waits until this work is complete to animate the setting of the content offset so it appears to lag for a second.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >