Daily Archives

Articles indexed Wednesday October 31 2012

Page 8/17 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • JavaScript loop stops on "localStorage.removeItem"

    - by user1755603
    Why is the "localStorage.removeItem" stopping the loop? If I remove "localStorage.removeItem" and only leave the "alert", it loops though whole thing, but with "localStorage.removeItem" it stops on the first match. function removeTask() { for (i=0; i < localStorage.length; i++){ checkbox = document.getElementById('utford'+i); if (checkbox.checked == true) { alert(i); localStorage.removeItem(localStorage.key(i)); } } printList(); }

    Read the article

  • how to delete multiple folders,desktop and start menu shortcut using vbscript

    - by user1756858
    I never did any vbscript before, so i don't know if my question is very easy one. Following is the flow of steps that has to be done : Check if exist and delete a folder at c:\test1 if found and continue. If not found continue. Check if exist and delete a folder at c:\programfiles\test2 if found and continue. If not found continue. Check if a desktop shortcut and start menu shortcut exist and delete if found. If not exit. I could delete 2 folders with the following code: strPath1 = "C:\test1" strPath1 = "C:\test1" DeleteFolder strPath1 DeleteFolder strPath1 Function DeleteFolder(strFolderPath1) Dim objFSO, objFolder Set objFSO = CreateObject ("Scripting.FileSystemObject") If objFSO.FolderExists(strFolderPath) Then objFSO.DeleteFolder strFolderPath, True End If Set objFSO = Nothing But i need to run one script to delete 2 folders in different paths, 2 shortcuts one in start menu and one on desktop. I was experimenting with this code to delete the shortcut on my desktop: Dim WSHShell, DesktopPath Set WSHShell = WScript.CreateObject("WScript.Shell") DesktopPath = WSHShell.SpecialFolders("Desktop") on error resume next Icon = DesktopPath & "\sample.txt" Set fs = CreateObject("Scripting.FileSystemObject") Set A = fs.GetFile(Icon) A.Delete WScript.Quit It works fine for txt file on desktop, but how do i delete a shortcut for an application from desktop as well as start menu.

    Read the article

  • remove a varchar2 string from the middle of table data values

    - by Michelle Daniel
    Data in the file_name field of the generation table should be an assigned number, then _01, _02, or _03, etc. and then .ldf (example 82617_01.pdf). Somewhere, the program is putting a state name and sometimes a date/time stamp, between the assigned number and the 01, 02, etc. (82617_ALABAMA_01.pdf or 19998_MAINE_07-31-2010_11-05-59_AM.pdf or 5485325_OREGON_01.pdf for example). We would like to develop an SQL statement to find the bad file names and fix them. In theory it seems rather simple to find file_names that include a varchar2 data type and remove it, but putting the statement together is beyond me. Any help or suggestions apprecuiated. Something like ........... UPDATE GENERATION SET FILE_NAME (?) WHERE FILE_NAME (?...LIKE '%STRING%');?

    Read the article

  • How do I introduce row names to a function in R

    - by Tahnoon Pasha
    Hi I have a utility function I've put together to insert rows into a dataframe below. If I was writing out the formula by hand I would put something like newframe=rbind(oldframe[1:rownum,],row_to_insert=row_to_insert,oldframe[(rownum+1:nrow(oldframe),] to name row_to_insert. Could someone tell me how to do this in a function? Thanks insertrows=function (x, y, rownum) { newframe = rbind(y[1:rownum, ], x, y[(rownum + 1):nrow(y), ]) return(data.frame(newframe)) } MWE of some underlying data added below financials=data.frame(sales=c(100,150,200,250),some.direct.costs=c(25,30,35,40),other.direct.costs=c(15,25,25,35),indirect.costs=c(40,45,45,50)) oldframe=t(financials) colnames(oldframe)=make.names(seq(2000,2003,1)) total.direct.costs=oldframe['some.direct.costs',]+oldframe['other.direct.costs',] newframe=total.direct.costs n=rownum=3 oldframe=insertrows(total.direct.costs=newframe,oldframe,n)

    Read the article

  • MySql Check if NOW() falls within a weekday/time range

    - by Niall
    I have a table as follows: CREATE TABLE `zonetimes` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `zone_id` int(10) unsigned NOT NULL, `active_from_day` tinyint(1) unsigned NOT NULL DEFAULT '2', `active_to_day` tinyint(1) unsigned NOT NULL DEFAULT '2', `active_from` time NOT NULL, `active_to` time NOT NULL PRIMARY KEY (`id`) ) ENGINE=MyISAM ; So, a user could add a time entry starting on a particular day and time and ending on a particular day and time, eg: Between Monday 08:00 and Friday 18:00 or Between Thursday 15:00 and Tuesday 15:00 (Note the crossover at the end of the week). I need to query this data and determine if a zone is currently active (NOW(), DAYOFWEEK() etc)... This is turning out to be quite tricky. If I didn't have overlaps, eg: from 'Wednesday 8pm to Tuesday 4am' or from 'Thursday 4pm to Tuesday 4pm' this would be easy with BETWEEN. Also, need to allow a user to add for the entire week, eg: Monday 8am - Monday 8am (This should be easy enough, eg: where (active_from_day=active_to_day AND active_from=active_to) OR .. Any ideas? Note: I found a similar question here Timespan - Check for weekday and time of day in mysql but it didn't get an answer. One of the suggestions was to store each day as a separate row. I would much rather store one time span for multiple days though.

    Read the article

  • Using Ant how can I dex a directory of jars?

    - by cbeaudin
    I have a directory full of jars (felix bundles). I want to iterate through all of these jars and create dex'd versions. My intent is to deploy each of these dex'd jars as standalone apk's since they are bundles. Feel free to straighten me out if I am approaching this from the wrong direction. This first part is just to try and create a corresponding .dex file for each jar. However when I run this I am getting a "no resources specified" error coming out of Ant. Is this the right approach, or is there a simpler approach to just input a jar and output a dex'd version of that jar? The ${file} is valid as it is spitting out the name of the file in the echo command. <target name="dexBundles" description="Run dex on all the bundles"> <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${basedir}/libs/ant-contrib.jar" /> <echo>Starting</echo> <for param="file"> <path> <fileset dir="${pre.dex.dir}"> <include name="**/*.jar" /> </fileset> </path> <sequential> <echo message="@{file}" /> <echo>Converting jar file @{file} into ${post.dex.dir}/@{file}.class...</echo> <apply executable="${dx}" failonerror="true" parallel="true" verbose="true"> <arg value="--dex" /> <arg value="--output=${post.dex.dir}/${file}.dex" /> <arg path="@{file}" /> </apply> </sequential> </for> <echo>Finished</echo> </target>

    Read the article

  • Why does casting to double using "String * 1" fail? Will CDbl(String) work on all systems?

    - by Jamie Bull
    I have an application which contains the line below to assign a parsed XML value to a variant array. V(2) = latNode.Text * 1 This works fine on my system (Windows 7, Excel 2010) but doesn't work on some other system or systems - and I've not been able to get a response from the user who reported the problem. I've switched out the offending line for: V(2) = CDbl(latNode.Text) This still works on my system, but then I had no problem in the first place. The question is on what systems does the first approach fail and why, and will the second method always work? I'm sure I've used the "Stying * 1" trick elsewhere before and would like to know how concerned I should be about tracking down other occurrences. Thanks.

    Read the article

  • jquery plugin caroufredsel hide next/prev buttons until mouseover carousel

    - by John Magnolia
    I am trying to make the buttons hide by default and they only become visible when the mouse is over. Although I am having problems where the carousel core code seems to be adding display block even if I set display none in the CSS. var $slides = $("#slides"); $slides.find('ul.banners').eq(0).carouFredSel({ height: 360, items: { visible: 1 }, scroll: { easing: "easeInOutSine", duration: 1200 }, auto: { delay: 1000 }, prev: { button: $slides.find('.prev'), items: 1 }, next:{ button: $slides.find('.next'), items: 1 }, pagination: { container: $slides.find(".pagination"), keys: true, anchorBuilder: function(nr) { return '<li><a href="#"><span>'+nr+'</span></a></li>'; } } }); $slideButtons = $slides.find(".next,.prev"); $slides.find('ul.banners').hover(function(){ $slideButtons.fadeIn(); },function(){ $slideButtons.fadeOut(); }); HTML <div id="slides"> <ul class="banners"> <li><img /></li> <li><img /></li> </ul> <ul class="pagination"></ul> <div class="next">Next</div> <div class="prev">Previous</div> </div>

    Read the article

  • XNA 2d camera with arbitrary zoom center

    - by blooop
    I have a working 2D camera in XNA with these guts: ms = Mouse.GetState(); msv = new Vector2(ms.X, ms.Y); //screenspace mouse vecor pos = new Vector2(0, 0); //camera center of view zoom_center = cursor; //I would like to be able to define the zoom center in world coords offset = new Vector2(scrnwidth / 2, scrnheight / 2); transmatrix = Matrix.CreateTranslation(-pos.X, -pos.Y, 0) * Matrix.CreateScale(scale, scale, 1) * Matrix.CreateTranslation(offset.X, offset.Y, 0); inverse = Matrix.Invert(transmatrix); cursor = Vector2.Transform(msv, inverse); //the mouse position in world coords I can move the camera position around and change the zoom level (with other code that I have not pasted here for brevity). The camera always zooms around the center of the screen, but I would like to be able to zoom about an arbitrary zoom point (the cursor in this case), like the indie game dyson http://www.youtube.com/watch?v=YiwjjCMqnpg&feature=player_detailpage#t=144s I have tried all the combinations that make sense to me, but am completely stuck.

    Read the article

  • What do people find difficult about C pointers?

    - by Paul
    From the number of questions posted here, it's clear that people have some pretty fundemental issues when getting their heads around pointers and pointer arithmetic. I'm curious to know why. They've never really caused me major problems (although I first learned about them back in the Neolithic). In order to write better answers to these questions, I'd like to know what people find difficult. So, if you're struggling with pointers, or you recently were but suddenly "got it", what were the aspects of pointers that caused you problems?

    Read the article

  • Slightly off topic - How to Fix Sky Go Error [t6013-c1501] (and [t6000-c1501])

    - by bconlon
    Sky doesn't seem to understand what their own errors mean, so I cobbled together an understanding from some other posts and managed to get it working.When you see the error [t6013-c1501] instead of your TV programme in Sky Go, it seems to mean:'You registered a device, but then changed the hardware, so now I'm confused!'In other words, the Digital rights management (DRM) used between Sky Go and Silverlight stored an old fingerprint of your PC, but rather than recognising this and allowing you to remove the device, it just disappears from the 'Manage Devices' page.DISCLAIMER: Perform the following steps at your own risk. It worked for me, but I didn't care if it broke stuff. If you care....don't do it!So, to fix this I did the following:1. Login to Sky Go and click 'Watch live TV' from the home page. It will attempt to show Sky News and fail with the error [t6013-c1501].2. Right click on the error and you should see the Menu option 'Silverlight'. Select this and a dialog should appear. Click the 'Application Storage' tab and delete any entry that relates to sky go. Clcik OK to close the dialog.3. Open explorer and navigate to the folder C:\ProgramData\Microsoft\PlayReady4. Rename the file mspr.hds to mspr.hds.OLD5. Go back to the browser and click F5. You may need to logout/login (not sure).Note: Don't rename/delete the folder C:\ProgramData\Microsoft\PlayReady or you will get the error [t6000-c1501]. The folder must exist in order for the new file to be created by Silverlight. Techie talk:So whoever wrote the code to create a new mspr.hds file didn't write code to check the folder existed causing what I assume is a generic error t6000, probably something like:catch (Exception ex) { WriteToLog("Oops, something broke!"); }#

    Read the article

  • Free Windows 8 book on programming with html, css and javascript

    - by Dave Noderer
    Just a heads up from DevFish (http://devfish.net), a free book on writing applications for Windows 8using html, css and javascript by Kraig Brockschmidt . You can find the book here: http://blogs.msdn.com/b/microsoft_press/archive/2012/10/29/free-ebook-programming-windows-8-apps-with-html-css-and-javascript.aspx I have not finished reading this but so far it looks like it will be a great resource if you have any interest in trying the windows 8 javascript programming model. Besides all the aspects of controls, library support and animations the book also talks about how to make your own components in c#, vb or c++.

    Read the article

  • SharePoint 2010 slow page response time suddenly !

    - by H(at)Ni
    Hello, One of my customers faced a problem that suddenly their SharePoint portal was loading extremely slower than usual. After some basic troubleshooting I did not find anything suspicious in the ULS logs, IIS logs or even Event logs. After that, I came to the part that I like most which is capturing a memory dump for the IIS process and analyzing the threads running. I searched for any common mistakes like looping a large list, calling a remote web service but couldn't find any. After a deep analysis of the memory dump (Which was done by an Escalation Engineer for SharePoint), it seems that the farm root certificate was missing and therefore was trying to validate it from the internet every time the user requests to load the page and this was the resolution http://support.microsoft.com/kb/2625048 Cheers,

    Read the article

  • Open in explorer view not working SOMETIMES !!

    - by H(at)Ni
    Hello, As weird as it seems to anyone who used it before, most of the time explorer view does not work until some steps to be followed, but in my case it was working and sometimes randomly not working ! After spending hours of troubleshooting and collecting logs, Network traces, Fiddler traces, etc. I reached the solution from the Network trace. Although it seems strange, it was sending a PROPFIND request to the root directory "/" which was actually deleted. So, I came up to this important article that states that you must have a root site collection in your SharePoint web application in order to keep it in a supported state. http://support.microsoft.com/kb/2590564 And actually that explained it and solved the strange behavior as well. Cheers,

    Read the article

  • SharePoint Database security corruption

    - by H(at)Ni
    Hello, One time I faced an issue where my customer is having an HTTP 500 internal server error while trying to access any SharePoint site. The problem appeared once he moved back and forth with inheriting/breaking inheritance of permissions over different levels in the site collection. "Security corruption in database" sounds very tough for a customer running a production portal with a backup that can make him lose around 3 weeks of valuable data. However, the solution tends not to be that hard, there's an stsadm command that help us detect the corruption and even delete the orphaned items causing the corruption. Follow these steps: a. stsadm -o databaserepair -url http://SITEURL -databasename DBNAME                and it returned some orphaned items.            b. stsadm -o databaserepair -url http://SITEURL -databasename DBNAME -deletecorruption                and it removed the orphaned items. Cheers,

    Read the article

  • Hyper-V extensible virtual switch disables network

    - by Sebastian Krysmanski
    I just installed the Hyper-V role on my Windows Server 2012. It comes with something called a "Hyper-V extensible virtual switch". I assigned it to the only network card in my server. By doing so, the network card became useless/disabled/inactive/.. because the virtual switch disabled all features (IPv4, IPv6, Client for Microsoft Networks, ...) on the network adapter. Is this supposed to happen? I admit I've no idea what this "extensible virtual switch" actually does. A short explanation would be nice as well.

    Read the article

  • Trouble with backup on SBS2008

    - by MemLeak
    We have an SBS2008 installation, which has a backup task. It creates a backup twice a day onto external storage. This worked for a long time. But the backup can't be performed now. The last valid backup was before some Exchange updates, SBS Update Rollup 8 and SharePoint updates were installed. The only error in Event Logs is for VSS (the Volume Shadow Service), which I only have in German. Things I've done: restart the server chkdsk /r /f for all volumes restart the VSS service googling manual backup Nothing's helped. How can I set up the backup again?

    Read the article

  • Error on table import

    - by Moazam Ali
    I am importing tables from my backup server to main server through import; all the tables import successfully but one table could not import and gives the error below. What should i do with it? error at destination for row number 2334233 errors encountered so far in this task : 1 could not allocate space for object 'operator_audit_trail' in database sens_ms because the 'sens_index' file group is full

    Read the article

  • Syncronize Linux /etc/ directory

    - by entend
    I have virtual machine with Linux (Ubuntu server) which is used as prototype for other machines. Sometimes I make changes in prototype system and want to import this changes at some other machine. I know about Puppet, cfengine and FAI but want something easy for example rsync script which will work through ssh when it needed. Main goal is /etc/ directory. But I don't want to syncronize some private files for example /etc/passwd /etc/shadow and so on. I don't know all of it. Are there tips for my task ? May be someone have such rsync script.

    Read the article

  • In terms of load handling, which is better: one server or two of equivalent power?

    - by seldary
    My goal is to figure out if i'm better off with one strong server, or multiple weaker servers with a load balancer. Does the fact of splitting the load between servers have an effect on the total load my website could take? It's hard to single that out, because there are of course a lot of parameters that affect the results, so some assumptions: Putting failover considerations aside - I know it matters, but for the sake of the question's simplicity, lets assume nothing fails. The servers in the multiple servers option have an accumulated "power" equivalent to the one server option (about the same amount of cores and RAM space). If that is too theoretical, here is a concrete question that could help: Suppose I have several instances of exactly the same server - lets call it S. Suppose that server S can serve a load of up to X calls per time unit. Will two S servers with a load balancer serve 2X calls per time unit? significantly more? significantly less?

    Read the article

  • Using 2-port LSI 2308-8e card to control 24 SAS HDDs

    - by GregC
    I would like to rely on a RAID-on-chip solution to control 24 SAS hard drives in a direct-attached environment. How would you approach this to get best bandwidth given that I'd like to spend less than $10,000 on the interconnect. I've read that LSI 2308 chip can easily handle 8-drive SSD RAID6 in hardware. I'd like to harness its power to control 24 SAS hard drives over an expander in an external enclosure. Currently I use an Infortrend S24S-G2240 external enclosure. It provides its own controller and expander. I'd like to use LSI 2308 controller for RAID6 somehow instead of the mystery controller in the enclosure. P.S. I tried to create SAS-expander as a tag, but my rep on this site is low.

    Read the article

  • Shared resources in Windows Server 2008 were lost

    - by user316687
    We have an Oracle database in Windows Server 2003, which has its archived redo logs stored on a shared resource of a Windows Server 2008: \\192.168.1.189\d$\folder_for_archivedlogs However, according to Oracle's alert.log, at 10:01 p.m that shared resource got lost and the database was inaccessible. From my Windows Server 2003, on Windows Explorer, I couldn't access that shared resource, but I got a response when I did ping 192.168.1.189. I reviewed all the Event Logs on that Windows 2008, but there is no error at 10:00pm or 11:00pm. Has anyone seen some similar case before? (Shared resources get lost, but you still can ping the server and there are no error events in the Event Logs).

    Read the article

  • Deleting certain files sits at "preparing to recycle" on Windows 7?

    - by Rachel
    We recently setup one of our users with a brand new Windows 7 computer, however she is unable to delete certain files. With some testing, I found I cannot move, rename, or view properties of these files either. When trying to delete the file, it just sits at the "Preparing to recycle" popup, however the "from" section says "Discovering items..." Clicking "More Details" on the popup shows me that it can't find the file name or where it's recycling from: Other notes... All the affected files are .pdf files that get created via a scanner. Other pdf files are fine. Opening the files works fine. I can open the file, Save As a new file, and delete the new one just fine Trying to delete the file via command prompt just sits there Rebooting the computer will let me manipulate the files like normal, however this user is responsible for scanning hundreds of documents a day and I'd rather not have to tell her to reboot her computer to delete files. The user is part of the administrator group on the computer The Owner of the affected files is the user attrib of files is just A

    Read the article

  • Which is the recommended filesystem for VMware Server / ESXi?

    - by elitalon
    We have a couple of servers in office with VMware Server as virtualization solution. We are planning an upgrade of our infrastructure. Some servers will remain with VMware Server, but we want to migrate some others to VMware ESXi. In both cases we are making a fresh install, and I wonder if there any suggestion/guidelines regarding the host filesystem and its partitions. EDIT: We are using local storage instead of SAN/NAS external storage, because we are not sure if it is worth it to use them given our office size/requirements.

    Read the article

  • What's a good tool for collecting statistics on filesystem usage?

    - by Kamil Kisiel
    We have a number of filesystems for our computational cluster, with a lot of users that store a lot of really large files. We'd like to monitor the filesystem and help optimize their usage of it, as well as plan for expansion. In order to this, we need some way to monitor how these filesystems are used. Essentially I'd like to know all sorts of statistics about the files: Age Frequency of access Last accessed times Types Sizes Ideally this information would be available in aggregate form for any directory so that we could monitor it based on project or user. Short of writing something up myself in Python, I haven't been able to find any tools capable of performing these duties. Any recommendations?

    Read the article

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