Search Results

Search found 223 results on 9 pages for 'wb'.

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

  • Sorting an XML file through XSL

    - by jbugeja
    I have an XML file that I want to sort by an attribute. The file is structured as shown below: <wb xmlns:cf="http://www.macromedia.com/2004/cfform"> <a:form name="chart"> <a:input FIELDNUMBER="09" INDEX="2" LEFT="200" /> <a:input FIELDNUMBER="08" INDEX="3" LEFT="200" /> <a:fieldset FIELD="a" FIELDNAME="FieldSet1"> <a:input FIELDNUMBER="02" INDEX="4" LEFT="200" /> <a:select1 FIELDNUMBER="01" /> </a:fieldset> <a:fieldset FIELD="b" FIELDNAME="FieldSet1"> <a:input FIELDNUMBER="04" INDEX="7" LEFT="200" /> <a:select1 FIELDNUMBER="03" /> <a:fieldset FIELD="c" FIELDNAME="FieldSet1"> <a:input FIELDNUMBER="06" INDEX="8" LEFT="200" /> <a:input FIELDNUMBER="05" INDEX="6" LEFT="200" /> </a:fieldset> </a:fieldset> </a:form> </wb> I would like to sort the above XML all throughout by @fieldnumber, but at the same I want to keep the same structure of the XML. I have managed to sort other XML file but they did not have such nesting levels. Is this possible with XSL alone and if so how can this be done? The output should be as follows: <wb xmlns:cf="http://www.macromedia.com/2004/cfform"> <a:form name="chart"> <a:input FIELDNUMBER="08" INDEX="3" LEFT="200" /> <a:input FIELDNUMBER="09" INDEX="2" LEFT="200" /> <a:fieldset FIELD="a" FIELDNAME="FieldSet1"> <a:select1 FIELDNUMBER="01" /> <a:input FIELDNUMBER="02" INDEX="4" LEFT="200" /> </a:fieldset> <a:fieldset FIELD="b" FIELDNAME="FieldSet1"> <a:select1 FIELDNUMBER="03" /> <a:input FIELDNUMBER="04" INDEX="7" LEFT="200" /> <a:fieldset FIELD="c" FIELDNAME="FieldSet1"> <a:input FIELDNUMBER="05" INDEX="6" LEFT="200" /> <a:input FIELDNUMBER="06" INDEX="8" LEFT="200" /> </a:fieldset> </a:fieldset> </a:form> </wb> As another example, should the FIELDNUMBER 04 be changed to a value greater than 7 such as 10 (let's assume 10 in this example) then the output of the fieldset with FIELD value b becomes: <a:fieldset FIELD="b" FIELDNAME="FieldSet1"> <a:select1 FIELDNUMBER="03" /> <a:fieldset FIELD="c" FIELDNAME="FieldSet1"> <a:input FIELDNUMBER="05" INDEX="6" LEFT="200" /> <a:input FIELDNUMBER="06" INDEX="8" LEFT="200" /> </a:fieldset> <a:input FIELDNUMBER="10" INDEX="7" LEFT="200" /> </a:fieldset>

    Read the article

  • ?????Exadata????

    - by Liu Maclean(???)
    ??check Exadata Image & OS versions , GI & DB patches sundiag exacheck cellserv ==> imageinfo dbhost ==> /usr/local/bin/imagehistory Also check the version of the switch. Login to Switch and execute the following command [root@myswitch-1 sbin]# version [root@dmorlsw-ib2 sbin]# cd /usr/local/bin [root@dmorlsw-ib2 bin]# ls -lrt version -rwxr-xr-x 1 root root 20356 Apr 4 2011 version Output will look as below. [root@dmorlsw-ib2 ~]# version SUN DCS 36p version: 1.3.3-2 Build time: Apr 4 2011 11:15:19 SP board info: Manufacturing Date: 2009.05.05 Serial Number: "NCD3X0178" Hardware Revision: 0x0006 Firmware Revision: 0x0102 BIOS version: NOW1R112 BIOS date: 04/24/2009 ib8# cat /sys/class/infiniband/is4_0/fw_ver 7.2.300 ib8 # cat /sys/class/dmi/id/bios_version NOW1R112 ib8 # nm2version NM2-36p version: 1.0.1-1 Build time: Sep 14 2009 12:52:51 ComExpress info: Manufacturing Date: 2009.08.19 Serial Number: Hardware Revision: 0x0006 Firmware Revision: 0x0102 { case `uname` in Linux ) ILOM="/usr/bin/ipmitool sunoem cli" ;; SunOS ) ILOM="/opt/ipmitool/bin/ipmitool sunoem cli" ;; esac ; ImageInfo="/opt/oracle.cellos/imageinfo" ; uname -srm ; head -1 /etc/*release ; uptime | cut -d, -f1 ; $ILOM "show /SP system_description system_identifier" | grep = ; $ImageInfo -activated -node -status -ver | grep -v ^$ ; } | tee /tmp/ExaInfo.log $GRID_HOME/OPatch/opatch lsinv -all -oh $GRID_HOME | tee /tmp/OPatchInv.log $ORACLE_HOME/OPatch/opatch lsinv -all | tee -a /tmp/OPatchInv.log cat /tmp/ExaInfo.log Linux 2.6.18-128.1.16.0.1.el5 x86_64 ==> /etc/enterprise-release <== Enterprise Linux Enterprise Linux Server release 5.3 (Carthage) ==> /etc/redhat-release <== Enterprise Linux Enterprise Linux Server release 5.3 (Carthage) 20:37:56 up 458 days system_description = SUN FIRE X4170 SERVER, ILOM v3.0.6.10.b, r52264 system_identifier = Sun Oracle Database Machine Active image version: 11.2.1.2.3 Active image activated: XXXX-XX-XX 12:27:12 +0800 Active image status: success Active node type: COMPUTE Inactive image version: undefined FileName: OPatchInv.log ---------------- ... Oracle Home       : /u01/app/11.2.0/grid Central Inventory : /u01/app/oraInventory   from           : /etc/oraInst.loc OPatch version    : 11.2.0.1.2 OUI version       : 11.2.0.1.0 OUI location      : /u01/app/11.2.0/grid/oui ... -------------------------------------------------------------------------------- List of Oracle Homes:   Name                                       Location   Ora11g_gridinfrahome1         /u01/app/11.2.0/grid   OraDb11g_home1                  /u01/app/oracle/product/11.2.0/dbhome_1 -------------------------------------------------------------------------------- Installed Top-level Products (1): Oracle Grid Infrastructure                                           11.2.0.1.0 ... Interim patches (2) : Patch  9524394      : applied on Thu Jun 03 20:46:05 CST 2010 ... {TRACKING BUG FOR 11.2.0.1 DB MACHINE BUNDLE PATCH 3} Patch  9455587      : applied on Fri Apr 02 18:27:47 CST 2010 ... {MERGE REQUEST ON TOP OF 11.2.0.1.0 FOR BUGS 8483425 8667622 8702731 8730804} Rac system comprising of multiple nodes  Local node = dbserv01  Remote node = dbserv02  Remote node = dbserv03  Remote node = dbserv04 -------------------------------------------------------------------------------- OPatch succeeded. ... Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1 ... Oracle Database 11g                                                  11.2.0.1.0 ... Interim patches (5) : Patch  8888434      : applied on Sat Jan 08 00:27:33 CST 2011 ... {AIX-ASM-CF: LMHB TERMINATE INSTANCE WHEN OFFLINE ONE FAILGROUP IN ASM DG} Patch  8730312      : applied on Thu Jun 03 21:30:03 CST 2010 ... {FWD MERGE FOR BASE BUG 8715387 FOR 12G} Patch  9502717      : applied on Thu Jun 03 21:25:54 CST 2010 ... {LMS HIT ORA-600 [KJBLDRMNEXTPKEY:SEEN] AND CRASHED THE INSTANCE} { + same 2 as GI above} ?? cell server Cache Policy cell08# MegaCli64 -LDInfo -Lall -aALL | grep 'Current Cache Policy' Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU cell09# MegaCli64 -LDInfo -Lall -aALL | grep 'Current Cache Policy' Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU Cache policy is in WB Would recommend proactive  battery repalcement. Example : a. /opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp  -Cache -LALL -aALL ####( Will list the cache policy) b. /opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp  -WB  -LALL -aALL ####( Will try to change teh policy from xx to WB)     So policy Change to WB will not come into effect immediately     Set Write Policy to WriteBack on Adapter 0, VD 0 (target id: 0) success     Battery capacity is below the threshold value ??cell BBU??????: cell08# /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -a0 BBU status for Adapter: 0 BatteryType: iBBU Voltage: 4061 mV Current: 0 mA Temperature: 36 C BBU Firmware Status: Charging Status : None Voltage : OK Temperature : OK Learn Cycle Requested : No Learn Cycle Active : No Learn Cycle Status : OK Learn Cycle Timeout : No I2c Errors Detected : No Battery Pack Missing : No Battery Replacement required : No Remaining Capacity Low : Yes Periodic Learn Required : No Battery state: GasGuageStatus: Fully Discharged : No Fully Charged : Yes Discharging : Yes Initialized : Yes Remaining Time Alarm : No Remaining Capacity Alarm: No Discharge Terminated : No Over Temperature : No Charging Terminated : No Over Charged : No Relative State of Charge: 99 % Charger System State: 49168 Charger System Ctrl: 0 Charging current: 0 mA Absolute state of charge: 21 % Max Error: 2 % Exit Code: 0x00 ????BBU ??: dcli -g ~/cell_group -l root -t '{ uname -srm ; head -1 /etc/*release ; uptime | cut -d, -f1 ; imagehistory ; ipmitool sunoem cli "show /SP system_description system_identifier" | grep = ; ipmitool sunoem cli "show /SP/policy FLASH_ACCELERATOR_CARD_INSTALLED /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -a0 | egrep -i 'BBU|Battery|Charge:|Fully|Low|Learn' ; }' | tee /tmp/ExaInfo.log Target cells: ['cellserv01', 'cellserv02', 'cellserv03', 'cellserv04', 'cellserv05', 'cellserv06', 'cellserv07'] cellserv01: Linux 2.6.18-128.1.16.0.1.el5 x86_64 cellserv01: ==> /etc/enterprise-release <== cellserv01: Enterprise Linux Enterprise Linux Server release 5.3 (Carthage) cellserv01: cellserv01: ==> /etc/redhat-release <== cellserv01: Enterprise Linux Enterprise Linux Server release 5.3 (Carthage) cellserv01: 01:17:39 up 635 days cellserv01: Version : 11.2.1.2.1 cellserv01: Image activation date : 2011-03-25 11:59:34 -0800 cellserv01: Imaging mode : fresh cellserv01: Imaging status : success cellserv01: cellserv01: Version : 11.2.1.2.3 cellserv01: Image activation date : 2011-04-13 12:15:46 +0800 cellserv01: Imaging mode : patch cellserv01: Imaging status : success cellserv01: cellserv01: Version : 11.2.1.2.6 cellserv01: Image activation date : 2011-05-27 23:08:22 +0800 cellserv01: Imaging mode : patch cellserv01: Imaging status : success cellserv01: cellserv01: system_description = SUN FIRE X4275 SERVER, ILOM v3.0.6.10.b, r52264 cellserv01: system_identifier = Sun Oracle Database Machine cellserv01: Connected. Use ^D to exit. cellserv01: -> show /SP/policy FLASH_ACCELERATOR_CARD_INSTALLED cellserv01: show: No matching properties found. cellserv01: cellserv01: -> Session closed cellserv01: Disconnected cellserv01: BBU status for Adapter: 0 cellserv01: BatteryType: iBBU cellserv01: BBU Firmware Status: cellserv01: Learn Cycle Requested : No cellserv01: Learn Cycle Active : No cellserv01: Learn Cycle Status : OK cellserv01: Learn Cycle Timeout : No cellserv01: Battery Pack Missing : No cellserv01: Battery Replacement required : No cellserv01: Remaining Capacity Low : Yes cellserv01: Periodic Learn Required : No cellserv01: Battery state: cellserv01: Fully Discharged : No cellserv01: Fully Charged : Yes cellserv01: Relative State of Charge: 99 % cellserv01: Absolute state of charge: 21 % dcli -l root -g /root/all_group '/opt/MegaRAID/MegAaCli/MegaCli64 -AdpBbuCmd -a0' > BBU.out check ipmi: dcli -g ~/cell_group -l root -t '{ > ipmitool sunoem cli "show /SP/policy FLASH_ACCELERATOR_CARD_INSTALLED" | grep = ; MegaCli64 -LDInfo -Lall -aALL | grep 'Current Cache Policy' ; }' | tee /tmp/ExaCells.log

    Read the article

  • PrintPreview Window in C#

    - by M.Thillai
    Hello Techies, In my windows application in .net, i need to have Print Preview option for an excel file. The followings are my codings. //Excel.Application excelApp = new Excel.Application(); Excel.Workbook wb = excelApp.Workbooks.Open(@"C:\\Documents and Settings \\Admin \\Desktop \\DoCoMo\\ news5.xls", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); Excel.Worksheet ws = (Excel.Worksheet)wb.Worksheets[1]; ws.PrintPreview(Type.Missing); The compilation is successful. but i didn't get the print preview window. Is there any requirement of additional parameters or any other. I don't know how to achieve it . Please Guide me.I will be so great full to Our "Techies" for this Timely help. From, M.Thillai

    Read the article

  • Are xlrd and xlwt compatible?

    - by Leo
    I'm trying to create a workbook with python and I need to test the values of different cells to fill it but I'm having some troubles. I use xlrd and xlwt to create and edit the excel file. I've made a little example of my problem and I don't understand why it's not working. import xlwt import xlrd wb = xlwt.Workbook() ws = wb.add_sheet('Test') ws.write(0,0,"ah") cell = ws.cell(0,0) # AttributeError: 'Worksheet' object has no attribute 'cell' print cell.value I had taken for granted that xlrd and xlwt have shared classes which can interact with each other but it doesn't seem to be the case. How do I get the cell value of an open Worksheet object?

    Read the article

  • How to Detect IE Version on Vista and Above

    - by Charles Gargent
    I would like to detect what version IE is running on Vista and above (I am developing on 7). I currently use WMI on XP, but it appears that this is no more. I have searched for an answer and so far I have found the following solutions: Using System.Windows.Forms WebBrowser wb = new WebBrowser; wb.Version; SELECT path,filename,extension,version FROM CIM_DataFile WHERE path="\\Program Files\\Internet Explorer\\" AND filename="iexplore" AND extension="exe" AND version>"8.0" And there is probably a way of looking up in the registry. Is there must a more elegant solution to this?

    Read the article

  • the rmagick manual is quite vague. can you help me by changing a pictures filetype and size?

    - by Joern Akkermann
    Hi, it's about RMagick with Ruby On Rails. I do the following: image = params[:image] # params[:image] is the image from the file-form. name = image.original_filename.scan(/[^\/\\]+/).last name = dir + t.day.to_s + t.month.to_s + t.year.to_s + t.hour.to_s + t.min.to_s + t.sec.to_s + name f = File.new(name, "wb") f.write image f.close image = Magick::Image.read(name) image = image.resize_to_fit(200, 250) f = File.new(name, "wb") f.write image.to_blob f.close Do I really need to first save and then change it? And how about changing not only the size, changing also the Filetype? I want a JPG with 60% quality. Please help me. Yours, Joern.

    Read the article

  • Javascript resizing with window.open and WebBrowser control

    - by Raj
    I'm using WPF WebBrowser control and handling NewWindow3 events using following code: IServiceProvider serviceProvider = (IServiceProvider)webBrowser.Document; Guid serviceGuid = SID_SWebBrowserApp; Guid iid = typeof(SHDocVw.WebBrowser).GUID; SHDocVw.WebBrowser wb = (SHDocVw.WebBrowser)serviceProvider.QueryService(ref serviceGuid, ref iid); wb.NewWindow3 += new SHDocVw.DWebBrowserEvents2_NewWindow3EventHandler(wb_NewWindow3); How to handle javascript resizing when navigating using window.open, something like this: window.open('Sample.htm',null,'height=200,width=400,status=yes,toolbar=no,menubar=no,location=no'); Is there anyway to get height and width requested by caller in NewWindow3 event handler?

    Read the article

  • I can't Open my excel file in c#

    - by Ruben Guico
    Hi, Below is my code, i tried to open my excel file in my c# application but the program give's me an error message "Cannot Access "my excel.xls". But when I specify the file path in my string path variable it works, the problem is I need to get the file path from an openFileDialog. using System; using System.IO; using System.Collections.Generic; using System.Text; using System.Data; using System.Windows.Forms; using System.Data.OleDb; using System.Reflection; using MOIE = Microsoft.Office.Interop.Excel; using OFFICE = Microsoft.Office.Core; namespace EmpUploader { public class ExcelCon { private OleDbDataReader reader = null; private OleDbCommand excelCommand = new OleDbCommand(); private OleDbDataAdapter adapter = new OleDbDataAdapter(); private DataTable excelData = new DataTable(); private MOIE.ApplicationClass objExcel = new MOIE.ApplicationClass(); private MOIE.Workbook wb = null; private string myConn = ""; private string strSQL = ""; private string err = ""; private string path2 = ""; private int sheetCount = 0; private OleDbConnection Con = new OleDbConnection(""); #region "excel interop prarameters" private static object xl_missing = Type.Missing; private static object xl_true = true; private static object xl_false = false; private object xl_update_links = xl_missing; private object xl_read_only = xl_missing; private object xl_format = xl_missing; private object xl_password = xl_missing; private object xl_write_res_password = xl_missing; private object xl_ignore_read_only = xl_missing; private object xl_origin = xl_missing; private object xl_delimiter = xl_missing; private object xl_editable = xl_missing; private object xl_notify = xl_missing; private object xl_converter = xl_missing; private object xl_add_to_mru = xl_missing; private object xl_local = xl_missing; private object xl_corrupt_load = xl_missing; #endregion } //MY CODE FOR OPENING THE EXCEL //note that my file path came from an openfiledialog public void InitializeConnection(string path) { //connection string for excel myConn = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + path + "; Extended Properties =Excel 8.0"; Con.ConnectionString = myConn; Con.Open(); //this is the sample specified path that worked when i test my application //path = @"C:\shinetsu p5 emp list.xls"; objExcel.Visible = false; wb = objExcel.Workbooks.Open(path, xl_update_links, xl_read_only, xl_format, xl_password, xl_write_res_password, xl_ignore_read_only, xl_origin, xl_delimiter, xl_editable, xl_notify, xl_converter, xl_add_to_mru, xl_local, xl_corrupt_load); sheetCount = wb.Worksheets.Count; } }

    Read the article

  • How to use C to write to flash drive bootsector despite error 'Failed to open file to write.:Permiss

    - by updateraj
    My goal is to manipulate the boot-sector in my flashdrive (volume E:) I am using XP. I am able to read the boot-sector FILE *fp_read = fopen("\\\\.\\E:", "rb"); /* Able to proceed to read boot sector */ however i am not able to open the file to write using fopen in 'wb' mode. FILE *fp_read = fopen("\\\\.\\E:", "wb"); /* Unable to proceed due to Failed to open file to write.:Permission Denied */ The flash-drive is not in use at the moment of execution. Hex-editors are able to manipulated boot sector etc, i believe it possible to do so in c. Any suggestion or insight to overcome the access problem so as to be able to write?

    Read the article

  • System.Uri("") in default browser?

    - by Hallgaws
    I am using special program where it loads some url imagine it like window with automatically load www.google.com - program starts and it load the site - BUT when you click on some links in the program window it opens in default browser - how it can be opened in default browser - I am using this code: <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class Form1 Inherits System.Windows.Forms.Form <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub Private components As System.ComponentModel.IContainer <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1)) Me.WB = New System.Windows.Forms.WebBrowser ..... ..... Me.WB.Url = New System.Uri("http://www.google.com/", System.UriKind.Absolute) Using Visual Basic 2008

    Read the article

  • Calling this[int index] via reflection

    - by tkutter
    I try to implement a reflection-based late-bound library to Microsoft Office. The properties and methods of the Offce COM objects are called the following way: Type type = Type.GetTypeFromProgID("Word.Application"); object comObject = Activator.CreateInstance(type); type.InvokeMember(<METHOD NAME>, <BINDING FLAGS>, null, comObject, new object[] { <PARAMS>}); InvokeMember is the only possible way because Type.GetMethod / GetProperty works improperly with the COM objects. Methods and properties can be called using InvokeMember but now I have to solve the following problem: Method in the office-interop wrapper: Excel.Workbooks wb = excel.Workbooks; Excel.Workbook firstWb = wb[0]; respectively foreach(Excel.Workbook w in excel.Workbooks) // doSmth. How can I call the this[int index] operator of Excel.Workbooks via reflection?

    Read the article

  • Installing WindowBuilder on Eclipse 4.2

    - by WChargin
    I'm using Eclipse Juno 4.2, downloaded from here. On previous installs, I've been using 3.7, and I've been using WindowBuilder, which I find very useful. I noticed it wasn't included this time, so I used this update site provided on this page (the zip file download gives a "file unavailable" error). However, when I run the install, it rapidly climbs to 28%, then freezes. After half an hour, I get a very long error that start with this: An error occurred while collecting items to be installed session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). Multiple problems occurred while downloading. Unable to read repository at http://download.eclipse.org/windowbuilder/WB/integration/4.2/plugins/org.eclipse.wb.core_1.5.0.r42x201205291332.jar.pack.gz. (full text) Does anyone know how I can go about installing it?

    Read the article

  • Getting mediafire directlink without using WebBrowser .NET control ?

    - by NVA
    I'm looking for the way to get the direct link from mediafire. By default, when a user visits a download link, he will be presented with a download page where he has to wait for the download to be processed and then a link will appear. I googled and found a VB.NET 2008 solution to this using WebBrowser WB http://www.vbforums.com/showthread.php?t=556681 It works pretty well but I'm tired of pop-up windows and the loading speed. So, I wonder if there is a solution to this problem? (a non WB solution ^^) Any help is greatly appreciated.

    Read the article

  • How can I open another tab in the browser from the Code Behind [duplicate]

    - by Daniel Powell
    This question already has an answer here: Response.Redirect to new window 18 answers I have an ASP.Net project that I am working on that involves opening another tab in the browser from the vb.net (code behind). I have tried to use the WebBrowser control to open the new tab as well as tried to use the Script manager however I have not been able to open the new tab. The button I am using is a custom button in a DevExpress GridView, and I am handling its click with this code: Private Sub ASPxGridView2_CustomButtonCallback(sender As Object, e As DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs) Handles ASPxGridView2.CustomButtonCallback If e.ButtonID <> "customButton" Then Return End If Dim neededID = ASPxGridView2.GetRowValues(e.VisibleIndex, "target") Dim id = CStr(neededID) Dim url = ("targetPage.aspx" + "?ID=" + id) Dim wb As WebBrowser wb.Navigate(url,True) End Sub I'm not sure why this would not work, any suggestions as to how I should open a new browser tab with or without the WebBrowser works for this project. EDIT: I cannot use javascript with this ASPxGridview So I need an answer that doesn't involve modification to the javascript except through the vb.net code behind

    Read the article

  • Resizing Images In a Table Using JavaScript

    - by Abluescarab
    Hey, all. I apologize beforehand if none of this makes sense, or if I sound incompetent... I've been making webpages for a while, but don't know any JavaScript. I am trying to make a webpage for a friend, and he requested if I could write some code to resize the images in the page based on the user's screen resolution. I did some research on this question, and it's kind of similar to this, this, and this. Unfortunately, those articles didn't answer my question entirely because none of the methods described worked. Right now, I have a three-column webpage with 10 images in a table in the left sidebar, and when I use percentages for their sizes, they don't resize right between monitors. As such, I'm trying to write a JavaScript function that changes their sizes after detecting the screen resolution. The code is stripped from my post if I put it all, so I'll just say that each image links to a website and uses a separate image to change color when you hover over it. Would I have to address both images to change their sizes correctly? I use a JavaScript function to switch between them. Anyway, I tried both methods in this article and neither worked for me. If it helps, I'm using Google Chrome, but I'm trying to make this page as cross-browser as possible. Here's the code I have so far in my JavaScript function: function resizeImages() { var w = window.width; var h = window.height; var yuk = document.getElementById('yuk').style; var wb = document.getElementById('wb').style; var tf = document.getElementById('tf').style; var lh = document.getElementById('lh').style; var ko = document.getElementById('ko').style; var gz = document.getElementById('gz').style; var fb = document.getElementById('fb').style; var eg = document.getElementById('eg').style; var dl = document.getElementById('dl').style; var da = document.getElementById('da').style; if (w = "800" && h = "600") { } else if (w = "1024" && h = "768") { } else if (w = "1152" && h = "864") { } else if (w = "1280" && h = "720") { } else if (w = "1280" && h = "768") { } else if (w = "1280" && h = "800") { } else if (w = "1280" && h = "960") { } else if (w = "1280" && h = "1024") { } } Yeah, I don't have much in it because I don't know if I'm doing it right yet. Is this a way I can detect the "width" and "height" properties of a window? The "yuk", "wb", etcetera are the images I'm trying to change the size of. To sum it up: I want to resize images based on screen resolution using JavaScript, but my research attempts have been... futile. I'm sorry if that was long-winded, but thanks ahead of time!

    Read the article

  • Generating cache file for Twitter rss feed

    - by Kerri
    I'm working on a site with a simple php-generated twitter box with user timeline tweets pulled from the user_timeline rss feed, and cached to a local file to cut down on loads, and as backup for when twitter goes down. I based the caching on this: http://snipplr.com/view/8156/twitter-cache/. It all seemed to be working well yesterday, but today I discovered the cache file was blank. Deleting it then loading again generated a fresh file. The code I'm using is below. I've edited it to try to get it to work with what I was already using to display the feed and probably messed something crucial up. The changes I made are the following (and I strongly believe that any of these could be the cause): - Revised the time difference code (the linked example seemed to use a custom function that wasn't included in the code) Removed the "serialize" function from the "fwrites". This is purely because I couldn't figure out how to unserialize once I loaded it in the display code. I truthfully don't understand the role that serialize plays or how it works, so I'm sure I should have kept it in. If that's the case I just need to understand where/how to deserialize in the second part of the code so that it can be parsed. Removed the $rss variable in favor of just loading up the cache file in my original tweet display code. So, here are the relevant parts of the code I used: <?php $feedURL = "http://twitter.com/statuses/user_timeline/#######.rss"; // START CACHING $cache_file = dirname(__FILE__).'/cache/twitter_cache.rss'; // Start with the cache if(file_exists($cache_file)){ $mtime = (strtotime("now") - filemtime($cache_file)); if($mtime > 600) { $cache_rss = file_get_contents('http://twitter.com/statuses/user_timeline/75168146.rss'); $cache_static = fopen($cache_file, 'wb'); fwrite($cache_static, $cache_rss); fclose($cache_static); } echo "<!-- twitter cache generated ".date('Y-m-d h:i:s', filemtime($cache_file))." -->"; } else { $cache_rss = file_get_contents('http://twitter.com/statuses/user_timeline/#######.rss'); $cache_static = fopen($cache_file, 'wb'); fwrite($cache_static, $cache_rss); fclose($cache_static); } //END CACHING //START DISPLAY $doc = new DOMDocument(); $doc->load($cache_file); $arrFeeds = array(); foreach ($doc->getElementsByTagName('item') as $node) { $itemRSS = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue ); array_push($arrFeeds, $itemRSS); } // the rest of the formatting and display code.... } ?> ETA 6/17 Nobody can help…? I'm thinking it has something to do with writing a blank cache file over a good one when twitter is down, because otherwise I imagine that this should be happening every ten minutes when the cache file is overwritten again, but it doesn't happen that frequently. I made the following change to the part where it checks how old the file is to overwrite it: $cache_rss = file_get_contents('http://twitter.com/statuses/user_timeline/75168146.rss'); if($mtime > 600 && $cache_rss != ''){ $cache_static = fopen($cache_file, 'wb'); fwrite($cache_static, $cache_rss); fclose($cache_static); } …so now, it will only write the file if it's over ten minutes old and there's actual content retrieved from the rss page. Do you think this will work?

    Read the article

  • Creating a new workbook in Excel from Python breaks

    - by Marcelo Cantos
    I am trying to use the stock standard win32com approach to drive Excel 2007 from Python. However, when I try to create a new workbook, things go pear-shaped: Python 2.6.4 (r264:75706, Nov 3 2009, 13:23:17) [MSC v.1500 32 bit (Intel)] on win32 ... >>> import win32com.client >>> excel = win32com.client.Dispatch("Excel.Application") >>> wb = excel.Workbooks.Add() Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> wb = excel.Workbooks.Add() File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", line 467, in __getattr__ if self._olerepr_.mapFuncs.has_key(attr): return self._make_method_(attr) File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", line 295, in _make_method_ methodCodeList = self._olerepr_.MakeFuncMethod(self._olerepr_.mapFuncs[name], methodName,0) File "C:\Python26\lib\site-packages\win32com\client\build.py", line 297, in MakeFuncMethod return self.MakeDispatchFuncMethod(entry, name, bMakeClass) File "C:\Python26\lib\site-packages\win32com\client\build.py", line 318, in MakeDispatchFuncMethod s = linePrefix + 'def ' + name + '(self' + BuildCallList(fdesc, names, defNamedOptArg, defNamedNotOptArg, defUnnamedArg, defOutArg) + '):' File "C:\Python26\lib\site-packages\win32com\client\build.py", line 604, in BuildCallList argName = MakePublicAttributeName(argName) File "C:\Python26\lib\site-packages\win32com\client\build.py", line 542, in MakePublicAttributeName return filter( lambda char: char in valid_identifier_chars, className) File "C:\Python26\lib\site-packages\win32com\client\build.py", line 542, in <lambda> return filter( lambda char: char in valid_identifier_chars, className) UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 52: ordinal not in range(128) >>> What is going wrong here? Have I done something silly, or is Python/win32com/Excel somehow broken?

    Read the article

  • How to effectively use WorkbookBeforeClose event correctly?

    - by Ahmad
    On a daily basis, a person needs to check that specific workbooks have been correctly updated with Bloomberg and Reuters market data ie. all data has pulled through and that the 'numbers look correct'. In the past, people were not checking the 'numbers' which led to inaccurate uploads to other systems etc. The idea is that 'something' needs to be developed to prevent the use from closing/saving the workbook unless he/she has checked that the updates are correct/accurate. The numbers look correct action is purely an intuitive exercise, thus will not be coded in any way. The simple solution was to prompt users prior to closing the specific workbook to verify that the data has been checked. Using VSTO SE for Excel 2007, an Add-in was created which hooks into the WorkbookBeforeClose event which is initialised in the add-in ThisAddIn_Startup private void wb_BeforeClose(Xl.Workbook wb, ref bool cancel) { //.... snip ... if (list.Contains(wb.Name)) { DailogResult result = MessageBox.Show("some message", "sometitle", MessageBoxButtons.YesNo); if (result != DialogResult.Yes) { cancel = true; // i think this prevents the whole application from closing } } } I have found the following ThisApplication.WorkbookBeforeSave vs ThisWorkbook.Application.WorkbookBeforeSave which recommends that one should use the ThisApplication.WorkbookBeforeClose event which I think is what I am doing since will span all files opened. The issue I have with the approach is that assuming that I have several files open, some of which are in my list, the event prevents Excel from closing all files sequentially. It now requires each file to be closed individually. Am I using the event correctly and is this effective & efficient use of the event? Should I use the Application level event or document level event? Is there a way to prevent the above behaviour? Any other suggestions are welcomed VS 2005 with VSTO SE

    Read the article

  • python: nonblocking subprocess, check stdout

    - by Will Cavanagh
    Ok so the problem I'm trying to solve is this: I need to run a program with some flags set, check on its progress and report back to a server. So I need my script to avoid blocking while the program executes, but I also need to be able to read the output. Unfortunately, I don't think any of the methods available from Popen will read the output without blocking. I tried the following, which is a bit hack-y (are we allowed to read and write to the same file from two different objects?) import time import subprocess from subprocess import * with open("stdout.txt", "wb") as outf: with open("stderr.txt", "wb") as errf: command = ['Path\\To\\Program.exe', 'para', 'met', 'ers'] p = subprocess.Popen(command, stdout=outf, stderr=errf) isdone = False while not isdone : with open("stdout.txt", "rb") as readoutf: #this feels wrong for line in readoutf: print(line) print("waiting...\\r\\n") if(p.poll() != None) : done = True time.sleep(1) output = p.communicate()[0] print(output) Unfortunately, Popen doesn't seem to write to my file until after the command terminates. Does anyone know of a way to do this? I'm not dedicated to using python, but I do need to send POST requests to a server in the same script, so python seemed like an easier choice than, say, shell scripting. Thanks! Will

    Read the article

  • Django Image Upload: IOErrno2 Could not find path -- and yet it's saving the image there anyway?

    - by Rob
    I have an issue where the local version of django is handling image upload as expected but my server is not. Note: I am using a Django Container on MediaTemple.net (grid server) Here is my code. def view_settings(request): <snip> if request.POST: success_msgs = () mForm = MainProfileForm(request.POST, request.FILES, instance = mProfile) pForm = ChangePasswordForm(request.POST) eForm = ChangeEmailForm(request.POST) if mForm.is_valid(): m = mForm.save(commit = False) if mForm.cleaned_data['avatar']: m.avatar = upload_photo(request.FILES['avatar'], settings.AVATAR_SAVE_LOCATION) m.save() success_msgs += ('profile pictured updated',) <snip> def upload_photo(data,saveLocation): savePath = os.path.join(settings.MEDIA_ROOT, saveLocation, data.name) destination = open(savePath, 'wb+') for chunk in data.chunks(): destination.write(chunk) destination.close() return os.path.join(saveLocation, data.name) Here's where it gets whacky and I was hoping someone could shed a light on this error, because either a) it's the wrong error code, or b) something is happening with the file before it's completely handled. To recap, the file was actually uploaded to the server in the intended directory - and yet this err msg continues to persist. IOError at /user/settings [Errno 2] No such file or directory: u'/home/user66666/domains/example.com/html/media/images/avatars/DSC03852.JPG' Environment: Request Method: POST Request URL: http://111.111.111.111:2011/user/settings Django Version: 1.0.2 final Python Version: 2.4.4 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'ctrlme', 'usertools', 'easy_thumbnails'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware') Traceback: File "/home/user6666/containers/django/leonidas/usertools/views.py" in view_settings m.avatar = upload_photo(request.FILES['avatar'], settings.AVATAR_SAVE_LOCATION) File "/home/user666666/containers/django/leonidas/usertools/functions.py" in upload_photo destination = open(savePath, 'wb+')

    Read the article

  • OpenCL Matrix Multiplication - Getting wrong answer

    - by Yash
    here's a simple OpenCL Matrix Multiplication kernel which is driving me crazy: __kernel void matrixMul( __global int* C, __global int* A, __global int* B, int wA, int wB){ int row = get_global_id(1); //2D Threas ID x int col = get_global_id(0); //2D Threas ID y //Perform dot-product accumulated into value int value; for ( int k = 0; k < wA; k++ ){ value += A[row*wA + k] * B[k*wB+col]; } C[row*wA+col] = value; //Write to the device memory } Where (inputs) A = [72 45 75 61] B = [26 53 46 76] Output I am getting: C = [3942 7236 3312 5472] But the output should be: C = [3943 7236 4756 8611] The problem I am facing here is that for any dimension array the elements of the first row of the resulting matrix is correct. The elements of all the other rows of the resulting matrix is wrong. By the way I am using pyopencl. I don't know what I mistake I am doing here. I have spent the entire day with no luck. Please help me with this

    Read the article

  • megacli forceWB

    - by Pascal den Bekker
    We are using a raid controller: LSI Logic / Symbios Logic MegaRAID SAS 2008 But there is no BBU on Board, is there a way to force the WB Cache ?? I tried following: - /opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp CachedBadBBU -L0 -a0 Failed to set Write Cache OK if bad BBU on Adapter 0, VD 0. FW error description: The requested command has invalid arguments. Can anyone help? Cheers, Pascal

    Read the article

  • Attach radeon driver to specific PCI devices?

    - by genpfault
    I have two Radeon cards in this machine, a 6570 and a 6950: lspci | grep VGA: 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Turks [Radeon HD 6570] 02:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Cayman PRO [Radeon HD 6950] I'm trying to get VGA passthrough to work with KVM on Debian Wheezy, passing through the 6950 as a secondary video card to a Windows 7 guest. This works fine if I blacklist the radeon kernel module via /etc/modprobe.d/. If I remove the blacklist to run X11 (or even just a KMS console) on the 6570 the radeon module seems to attach to both cards: dmesg | egrep "01:00.0|02:00.0|radeon": pci 0000:01:00.0: [1002:6759] type 0 class 0x000300 pci 0000:01:00.0: reg 10: [mem 0xe0000000-0xefffffff 64bit pref] pci 0000:01:00.0: reg 18: [mem 0xf7e20000-0xf7e3ffff 64bit] pci 0000:01:00.0: reg 20: [io 0xe000-0xe0ff] pci 0000:01:00.0: reg 30: [mem 0xf7e00000-0xf7e1ffff pref] pci 0000:01:00.0: supports D1 D2 pci 0000:02:00.0: [1002:6719] type 0 class 0x000300 pci 0000:02:00.0: reg 10: [mem 0xd0000000-0xdfffffff 64bit pref] pci 0000:02:00.0: reg 18: [mem 0xf7d20000-0xf7d3ffff 64bit] pci 0000:02:00.0: reg 20: [io 0xd000-0xd0ff] pci 0000:02:00.0: reg 30: [mem 0xf7d00000-0xf7d1ffff pref] pci 0000:02:00.0: supports D1 D2 vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none vgaarb: device added: PCI:0000:02:00.0,decodes=io+mem,owns=none,locks=none vgaarb: bridge control possible 0000:02:00.0 vgaarb: bridge control possible 0000:01:00.0 pci 0000:01:00.0: Boot video device [drm] radeon kernel modesetting enabled. radeon 0000:01:00.0: setting latency timer to 64 radeon 0000:01:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used) radeon 0000:01:00.0: GTT: 512M 0x0000000040000000 - 0x000000005FFFFFFF [drm] radeon: 1024M of VRAM memory ready [drm] radeon: 512M of GTT memory ready. radeon 0000:01:00.0: irq 46 for MSI/MSI-X radeon 0000:01:00.0: radeon: using MSI. [drm] radeon: irq initialized. radeon 0000:01:00.0: WB enabled [drm] radeon: ib pool ready. [drm] radeon: power management initialized fbcon: radeondrmfb (fb0) is primary device fb0: radeondrmfb frame buffer device [drm] Initialized radeon 2.12.0 20080528 for 0000:01:00.0 on minor 0 radeon 0000:02:00.0: enabling device (0000 -> 0003) radeon 0000:02:00.0: setting latency timer to 64 radeon 0000:02:00.0: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used) radeon 0000:02:00.0: GTT: 512M 0x0000000080000000 - 0x000000009FFFFFFF [drm] radeon: 2048M of VRAM memory ready [drm] radeon: 512M of GTT memory ready. radeon 0000:02:00.0: irq 49 for MSI/MSI-X radeon 0000:02:00.0: radeon: using MSI. [drm] radeon: irq initialized. radeon 0000:02:00.0: WB enabled [drm] radeon: ib pool ready. [drm] radeon: power management initialized fb1: radeondrmfb frame buffer device [drm] Initialized radeon 2.12.0 20080528 for 0000:02:00.0 on minor 1 [drm] radeon: finishing device. radeon 0000:02:00.0: ffff88041a941800 unpin not necessary [drm] radeon: ttm finalized pci-stub 0000:02:00.0: claimed by stub pci-stub 0000:02:00.0: irq 49 for MSI/MSI-X This causes the Win7 VM to bluescreen on boot. How can I configure things so that the radeon module only attaches to the 6570 and not the 6950?

    Read the article

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