Search Results

Search found 21001 results on 841 pages for 'spelling check'.

Page 83/841 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • How to check whether user is login in web application?

    - by Morgan Cheng
    I want to learn the whole details of web application authentication. So, I decided to write a CodeIgniter authentication library from scratch. Now, I have to make design decision about how to determine whether one user is login. Basically, after user input username & password pair. A cookie is set for this session, following navigations in the web application will not require username & password. The server side will check whether the session cookie is valid to determine whether current user is login. The question is: how to determine whether cookie is valid cookie issued from server side? I can image the most simple way is to have the cookie value stored in session status as well. For each HTTP request, compare the value from cookie and the value from server session. (Since CodeIgniter session library store session variables in cookies, it is not applicable without some tweak.) This method requires storage in server side. For huge web application that is deployed in multiple datacenters. It is possible that user input username & password when browsing in one datacenter, while he/she access the web application in another datacenter later. The expected behavior is that user just input username & password once. As a result, all datacenters should be able to access the session status. That is possible not applicable even the session status is stored in external storage such as database. I tried Google. I login Google with Asian proxy which is supposed to direct me to datacenters in Asian. Then I switch to North American proxy which should direct me to datacenters in North America. It recognize my login without asking username and password again. So, is there any way to determine whether user is login without server side session status?

    Read the article

  • Use JQuery to check a checkbox in a parent list-item?

    - by Daniel O'Connor
    Hey Everyone, I'm brand new to Javascript and JQuery, so I've been reading up on it and am trying to check (and set inactive) a checkbox in a parent list-item when one of the children are checked. If this doesn't make any sense, take a look at the list structure. <ul> <li><input type="checkbox" name="items[]" value="88712003" id="88712003" /> Parent 1</li> <li><input type="checkbox" name="items[]" value="88712003" id="88712003" /> Parent 2 <ul> <li><input type="checkbox" name="items[]" value="21312341" id="21312341" /> Child 1</li> <li><input type="checkbox" name="items[]" value="21312341" id="21312341" /> Child 2</li> </ul> </li> <li><input type="checkbox" name="items[]" value="88712003" id="88712003" /> Parent 3</li> <li><input type="checkbox" name="items[]" value="88712003" id="88712003" /> Parent 4</li> </ul> If Child 1 or Child 2 is checked, I want the input in Parent 2 to be checked and set inactive. I've started working on it, but got stuck here: $(function(){ $('.child').click(function() { $(this).parent().parent().parent().toggle(); }); }); As you can see, I didn't make it far. Any help would be appreciated. Thanks!

    Read the article

  • Javascript to check if there is flash player installed and redirect to the neededn page.

    - by themajiks
    Hi. I have this script. This determines if there is a flash player installed in the browser, it redirects the browser to a flash website. if not, then it opens a non-flash website. The Code is here: <SCRIPT LANGUAGE="JavaScript"> <!-- if ((navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") == -1 && navigator.appVersion.indexOf("3.1") == -1) || (navigator.plugins && navigator.plugins["Shockwave Flash"])|| navigator.plugins["Shockwave Flash 2.0"]){ window.location='flash/index.html'; } else { window.location='index.html'; } --> </SCRIPT> What i want is to embed this code in the non-flash index page. it should just check if there is no flash then simply go with the current index file that already has been opened, or if there is no flash player, then load the index file from within the flash website. Currently, when index.html (non-flash) is opened, it goes into loop and keeps on checking for the flash player. Can I modify the window.location='index.html'; statement no to load any file here, just go on with the file already opened.??

    Read the article

  • Is there a way to check if a div has the same class as an ancestor in jQuery?

    - by T.R.
    I'm looking to dynamically highlight a tab, if it represents the current page. I have: <style> #tabs li{bg-color: white;} body.Page1 #tabs .Page1, body.Page2 #tabs .Page2, body.Page3 #tabs .Page3{bg-color: orange;} </style> <body class="Page1 ADifferentClass"> <ul id="tabs"> <li class="Page1 SomeClass"> <li class="Page2 SomeOtherClass"> <li class="Page3 AnotherClass"> </ul> </body> As you can see, there needs to be CSS for each tab, so adding another page involves modifying both the HTML and the CSS. Is there a simple (DRY) way to check if two divs have the same class already built into jQuery? I ultimately went with this: <script> $(document).ready(function(){ var classRE = /Page\d+/i; var pageType = $('body').attr('className').match(classRE); $('li.'+pageType).addClass('Highlight'); }); </script> <style> #tabs li{bg-color: white;} #tabs li.Highlight{bg-color: orange;} </style>

    Read the article

  • How to check at runtime if a class implements certain interface?

    - by mare
    Let's say I have some content classes like Page, TabGroup, Tab, etc. Certain of those will be implementing my IWidgetContainer interface - it means they will geet an additional field named ContainedItems from the interface and some methods for manipulating this field. Now I need to reflect the fact that some class implements this interface by rendering out some special custom controls in my ASP.NET MVC Views (like jQuery Add/Remove/Move/Reorder buttons). For instance, TabGroup will implement IWidgetContainer because it will contain tabs but a tab will not implement it because it won't have the ability to contain anything. So I have to somehow check in my view, when I render my content objects (The problem is, I use my base class as strong type in my view not concrete classes), whether it implements IWidgetContainer. How is that possible or have I completely missed something? To rephrase the question, how do you reflect some special properties of a class (like interface implementation) in the UI in general (not necessarily ASP.NET MVC)? Here's my code so far: [DataContract] public class ContentClass { [DataMember] public string Slug; [DataMember] public string Title; [DataMember] protected ContentType Type; } [DataContract] public class Group : ContentClass, IWidgetContainer { public Group() { Type = ContentType.TabGroup; } public ContentList ContainedItems { get; set; } public void AddContent(ContentListItem toAdd) { throw new NotImplementedException(); } public void RemoveContent(ContentListItem toRemove) { throw new NotImplementedException(); } } [DataContract] public class GroupElement : ContentClass { public GroupElement() { Type = ContentType.Tab; } } Interface: interface IWidgetContainer { [DataMember] ContentList ContainedItems { get; set; } void AddContent(ContentListItem toAdd); void RemoveContent(ContentListItem toRemove); }

    Read the article

  • How to get an array to check in the in_array function? See description Below...

    - by Parth
    I am fetching the data using mysql_fetch_array like : while($row = mysql_fetch_array($select)) { $tables[] =$row; } Now i need this $tables array as one dimensional array only, so that i can use it in if(in_array($val['table_name'],$tables)) { //Some Code } to check for whether the $val['table_name'] is in the $tables or not.. As for now I am getting $tables array as Array ( [0] => Array ( [TABLE_NAME] => jos_audittrail ) [1] => Array ( [TABLE_NAME] => jos_banner ) [2] => Array ( [TABLE_NAME] => jos_bannerclient ) .. .. .. .. } But I need the $tables is form of.. Array ( [0] => jos_audittrail [TABLE_NAME] => jos_audittrail [1] => jos_banner [TABLE_NAME] => jos_banner [2] => jos_bannerclient [TABLE_NAME] => jos_bannerclient .. .. .. } How can i get the above array after applying "while loop" to "$row"?

    Read the article

  • MAC : How to check if the file is still being copied in cpp?

    - by Peda Pola
    In my current project, we had a requirement to check if the file is still copying. We have already developed a library which will give us OS notification like file_added , file_removed , file_modified, file_renamed on a particular folder along with the corresponding file path. The problem here is that, lets say if you add 1 GB file, it is giving multiple notification such as file_added , file_modified, file_modified as the file is being copied. Now i decided to surpass these notifications by checking if the file is copying or not. Based on that i will ignore events. I have written below code which tells if the file is being copied or not which takes file path as input parameter. Details:- In Mac, while file is being copied the creation date is set as some date less than 1970. Once it is copied the date is set to current date. Am using this technique. Based on this am deciding that file is being copied. Problem:- when we copy file in the terminal it is failing. Please advice me any approach. bool isBeingCopied(const boost::filesystem::path &filePath) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; bool isBeingCopied = false; if([[[[NSFileManager defaultManager] attributesOfItemAtPath:[NSString stringWithUTF8String:filePath.string().c_str()] error:nil] fileCreationDate] timeIntervalSince1970] < 0) { isBeingCopied = true; } [pool release]; return isBeingCopied; }

    Read the article

  • How to check a file saving is complete using Python?

    - by indrajithk
    I am trying to automate a downloading process. In this I want to know, whether a particular file's save is completed or not. The scenario is like this. Open a site address using either Chrome or Firefox (any browser) Save the page to disk using 'Crtl + S' (I work on windows) Now if the page is very big, then it takes few seconds to save. I want to parse the html once the save is complete. Since I don't have control on the browser save functionality, I don't know whether the save has completed or not. One idea I thought, is to get the md5sum of the file using a while loop, and check against the previous one calculated, and continue the while loop till the md5 sum from the previous and current one matches. This doesn't works I guess, as it seems browser first attempts to save the file in a tmp file and then copies the content to the specified file (or just renames the file). Any ideas? I use python for the automation, hence any idea which can be implemented using python is welcome. Thanks Indrajith

    Read the article

  • How to check if there is an active session in a JSF page?

    - by Roberto de Santis
    Hi, there is a way to check if there is an active session directly in jsf page? I have try this but it doesn't work: <p:ajaxStatus onerror="#{session == null ? 'idleDialog.show();' : null}" thank you in advance @Update I have see that onerror isn't fired even if viewExpiredException occurr. @Update 1 Ok i have implemented something that may work: <h:form> <p:idleMonitor timeout="10000" idleListener="#{idleMonitorController.idleListener}" onidle="sessionPoll.stop();idleDialog.show();"/> </h:form> <p:dialog header="Sessione scaduta per inattività" widgetVar="idleDialog" modal="true" width="400"> <h:outputText value="Sessione scaduta" /> <h:button value="Ripristina Sessione" onclick="idleDialog.hide();sessionPoll.start();" /> </p:dialog> <h:form prependId="false"> <p:poll widgetVar="sessionPoll" interval="1"/> </h:form> and this is the listner: public void idleListener(IdleEvent event) { System.out.println("aaaa"); final HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); request.getSession(false).invalidate(); } now the only problem is that the session.invalidate doesn't work

    Read the article

  • In Gtk#, why might VALID_ITER fail even after I check it with IterIsValid?

    - by Matthew
    I have a convenience function in my TreeView that looks something like this: Card GetCardFromPath (TreePath path) { TreeIter iter; if (path == null || !Model.GetIter (out iter, path)) return null; if ((Model as TreeModelSort).IterIsValid (iter)) return (Card) Model.GetValue (iter, 0); return null; } Most of the time this works without any errors. But when it is called directly after the Model is changed, line 8 gives me these Gtk runtime errors: [Fatal 16:53:02.448] [Gtk] gtk_list_store_get_value: assertion `VALID_ITER (iter, list_store)' failed [Fatal 16:53:02.449] [GLib-GObject] g_value_unset: assertion `G_IS_VALUE (value)' failed As far as I can tell, I shouldn't even need to check IterIsValid, because I'm already checking the return value of Model.GetIter. Even so, how can VALID_ITER fail in a function that only gets called if IterIsValid returns true? If it makes a difference, the Model is a TreeModelSort, which sorts a TreeModelFilter, which filters a ListStore. The error occurs when GetCardFromPath is called from HandleSelectionChanged when multiple rows have just been removed from the ListStore. It doesn't seem to prevent anything from working properly, but having a cascade of errors whenever I remove multiple rows isn't really ideal.

    Read the article

  • How to check if a position inside a std string exists ?? (c++)

    - by yox
    Hello, i have a long string variable and i want to search in it for specific words and limit text according to thoses words. Say i have the following text : "This amazing new wearable audio solution features a working speaker embedded into the front of the shirt and can play music or sound effects appropriate for any situation. It's just like starring in your own movie" and the words : "solution" , "movie". I want to substract from the big string (like google in results page): "...new wearable audio solution features a working speaker embedded..." and "...just like starring in your own movie" for that i'm using the code : for (std::vector<string>::iterator it = words.begin(); it != words.end(); ++it) { int loc1 = (int)desc.find( *it, 0 ); if( loc1 != string::npos ) { while(desc.at(loc1-i) && i<=80){ i++; from=loc1-i; if(i==80) fromdots=true; } i=0; while(desc.at(loc1+(int)(*it).size()+i) && i<=80){ i++; to=loc1+(int)(*it).size()+i; if(i==80) todots=true; } for(int i=from;i<=to;i++){ if(fromdots) mini+="..."; mini+=desc.at(i); if(todots) mini+="..."; } } but desc.at(loc1-i) causes OutOfRange exception... I don't know how to check if that position exists without causing an exception ! Help please!

    Read the article

  • Looking for MSSQL Table Design Sanity Check for Profile Tables with Dynamic Columns.

    - by Code Sherpa
    I just want a general sanity check regarding database design. We are building a web system that has both Teachers and Students. Both have accounts in the system. Both have profiles in the system. My question is about the table design of those Profile tables. The Teacher profile is pretty static regarding the metadata associated with it. Each teacher has a set number of fields that exposes information about that individual (schools, degrees, etc). The students, however, are a different case. We are using a windows service to pull varying data about the students from an endless stream of excel spreadsheets. The data gets moved into our database and then the fields appear in association with the student's profile. Accordingly, each and every student may have very different fields in their profile. I originally started with the concept of three tables: Accounts ---------- AccountID TeacherProfiles ---------- TeacherProfileID AccountID SecondarySchool University YearsTeaching Etc... StudentProfiles ---------- StudentProfileID AccountID Header Value The StudentProfiles table would hold the name of the column headers from the excel spreadsheets and the associated values. I have since evolved the design a little to treat Profiles more generically per the attached ERD image. The Teacher and Student "Headers" are stored in a table called "ProfileAttributeTypes" and responses (either from the excel document or via input fields on the web form) are put in a ProfileAttributes table. This way both Student and Teacher profiles can be associated with a dynamic flow of profile fields. The "Permissions" table tells us whether we are dealing with a Student or a Teacher. Since this system is likely to grow quickly, I want to make sure the foundation is solid. Can you please provide feedback about this design and let me know if it seems sound or if you could see problems it might create and, if so, what might be a better approach? Thanks in advance.

    Read the article

  • XNA, C# - Check if a Vector2 path crosses another Vector2 path.

    - by Nick
    Hello all, I have an XNA question for those with more experience in these matters than myself (maths). Background: I have a game that implements a boundary class, this simply hosts 2 Vector2 objects, a start and an end point. The current implementation crudely handles collision detection by assuming boundaries are always vertical or horizontal, i.e. if start.x and end.x are the same check I am not trying to pass x etc. Ideally what I would like to implement is a method that accepts two Vector2 parameters. The first being a current location, the second being a requested location (where I would like to move it to assuming no objections). The method would also accept a boundary object. What the method should then do is tell me if I am going to cross the boundry in this move. this could be a bool or ideally something representing how far I can actually move. This empty method might explain better than I can in words. /// <summary> /// Checks the move. /// </summary> /// <param name="current">The current.</param> /// <param name="requested">The requested.</param> /// <param name="boundry">The boundry.</param> /// <returns></returns> public bool CheckMove(Vector2 current, Vector2 requested, Boundry boundry) { //return a bool that indicated if the suggested move will cross the boundry. return true; }

    Read the article

  • How to check of which user-defined type a current JSON element is during $.each()?

    - by Bob
    I have the following structure for a JSON file: ({condos:[{Address:'123 Fake St.', Lat:'56.645654', Lng:'23.534546'},{... another condo ...},{...}],houses:[{Address:'1 Main Ave.', Lat:'34.765766', Lng:'27.8786674'},{... another house ...}, {...}]}) So, I have a list of condos and houses in one big JSON array. I want to plot them all on my map, but I want to give condos and houses different marker icons( blue marker for condos, green marker for houses ). Problem I have is - figuring out how to distinguish between types of markers when I $.each() through them. How would I use if to check whether I'm working with a condo or a house at the moment? var markers = null; $('#map').gmap(mapOptions).bind('init', function(){ $.post('getMarkers.php', function(json){ markers = json; $.each(markers, function(type, dataMembers) { $.each(dataMembers, function(i, j){ //if house use house.png to create marker $('#map').gmap('addMarker', { 'position': new google.maps.LatLng(parseFloat(Lat), parseFloat(Lng)), 'bounds':true, 'icon':'house.png' } ); //if condo use condo.png $('#map').gmap('addMarker', { 'position': new google.maps.LatLng(parseFloat(Lat), parseFloat(Lng)), 'bounds':true, 'icon':'condo.png' } ); }); }); }); });

    Read the article

  • How to check successful copy() function execution in php?

    - by OM The Eternity
    How to check successful copy() function execution in php? I am using the following code: <? function full_copy( $source, $target ) { if ( is_dir( $source ) ) { @mkdir( $target ); $d = dir( $source ); while ( FALSE !== ( $entry = $d->read() ) ) { if ( $entry == '.' || $entry == '..' ) { continue; } $Entry = $source . '/' . $entry; if ( is_dir( $Entry ) ) { full_copy( $Entry, $target . '/' . $entry ); continue; } copy( $Entry, $target . '/' . $entry ); } $d->close(); }else { copy( $source, $target ); } } $source ='.'; $destination = '/html/parth/'; full_copy($source, $destination); ?> I do not get anything in my parth folder. Why? I am using Windows, Script is executed on fedora system (its my server)...

    Read the article

  • MySQL Check and compare and if necessary create data.

    - by user2979677
    Hello I have three different tables Talk ID type_id YEAR NUM NUM_LETTER DATE series_id TALK speaker_id SCRIPREF DONE DOUBLE_SID DOUBLE_TYP LOCAL_CODE MISSING RESTRICTED WHY_RESTRI SR_S_1 SR_E_1 BCV_1 SR_S_2 SR_E_2 BCV_2 SR_S_3 SR_E_3 BCV_3 SR_S_4 SR_E_4 BCV_4 QTY_IV organisation_id recommended topic_id thumbnail mp3_file_size duration version Product_component id product_id talk_id position version Product id created product_type_id last_modified last_modified_by num_sold current_stock min_stock max_stock comment organisation_id series_id name subscription_type_id recipient_id discount_start discount_amount discount_desc discount_finish discount_percent voucher_amount audio_points talk_id price_override product_desc instant_download_status_id downloads instant_downloads promote_start promote_finish promote_desc restricted from_tape discontinued discontinued_reason discontinued_date external_url version I want to create a procedure that will check if select the id from talk and compare it with the id of product to see if there is a product id in the table and if there isn't then create it however my problem is that my tables talk and product can't talk, as id in talk is related to talk_id in product_component and id in product is related to product_id in product_component. Are there any ways for this to be done? I tried this, CREATE DEFINER=`sthelensmedia`@`localhost` PROCEDURE `CreateSingleCDProducts`() BEGIN DECLARE t_id INT; DECLARE t_restricted BOOLEAN; DECLARE t_talk CHAR(255); DECLARE t_series_id INT; DECLARE p_id INT; DECLARE done INT DEFAULT 0; DECLARE cur1 CURSOR FOR SELECT id,restricted,talk,series_id FROM talk WHERE organisation_id=2; DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=1; UPDATE product SET restricted=TRUE WHERE product_type_id=3; OPEN cur1; create_loop: LOOP FETCH cur1 INTO t_id, t_restricted, t_talk, t_series_id; IF done=1 THEN LEAVE create_loop; END IF; INSERT INTO product (created,product_type_id,last_modified,organisation_id,series_id,name,restricted) VALUES (NOW(),3,NOW(),2,t_series_id,t_talk,t_restricted); SELECT LAST_INSERT_ID() INTO p_id; INSERT INTO product_component (product_id,talk_id,position) VALUES (p_id,t_id,0); END LOOP create_loop; CLOSE cur1; END Just wondering if anyone could help me.

    Read the article

  • How to Check the checkbox when all the checkboxes in a row are checked?

    - by SoftwareNerd
    Hi all How can i check the checkbox when all the other checkboxes in a row are checked what i mean is i have a div table which looks like this <div id="Row-8"> <span class="span2"> <label class="checkbox"> <input type="checkbox" class="regular-checkbox" onchange="checkallrowcheckboxes(this)" value="8" name="selectedObjects" id="8"><label for="rowcommoncheckbox-8"></label></label></span> <span class="span2">AddOrEdit</span> <span class="span2"> <label class="checkbox"> <input type="checkbox" value="8" class="regular-checkbox" name="chkAdd" id="Add-8"><label for="Add-8"></label></label></span> <span class="span2"> <label class="checkbox"> <input type="checkbox" value="8" class="regular-checkbox" name="chkEdit" id="Edit-8"><label for="Edit-8"></label></label></span> <span class="span2"> <label class="checkbox"> <input type="checkbox" value="8" class="regular-checkbox" name="chkDel" id="Delete-8"><label for="Delete-8"></label></label></span> <span class="span2"> <label class="checkbox"> <input type="checkbox" value="8" class="regular-checkbox" name="chkview" id="View-8"><label for="View-8"></label></label></span> </div> Which looks like this ChkColumn PageName Chk1 Chk2 Chk3 Chk4 what i want is when all the checkboxes in right side os row are checked the left side checkbox should be automatically checked..i.e Chkcolumn should be automatically checked when Chk1 Chk2 Chk3 Chk4 are chekced..

    Read the article

  • Ubuntu 14.04:LTS , HPLIP loses USB connection to HP laserjet

    - by Gareth
    This is my first post, so please let me know if i have inadvertanly broken any rules. Problem There seems to be a problem with HPLIP and USB connections in ubuntu 14.04LTS. After upgrading i managed to get the printing to work but today it has broken. Initial Issue (Solved) After upgrading to unbutntu 14.04 LTS my printer lHP LaserJet 1018 stopped printing (code=12) Looking through the Forumsthere are several issues with printitng and HPLIP so I was able to troubleshoot this. The steps I took were : Reran HPdoctor Ran hp-check Un-installed and installed the latest version of HPLIP (3.14.4) Checked the USB connections lsusb and lsusb-v Re-ran hpcheck Removed the printer from HPLIP Re-ran hpcheck Manually configued HPLIP to the printer hp-setup-g <xxx:yyy> And this worked HPLIP was able to see the printer in the USB , test page printed and was happily working for a few weeks. Current Issue Printer Not working However today my wife complains the printer is not working and checking see that although HPLIP has the same error code and did not seem to be able to see the printer although running lsusb could see the printer. Initially thought this may be due to usb given a new bus/device after being turned on and off and went to repeat the steps above at the moment still seeing an error in that the HPLIP is complaining that it cannot see the device **error: Device not found. Please make sure your printer is properly connected and powered-on.** current Observations lsusb output ## Bus 002 Device 007: ID 03f0:4117 Hewlett-Packard LaserJet 1018 sudo hp-check output *> "duan@duan-Lenovo-B550:~$ sudo hp-check [sudo] password for duan: Saving output in log file: /home/duan/hp-check.log HP Linux Imaging and Printing System (ver. 3.14.4) Dependency/Version Check Utility ver. 15.1 Copyright (c) 2001-13 Hewlett-Packard Development Company, LP This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to distribute it under certain conditions. See COPYING file for more details. Note: hp-check can be run in three modes: 1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies are installed to successfully compile HPLIP. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball has the proper dependencies installed to successfully run. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time dependencies). Full Output output of hp-setup -g 002:007 window box "device not found please make sure your printer is properly connected and powered on" duan@duan-Lenovo-B550:~$ sudo hp-setup -g 002:007 [sudo] password for duan: > HP Linux Imaging and Printing System (ver. 3.14.4) Printer/Fax Setup > Utility ver. 9.0 > > Copyright (c) 2001-13 Hewlett-Packard Development Company, LP This > software comes with ABSOLUTELY NO WARRANTY. This is free software, and > you are welcome to distribute it under certain conditions. See COPYING > file for more details. > > hp-setup[18461]: debug: param=002:007 hp-setup[18461]: debug: > selected_device_name=None Fontconfig error: > "/etc/fonts/conf.d/65-khmer.conf", line 14: out of memory Fontconfig > error: "/etc/fonts/conf.d/65-khmer.conf", line 23: out of memory > Fontconfig error: "/etc/fonts/conf.d/65-khmer.conf", line 32: out of > memory hp-setup[18461]: debug: Sys.argv=['/usr/bin/hp-setup', '-g', > '002:007'] printer_name=None param=002:007 jd_port=1 device_uri=None > remove=False Searching for device... hp-setup[18461]: debug: Trying > USB with bus=002 dev=007... hp-setup[18461]: debug: Not found. > hp-setup[18461]: debug: Trying serial number 002:007 hp-setup[18461]: > debug: Probing bus: usb hp-setup[18461]: debug: Probing bus: par > error: Device not found. Please make sure your printer is properly > connected and powered-on. hp-setup[18461]: debug: Starting GUI loop. .. USB lead Works with the Windows 7 laptop Printer Works with windows 7 laptop Questions Is this a Bug with HPLIP or an issue with laptop/printer? Supplementary question if it is a bug what information is needed and where should it be sent ? Any suggestions on how to get the printer to work correctly with Ubuntu 14.04LTS/HPLIP 13.4.3 so that it stays working ?

    Read the article

  • SharePoint 2007 / 2010 Content Indexing &ldquo;The file reached the maximum download limit. Check that the full text of the document can be meaningfully crawled.&rdquo;

    - by Stacy Vicknair
    If you have large files in a content source that is being indexed by Sharepoint you might run into the following error message: “The file reached the maximum download limit. Check that the full text of the document can be meaningfully crawled.” This is usually caused because SharePoint’s MaxDownloadSize setting is set lower than the size of the file you are attempting to index. You can increase this value, restart the service then kick off a full crawl in order to fix this issue, but SharePoint 2007 and 2010 have different methods for accomplishing this task.   Sharepoint 2007 Open up the Registry editor and increase the MaxDownloadSize value to a number (in MB) higher than the largest file being indexed. You can find this at: HKEY_LOCAL_MACHINE\Software\Microsoft\Search\1.0\Gathering Manager After you increase the size, cycle the search service and kick off a full crawl of the content source in question.   Sharepoint 2010 With SharePoint 2010 you can use PowerShell via the Sharepoint 2010 Console in order to change the MaxDownloadSize. Execute the following commands to update the value: 1: $ssa = Get-SPEnterpriseSearchServiceApplication 2: $ssa.SetProperty(“MaxDownloadSize”, <new size in MB>) 3: $ssa.Update()   References: http://support.microsoft.com/kb/287231 http://blogs.technet.com/b/brent/archive/2010/07/19/sharepoint-server-2010-maxdownloadsize-and-maxgrowfactor.aspx   Technorati Tags: SharePoint,WSS,MaxDownloadSize,Search

    Read the article

  • Powershell Run-As Script

    - by marc dekeyser
    Disclaimer: This script is not of my own making. I found it on a share somewhere and it is so handy I started using in a bunch of scripts. To the writer: If you're out there, somewhere, when you see this, thank you! Check if script is running as Adminstrator and if not use RunAs    # Use Check Switch to check if admin        param([Switch]$Check)        $IsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()`        ).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")            if ($Check) { return $IsAdmin }        if ($MyInvocation.ScriptName -ne "")    {         if (-not $IsAdmin)         {             try            {                 $arg = "-file `"$($MyInvocation.ScriptName)`""                Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList $arg -ErrorAction 'stop'             }            catch            {                Write-Warning "Error - Failed to restart script with runas"                 break                          }            exit # Quit this session of powershell        }     }     else     {         Write-Warning "Error - Script must be saved as a .ps1 file first"         break     } write-host "Script Running As Administrator" -foregroundcolor redWrite-host ""

    Read the article

  • My ASP.NET Accordion will not animate panel changes when triggered by check boxes.

    - by CowKingDeluxe
    My accordion panel in markup: <ajaxToolkit:Accordion ID="MyAccordion" runat="server" SelectedIndex="0" HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent" AutoSize="None" FadeTransitions="true" TransitionDuration="250" FramesPerSecond="40" RequireOpenedPane="false" SuppressHeaderPostbacks="true"> <Panes> <ajaxToolkit:AccordionPane ID="AccordionPane10" runat="server"> <Header>BBBBBBBBBB</Header> <Content> FFFFFFFF:<br /><br /> <table cellpadding="0" cellspacing="0" width="750"><tr><td width="450" class="verificationtdleft"> <asp:Image ID="step4_originalimage" runat="server" AlternateText="" /> </td><td width="300"> <asp:CheckBox ID="CB_Verification0" runat="server" AutoPostBack="true" /> Verify </td></tr> </table> </Content> </ajaxToolkit:AccordionPane> <ajaxToolkit:AccordionPane ID="AccordionPane11" runat="server"> <Header>GGGGGGGGG</Header> <Content> HHHHHHHHHH:<br /><br /> <table cellpadding="0" cellspacing="0" width="750"><tr><td width="450" class="verificationtdleft"> <asp:Image ID="step4_image_thumbnail" runat="server" AlternateText="" /> </td><td width="300"> <asp:CheckBox ID="CB_Verification1" runat="server" AutoPostBack="true" /> Verify </td></tr> </table> </Content> </ajaxToolkit:AccordionPane> </Panes> Here's how I handle the checkbox check: Private Sub CB_Verification0_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CB_Verification0.CheckedChanged MyAccordion.SelectedIndex = 1 End Sub I'm causing the panels to change correctly, it's just that they don't animate like they do when I click the headers. When I click the checkbox to change the panel, the panel just disappears instantly and the new one appears instantly, but I want it to be animated as if I clicked the headers. Is there a way to cause the animation to happen when force changing the visible panel?

    Read the article

  • Check my anagram code from a job interview in the past.

    - by Michael Dorgan
    Had the following as an interview question a while ago and choked so bad on basic syntax that I failed to advance (once the adrenalin kicks in, coding goes out the window.) Given a list of string, return a list of sets of strings that are anagrams of the input set. i.e. "dog","god", "foo" should return {"dog","god"}. Afterward, I created the code on my own as a sanity check and it's been around now for a bit. I'd welcome input on it to see if I missed anything or if I could have done it much more efficiently. Take it as a chance to improve myself and learn other techniques: void Anagram::doWork(list input, list &output) { typedef list SortType; SortType sortedInput; // sort each string and pair it with the original for(list<string>::iterator i = input.begin(); i != input.end(); ++i) { string tempString(*i); std::sort(tempString.begin(), tempString.end()); sortedInput.push_back(make_pair(*i, tempString)); } // Now step through the new sorted list for(SortType::iterator i = sortedInput.begin(); i != sortedInput.end();) { set<string> newSet; // Assume (hope) we have a match and pre-add the first. newSet.insert(i->first); // Set the secondary iterator one past the outside to prevent // matching the original SortType::iterator j = i; ++j; while(j != sortedInput.end()) { if(i->second == j->second) { // If the string matches, add it to the set and remove it // so that future searches need not worry about it newSet.insert(j->first); j = sortedInput.erase(j); } else { // else, next element ++j; } } // If size is bigger than our original push, we have a match - save it to the output if(newSet.size() > 1) { output.push_back(newSet); } // erase this element and update the iterator i = sortedInput.erase(i); } }

    Read the article

  • How do I check for the existence of an external file with XSL?

    - by LOlliffe
    I've found a lot of examples that reference Java and C for this, but how do I, or can I, check for the existence of an external file with XSL. First, I realize that this is only a snippet, but it's part of a huge stylesheet, so I'm hoping it's enough to show my issue. <!-- Use this template for Received SMSs --> <xsl:template name="ReceivedSMS"> <!-- Set/Declare "SMSname" variable (local, evaluates per instance) --> <xsl:variable name="SMSname"> <xsl:value-of select=" following-sibling::Name"/> </xsl:variable> <fo:table font-family="Arial Unicode MS" font-size="8pt" text-align="start"> <fo:table-column column-width=".75in"/> <fo:table-column column-width="6.75in"/> <fo:table-body> <fo:table-row> <!-- Cell contains "speakers" icon --> <fo:table-cell display-align="after"> <fo:block text-align="start"> <fo:external-graphic src="../images/{$SMSname}.jpg" content-height="0.6in"/> What I'd like to do, is put in an "if" statement, surronding the {$SMSname}.jpg line. That is: <fo:block text-align="start"> <xsl:if test="exists( the external file {$SMSname}.jpg)"> <fo:external-graphic src="../images/{$SMSname}.jpg" content-height="0.6in"/> </xsl:if> <xsl:if test="not(exists( the external file {$SMSname}.jpg))"> <fo:external-graphic src="../images/unknown.jpg" content-height="0.6in"/> </xsl:if> </fo:block> Because of "grouping", etc., I'm using XSLT 2.0. I hope that this is something that can be done. I hope even more that it's something simple. As always, thanks in advance for any help. LO

    Read the article

  • How to Load Dependent Files on Demand + Check if They're Loaded or Not?

    - by br4inwash3r
    I'm trying to implement an assets/dependency loader that i've found from an old article at 24Ways.org. most of you might be familiar with it. it's from this article by Christian Heilmann: http://24ways.org/2007/keeping-javascript-dependencies-at-bay i've modified the script to load CSS files as well. and it's now quite close to what i want. but i still need to do some checking to see wether an asset have been completely loaded or not. just wondering if you guys have any ideas :) here's what my script currently looked like: var assetLoader = { assets: { products: { js: 'products.js', css: 'products.css', loaded: false }, articles: { js: 'articles.js', css: 'articles.css', loaded: false }, [...] cycle: { js: 'jquery.cycle.min.js', loaded: false }, swfobject: { js: 'jquery.swfobject.min.js', loaded: false } }, add: function(asset) { var comp = assetLoader.assets[asset]; var path = '/path/to/assets/'; if (comp && comp.loaded == false) { if (comp.js) { // load js var js = document.createElement('script'); js.src = path + 'js/' + comp.js; js.type = 'text/javascript'; js.charset = 'utf-8'; // append to document document.getElementsByTagName('body')[0].appendChild(js); } if (comp.css) { // load css var css = document.createElement('link'); css.rel = 'stylesheet'; css.href = path + 'css/' + comp.css; css.type = 'text/css'; css.media = 'screen, projection'; css.charset = 'utf-8'; // append to document document.getElementsByTagName('head')[0].appendChild(css); } } }, check: function(asset) { assetLoader.assets[asset].loaded = true; } } Christian explains this method in his article in great detail. I don't want to confuse you guys anymore with my bad english :P and here's an example of how i run the script: ... // load jquery cycle plugin if (page=='tvc' || page=='products') { if (!assetLoader.assets.cycle.loaded) { assetLoader.add('cycle'); } } // load products page assets if (!assetLoader.assets.products.loaded) { assetLoader.add('products'); } ... this kind of approach is very problematic though. coz assets loads asynchronously, which means some of the code inside products.js that depends on jquery.cycle.js might continue running before jquery.cycle.js is even loaded resulting in errors. while i'm quite aware that scripts can be attached with an onload event, i'm just not really sure how to implement it to my script. anyone care to help me? please... :P

    Read the article

  • How can I check the content of the arrays? Parsing XML file with ObjectiveC

    - by skiria
    I have 3 classes- video { nameVideo, id, description, user... } topic {nameTopic, topicID, NSMutableArray videos; } category {nameCategory, categoryID, NSMUtableArray topics} And then in my app delegate I defined- NSMutableArray categories; I parse an XML file with this code. I try the arrays hierachy, and i think that i don't add any object on the arrays. How can I check it? What's wrong? (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict { if([elementName isEqualToString:@"Videos"]) { //Initialize the array. appDelegate.categories = [[NSMutableArray alloc] init]; } else if ([elementName isEqualToString:@"Category"]) { aCategory = [[Category alloc] init]; aCategory.categoryID = [[attributeDict objectForKey:@"id"] integerValue]; NSLog(@"Reading id category value: %i", aCategory.categoryID); } else if ([elementName isEqualToString:@"Topic"]) { aTopic = [[Topic alloc] init]; aTopic.topicID = [[attributeDict objectForKey:@"id"] integerValue]; NSLog(@"Reading id topic value: %i", aTopic.topicID); } else if ([elementName isEqualToString:@"video"]) { aVideo = [[Video alloc] init]; aVideo.videoID = [[attributeDict objectForKey:@"id"] integerValue]; aVideo.nameTopic = currentNameTopic; aVideo.nameCategory = currentNameCategory; NSLog(@"Reading id video value: %i", aVideo.videoID); } NSLog(@"Processing Element: %@", elementName); } (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if(!currentElementValue) currentElementValue = [[NSMutableString alloc] initWithString:string]; else [currentElementValue appendString:string]; NSLog(@"Processing Value: %@", currentElementValue); } (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if([elementName isEqualToString:@"Videos"]) return; if ([elementName isEqualToString:@"Category"]) { [appDelegate.categories addObject:aCategory]; [aCategory release]; aCategory = nil; } if ([elementName isEqualToString:@"Topic"]) { [aCategory.topics addObject:aTopic]; //NSLog(@"contador: %i", [aCategory.topics count]); //NSLog(@"contador: %@", aTopic.nameTopic); [aTopic release]; aTopic = nil; } if ([elementName isEqualToString:@"video"]) { [aTopic.videos addObject:aVideo]; NSLog(@"count number videos: %i", [aTopic.videos count]); -- always 0 NSLog(@"NOM CATEGORIA VIDEO: %@", aVideo.urlVideo); -- OK [aVideo release]; aVideo = nil; } if ([elementName isEqualToString:@"nameCategory"]) { //[aCategory setValue:currentElementValue forKey:elementName]; aCategory.nameCategory = currentElementValue; currentNameCategory = currentElementValue; } if ([elementName isEqualToString:@"nameTopic"]) { aTopic.nameTopic = currentElementValue; currentNameTopic = currentElementValue; } else [aVideo setValue:currentElementValue forKey:elementName]; [currentElementValue release]; currentElementValue = nil; }

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >