Search Results

Search found 68 results on 3 pages for 'kio dane'.

Page 3/3 | < Previous Page | 1 2 3 

  • How to implement a private virtual function within derived classes?

    - by Dane
    Hi, I know why I want to use private virtual functions, but how exactly can I implement them? For example: class Base{ [...] private: virtual void func() = 0; [...] } class Derived1: puplic Base{ void func() { //short implementation is ok here } } class Derived2: puplic Base{ void func(); //long implementation elsewhere (in cpp file) } [...] void Derived2::func() { //long implementation } The first version is ok but not always possible. Isn't the second version simply name hiding? How do you define the Base::func() of Derived2, if you cannot do it within the class declaration of Dereived2? Thanks

    Read the article

  • Is there a method to retrieve the file name of a class?

    - by Dran Dane
    Hello Is there a method to retrieve the file name of a class? Specifically I would like to create a static method (CreateLink) in a base class (BasePage) to automatically return the path and filename of the page called. I code in .C# ASP.NET private const string TEMPLATE = "~/One.aspx"; public static HyperLink CreateLink() { HyperLink link = new HyperLink(); link.Text = "Click here"; link.NavigateUrl = String.Format(TEMPLATE); return link; } Is it possible to avoid the use of TEMPLATE hardcoded variable? Is it possible to retrieve the One.aspx path from file name and location?

    Read the article

  • Permanent links format in wordpress: How to Choose?

    - by BrownAndFriendly
    n wordpress, I have the option to choose how the permanent URL looks like. The common format is Year/Month/Day or Year/Month for blogs. However, I’ve occasionally seen some successful blogs take the date out: such as http://mixergy.com/dane-maxwell-zannee-interview/ What’s the impact of the above format on SEO? Obviously, it’s more pleasant on the eye but does it negatively impact search ranking? Thank you

    Read the article

  • Sudo apt-get update -f does not work?

    - by BrianO09
    I am a bit of a noob with Linux. Several months ago I updated to Ubuntu 12.04, then stopped using Ubuntu for a while for a variety of reasons. Now I would like to go back to it, but I have a couple of problems. For one thing, the Software Center will simply not load. I click on the icon, the program comes up, but it never loads, and when I close it I get a "window not responding" message. While reading some threads to fix this issue, the common theme was that the main solution was to update by running: sudo apt-get install --reinstall software-center However, when I run that, I get the following (long): bcoleary@ubuntu:~$ sudo apt-get install --reinstall software-center [sudo] password for bcoleary: Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: kdelibs-bin : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkjsapi4 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed kdelibs5-plugins : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkjsapi4 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkntlm4 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed kdoctools : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkcmutils4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkde3support4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkpty4 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkdeclarative5 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkdewebkit5 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkdnssd4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkemoticons4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkfile4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkhtml5 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkjsapi4 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkidletime4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkio5 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkjsembed4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkjsapi4 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkmediaplayer4 : Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libknewstuff3-4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libknotifyconfig4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkparts4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libkrosscore4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libktexteditor4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libnepomuk4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libnepomukquery4a : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libnepomukutils4 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed libplasma3 : Depends: libkdecore5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libkdeui5 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed Depends: libthreadweaver4 (= 4:4.8.3-0ubuntu0.1) but 4:4.8.5-0ubuntu0.1 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). So the next thing I tried was: sudo apt-get -f install The following has been cut down, but you get the idea: Errors were encountered while processing: libkdeclarative5 libkcmutils4 libnepomuk4 libkio5 libnepomukquery4a libnepomukutils4 libkparts4 libkdewebkit5 libkdnssd4 libknewstuff3-4 libplasma3 libnepomuksync4 libkemoticons4 libkfile4 libktexteditor4 libkhtml5 libkidletime4 libkmediaplayer4 libknotifyconfig4 libnepomukdatamanagement4 libkde3support4 libkjsembed4 libkrosscore4 kdoctools kdelibs-bin libkatepartinterfaces4 katepart kdelibs5-plugins plasma-scriptengine-javascript kde-runtime amarok libkdcraw20 libkgeomap1 libkipi8 libkvkontakte1 kipi-plugins digikam libkonq-common libkonq5abi1 dolphin kde-baseapps-bin kdebase-runtime libkcddb4 kdemultimedia-kio-plugins kdepimlibs-kio-plugins libkonqsidebarplugin4a konqueror konqueror-nsplugins libakonadi-kde4 libakonadi-calendar4 libkabc4 Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1) Basically it said a ton of stuff was missing. Maybe this happened when I upgraded, I am not sure. Is there a way to fix this? And if not what is the best way to un-install and re-install Ubuntu? It is currently dual-booted with Windows 7. If you need anymore info, please let me know. Thank you for helping a beginner! :)

    Read the article

  • How to automatically mount hibernated NTFS to read-only?

    - by Piotr
    Is there any way to set up Ubuntu this way: If I can't mount the filesystem in rw mode, then mount it in ro mode in the same directory. In result I should not come across the notification that the system can't mount the filesystem (Skip or manual fix notification). SO when I start the system I should have my ntfs partitions mounted either in rw or ro mode depends if the windows is hibernated. fstab entry: #/dev/sda7 UUID=D0B43178B43161E0 /media/Dane ntfs defaults,errors=remount-ro 0 1 "mount -a" result: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda7': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option. I have ubuntu 13.10 and win8. I use uefi secure boot.

    Read the article

  • Generate money type fields using code first EF CTP5

    - by BBHorus
    In this blog post: EF4 Code First Control Unicode and Decimal Precision, Scale with Attributes, Dane Morgridge used attributes to control the creation of different types on your database. ...And I found this pretty unique BTW!!! How do I generate money type fields in my resulting database using code first API of EF CTP5, if is possible to do it from your model, using conventions or attributes? Sorry about my English is not my main language. Thanks in advance.

    Read the article

  • GTA 4 crashes (WIN7 64-bit)

    - by Damian
    Hi! I got those two errors when I'm trying to run GTA4: Opis: Critical runtime problem Podpis problemu: Nazwa zdarzenia problemu: APPLICATION CRASH System RAM: -1 Available RAM: -532590592 Number of CPUs: 4 Video Card Manufacturer: NVIDIA Video Card Description: NVIDIA GeForce 9800 GT Video Card Driver Version: 8.17.0012.5919 Wersja systemu operacyjnego: 6.1.7600.2.0.0.256.1 Identyfikator ustawien regionalnych: 1045 And the second error: Podpis problemu: Nazwa zdarzenia problemu: BEX Nazwa aplikacji: GTAIV.exe Wersja aplikacji: 1.0.7.0 Sygnatura czasowa aplikacji: 4bd9efbe Nazwa modulu z bledem: StackHash_fea7 Wersja modulu z bledem: 0.0.0.0 Sygnatura czasowa modulu z bledem: 00000000 Przesuniecie wyjatku: 0000b513 Kod wyjatku: c0000005 Dane wyjatku: 00000008 Wersja systemu operacyjnego: 6.1.7600.2.0.0.256.1 Identyfikator ustawien regionalnych: 1045 Dodatkowe informacje 1: fea7 Dodatkowe informacje 2: fea78afc140967119290cc27385e0510 Dodatkowe informacje 3: 20ce Dodatkowe informacje 4: 20ce3e492a2aa7e5b8cfe9b7b1f05b42 My PC spec: Proc: Intel i5 (4x2,66ghz) ;RAM: 8GB DDR3 1066mhz ;Graphics: ASUS EN9800GT/DI/1GD3 ;OS: WINDOWS 7 64-bit I think it should work well on my PC, I couldn't find the solution to get it working so I hope You can help me. P.S. Sorry for my English - I'm from Poland.

    Read the article

  • Cloning a USB flash drive to another larger one, is it safe to do so?

    - by Rob Kam
    I used Acronis True Image Home 2010 to clone a Dane-Elec zLight 8Gb pen drive/USB flash drive to a PNY Attaché 16Gb USB flash drive. Now WinXP shows the drive in device manager as USB DISK 2.0 USB DEVICE but doesn't have it in My Computer/doesn't assign it a drive letter. What is it that has messed up the PNY Attaché and is there some way to repair it so that it can be used as a regular USB flash drive again? Is there a safe way to clone a USB flash drive to another larger one? How safe is it to backup and restore a USB flash drive to/from a drive-image?

    Read the article

  • SQLBeat Podcast – Episode 4 – Mark Rasmussen on Machine Guns,Jelly Fish and SQL Storage Engine

    - by SQLBeat
    In this this 4th SQLBeat Podcast I talk with fellow Dane Mark Rasmussen on SQL, machine guns and jelly fish fights; apparently they are common in our homeland. Who am I kidding, I am not Danish, but I try to be in this podcast. Also, we exchange knowledge on SQL Server storage engine particulars as well as some other “internals” like password hashes and contained databases. And then it just gets weird and awesome. There is lots of background noise from people who did not realize we were recording. And I call them out and make fun of them as they deserve; well just one person who is well known in these parts. I also learn the correct (almost) pronunciation of “fjord”. Seriously, a word with an “F” followed by a “J”. And there are always the hippies and hipsters to discuss. Should be fun.

    Read the article

  • How can I dereference a hashref constant?

    - by makenai
    Let's say I have a hashref constant like the following: use constant DOGS => { Lassie => 'collie', Benji => 'mutt', Scooby => 'great dane', Goofy => '???' }; How can I dereference it properly to get say.. they keys out of it? warn ref DOGS; # HASH at untitled line 12. warn keys( %{DOGS} ); # Warning: something's wrong (empty list) warn keys( DOGS ); # Type of arg 1 to keys must be hash (not constant item) The following is the only way I can seem to make it work: my $dogs = DOGS; warn keys( %$dogs ); # LassieBenjiGoofyScooby at untitled line 15. What am I doing wrong?

    Read the article

  • How to dereference a hashref constant?

    - by makenai
    Let's say I have a hashref constant like the following: use constant DOGS => { Lassie => 'collie', Benji => 'mutt', Scooby => 'great dane', Goofy => '???' }; How can I dereference it properly to get say.. they keys out of it? warn ref DOGS; # HASH at untitled line 12. warn keys( %{DOGS} ); # Warning: something's wrong (empty list) warn keys( DOGS ); # Type of arg 1 to keys must be hash (not constant item) The following is the only way I can seem to make it work: my $dogs = DOGS; warn keys( %$dogs ); # LassieBenjiGoofyScooby at untitled line 15. What am I doing wrong?

    Read the article

  • How to install iodbc in Ubuntu 12.10

    - by Hanynowsky
    I need to install the library iodbc (depends on libodbc2) in my Quantal machine. Yet there is creepy dependency problem. This was replaced somehow by unixodbc which I don't have, installed. Here is what I get when I try to install : sudo apt-get install libiodbc2-dev Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libiodbc2-dev : Depends: libiodbc2 (= 3.52.7-2build2) but it is not going to be installed Depends: iodbc (= 3.52.7-2build2) but it is not going to be installed E: Unable to correct problems, you have held broken packages. I can tell that iodbc conflicts with odbcinst. Yet, I cannot remove it due to the following: sudo apt-get remove odbcinst Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: akonadi-backend-mysql calligra-l10n-engb kde-l10n-engb kdevelop-l10n kdevelop-php-docs-l10n kdevelop-php-l10n libakonadi-kabc4 libakonadi-notes4 libakonadiprotocolinternals1 libboost-thread1.49.0 libdmtx0a libgpgme++2 libkcalcore4 libkdgantt2 libkholidays4 libkimap4 libkldap4 libkmbox4 libkmime4 libkolabxml0 libkpgp4 libkresources4 libksieve4 libprison0 libqgpgme1 libqrencode3 libxerces-c3.1 Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: akonadi-server k3b k3b-i18n katepart kde-runtime kdelibs-bin kdelibs5-plugins kdepim-runtime kdepim-strigi-plugins kdepimlibs-kio-plugins kdoctools kget kmag kmail kmix kmousetool ksystemlog kubuntu-debug-installer language-pack-kde-ar language-pack-kde-en libakonadi-calendar4 libakonadi-contact4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 libcalendarsupport4 libincidenceeditorsng4 libk3b6 libkabc4 libkactivities-bin libkactivities6 libkalarmcal2 libkatepartinterfaces4 libkcal4 libkcalutils4 libkcddb4 libkde3support4 libkdepim4 libkdepimdbusinterfaces4 libkdewebkit5 libkemoticons4 libkfile4 libkgapi0 libkhtml5 libkio5 libkleo4 libkmanagesieve4 libkmediaplayer4 libknewstuff3-4 libknotifyconfig4 libkolab0 libkonq-common libkonq5abi1 libkontactinterface4 libkparts4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libksieveui4 libktexteditor4 libktnef4 libktorrent4 libkworkspace4abi2 libkxmlrpcclient4 libmailcommon4 libmailimporter4 libmailtransport4 libmessagecomposer4 libmessagecore4 libmessagelist4 libmessageviewer4 libmicroblog4 libnepomuk4 libnepomukcore4abi1 libnepomukquery4a libnepomuksync4 libnepomukutils4 libplasma3 libsoprano4 libtemplateparser4 libvirtodbc0 nepomuk-core odbcinst odbcinst1debian2 plasma-scriptengine-javascript qapt-batch soprano-daemon virtuoso-minimal 0 upgraded, 0 newly installed, 89 to remove and 0 not upgraded. After this operation, 126 MB disk space will be freed. Do you want to continue [Y/n]? Other info: Why do the "iodbc" and "libmyodbc" packages conflict with each other? The root problem is that I need to use a new feature introduced in the latest MySQL Workbench builds (DB Migration) which uses odbc for that matter. Here is what Mysql doc says about it : Linux The Migration Wizard uses iODBC as a driver manager for all of its ODBC connections in Linux. This may give you some troubles because most Linux distributions provide ODBC drivers compiled against unixODBC. This is another driver manager not supported by MySQL Workbench so you won’t be able to use those drivers unless you compile them against iODBC. Here’s what you should do. Make sure that you have iODBC installed. If you are using Debian, Ubuntu or another Debian based distro, type this command in your terminal: $ sudo apt-get install iodbc libiodbc2-dev libpq-dev libssl-dev For RPM based distros (RedHat, Fedora, etc.) type this command instead of the previous one: $ sudo yum install iodbc iodbc-dev libpqxx-devel openssl-devel Now we need to install the PostgreSQL ODBC drivers. Download the psqlODBC source tarball from here. Use the latest version available for download. As of this writing the latest version corresponds to the file psqlodbc-09.01.0200.tar.gz. Extract this tarball to a directory in your hard drive and open a terminal and cd into that directory. Type this in the terminal window: $ ./configure --with-iodbc --enable-pthreads $ make $ sudo make install Verify that you have the file psqlodbcw.so in the /usr/local/lib directory. This package seems to pose the problem probably: dpkg -s odbcinst1debian2 Package: odbcinst1debian2 Status: install ok installed Priority: optional Section: libs Installed-Size: 241 Maintainer: Ubuntu Developers <[email protected]> Architecture: amd64 Multi-Arch: same Source: unixodbc Version: 2.2.14p2-5ubuntu4 Replaces: unixodbc (<< 2.1.1-2) Depends: libc6 (>= 2.14), libltdl7 (>= 2.4.2), odbcinst Pre-Depends: multiarch-support Breaks: libiodbc2, libmyodbc (<< 5.1.6-2), odbc-postgresql (<< 1:09.00.0310-1.1), tdsodbc (<< 0.82-8) Conflicts: odbcinst1, odbcinst1debian1 Description: Support library for accessing odbc ini files This package contains the libodbcinst library from unixodbc, a library used by ODBC drivers for reading their configuration settings from /etc/odbc.ini and ~/.odbc.ini. . Also contained in this package are the driver setup plugins, which describe the features supported by individual ODBC drivers. Homepage: http://www.unixodbc.org/ Original-Maintainer: Steve Langasek <[email protected]> I have no broken packages:

    Read the article

  • Win XP error 0x80041003 using GetObject/winmgmts

    - by John Lewis
    My computer is called "neil" and I want to set some values using WMI in vbScript. I adapetd the script below from one supplied by Microsoft. When I run it in my browser I get Error Type: (0x80041003) /dressage/30/pdf2.asp, line 8 I suspect it is some registry/security setting. Any advice? John Lewis FULL SCRIPT call Print_HTML_Page("http://neil/dressage/ascii.asp", "ascii") Sub SetPDFFile(strPDFFile) Const HKEY_LOCAL_MACHINE = &H80000002 strKeyPath = "SOFTWARE\Dane Prairie Systems\Win2PDF" strComputer = "." Set objReg=GetObject( _ "winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv") strValueName = "PDFFileName" objReg.SetExpandedStringValue HKEY_LOCAL_MACHINE,_ strKeyPath,strValueName,strPDFFile End Sub Sub Print_HTML_Page(strPathToPage, strPDFFile) SetPDFFile( strPDFFile ) Set objIE = CreateObject("InternetExplorer.Application") 'From http://www.tek-tips.com/viewthread.cfm?qid=1092473&page=5 On Error Resume Next strPrintStatus = objIE.QueryStatusWB(6) If Err.Number 0 Then MsgBox "Cannot find a printer. Operation aborted." objIE.Quit Set objIE = Nothing Exit Sub End If With objIE .visible=0 .left=200 .top=200 .height=400 .width=400 .menubar=0 .toolbar=1 .statusBar=0 .navigate strPathToPage End With 'Wait until IE has finished loading Do while objIE.busy WScript.Sleep 100 Loop On Error Goto 0 objIE.ExecWB 6,2 'Wait until IE has finished printing WScript.Sleep 2000 objIE.Quit Set objIE = Nothing End Sub

    Read the article

  • using jquery $.ajax to retrieve data and push data into javascript array through the success functio

    - by teamdane
    Hello All, I have a function that I'm trying to retrieve values using $.ajax and push the returned data into an array called output. Problem is the success function will not allow me to push the results into the array. see below for code. var getValues = function(el) { var value = ($(el).val()); if(value == '' || $(el).attr('disabled')) { return []; } var string = 'value=' + value; var output = []; $.ajax({ type: "GET", url: 'shocklookup_callback.php', dataType: "string", data: string, success: function(data) { } }); //output.push({ text : value + 'test', value : value + 'test1'} ); return output; }; Any ideas of what I can put in the success function to be able to push the data into the output array? Also I need to be able to return the output array to the original function getValues. If this doesn't' make a whole lot of sense please let me know and I'll try to explain better. Thanks, Dane

    Read the article

  • Win XP error 0x80041003 using GetObject/winmgmts

    - by John Lewis
    My computer is called "neil" and I want to set some values using WMI in vbScript. I adapetd the script below from one supplied by Microsoft. When I run it in my browser I get Error Type: (0x80041003) /dressage/30/pdf2.asp, line 8 I suspect it is some registry/security setting. Any advice? John Lewis FULL SCRIPT call Print_HTML_Page("http://neil/dressage/ascii.asp", "ascii") Sub SetPDFFile(strPDFFile) Const HKEY_LOCAL_MACHINE = &H80000002 strKeyPath = "SOFTWARE\Dane Prairie Systems\Win2PDF" strComputer = "." Set objReg=GetObject( _ "winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv") strValueName = "PDFFileName" objReg.SetExpandedStringValue HKEY_LOCAL_MACHINE,_ strKeyPath,strValueName,strPDFFile End Sub Sub Print_HTML_Page(strPathToPage, strPDFFile) SetPDFFile( strPDFFile ) Set objIE = CreateObject("InternetExplorer.Application") 'From http://www.tek-tips.com/viewthread.cfm?qid=1092473&page=5 On Error Resume Next strPrintStatus = objIE.QueryStatusWB(6) If Err.Number 0 Then MsgBox "Cannot find a printer. Operation aborted." objIE.Quit Set objIE = Nothing Exit Sub End If With objIE .visible=0 .left=200 .top=200 .height=400 .width=400 .menubar=0 .toolbar=1 .statusBar=0 .navigate strPathToPage End With 'Wait until IE has finished loading Do while objIE.busy WScript.Sleep 100 Loop On Error Goto 0 objIE.ExecWB 6,2 'Wait until IE has finished printing WScript.Sleep 2000 objIE.Quit Set objIE = Nothing End Sub Update: Thanks for your reply. The line breaks seem to have been introduced in the process of paasting into this form. Well spotted - I was using a PDF file name "ascii". I added a .pdf extension but still get the error. I suspect you're right that it's to do with admin rights. Here's more about the setup and what I'm trying to achieve. Win2pdf is a product for writing PDFs by works by simulating a Windows printer. You "print" the page, select win2pdf in the print dialog and it then asks for a file name. I have it installed on my pc (called Neil) and it works fine in this conventional way. My aim is to write an html page to a PDF file using win2pdf - but via ASP/vbscript/javascript rather than with manual intervention. The script for doing this was provided by win2PDF's tech support but when it did not work, that was the limit of their understanding. In the sample script the file ascii.asp just produces a table of ascii codes/characters. The URL given is on my own PC which has IIS set up to run scripts which it does fine. The error I get occurs on about the fourth line executed. I am logged in with full admin rights - I think! But I'm no expert. I hope this helps to give some more specific suggestions about how to check/fix the admin rights.

    Read the article

  • simplejson double escapes data causing invalid JSON string

    - by mike_hornbeck
    I have a simple form for managing manufacturers in my shop. After posting form, ajax call returns json with updated data to the form. Problem is, that the returned string is invalid. It looks like it was double-escaped. Strangely similar approach across the whole shop works without any problems. I'm also using jquery 1.6 as javascript framework. Model contains of 3 fields : char for name, text for description and image field for manufacturer logo. The function : def update_data(request, manufacturer_id): """Updates data of manufacturer with given manufacturer id. """ manufacturer = Manufacturer.objects.get(pk=manufacturer_id) form = ManufacturerDataForm(request.FILES, request.POST, instance=manufacturer) if form.is_valid(): form.save() msg = _(u"Manufacturer data has been saved.") html = [ ["#data", manufacturer_data_inline(request, manufacturer_id, form)], ["#selectable-factories-inline", selectable_manufacturers_inline(request, manufacturer_id)], ] result = simplejson.dumps({ "html": html }, cls=LazyEncoder) return HttpResponse(result) The error in console : error with invalid JSON : uncaught exception: Invalid JSON: {"html": [["#data", "\n<h2>Dane</h2>\n<div class="\&quot;manufacturer-image\&quot;">\n \n</div>\n<form action="\&quot;/manage/update-manufacturer-data/1\&quot;" method="\&quot;post\&quot;">\n \n <div class="\&quot;field\&quot;">\n <div class="\&quot;label\&quot;">\n <label for="\&quot;id_name\&quot;">Nazwa</label>:\n </div>\n \n \n <div class="\&quot;error\&quot;">\n <input id="\&quot;id_name\&quot;" name="\&quot;name\&quot;" maxlength="\&quot;50\&quot;" type="\&quot;text\&quot;">\n <ul class="\&quot;errorlist\&quot;"><li>Pole wymagane</li></ul>\n </div>\n \n </div>\n\n <div class="\&quot;field\&quot;">\n <div class="\&quot;label\&quot;">\n <label for="\&quot;id_image\&quot;">Zdjecie</label>:\n </div>\n \n \n <div>\n <input name="\&quot;image\&quot;" id="\&quot;id_image\&quot;" type="\&quot;file\&quot;">\n </div>\n \n </div>\n\n <div class="\&quot;field\&quot;">\n <div class="\&quot;label\&quot;">\n <label for="\&quot;id_description\&quot;">Opis</label>:\n </div>\n \n \n <div>\n <textarea id="\&quot;id_description\&quot;" rows="\&quot;10\&quot;" cols="\&quot;40\&quot;" name="\&quot;description\&quot;"></textarea>\n </div>\n \n </div>\n \n <div class="\&quot;buttons\&quot;">\n <input class="\&quot;ajax-save-button" button\"="" type="\&quot;submit\&quot;">\n </div>\n</form>"], ["#selectable-factories-inline", "\n <div>\n <a class="\&quot;selectable" selected\"\n="" href="%5C%22/manage/manufacturer/1%5C%22">\n L1\n </a>\n </div>\n\n <div>\n <a class="\&quot;selectable" \"\n="" href="%5C%22/manage/manufacturer/4%5C%22">\n KR3W\n </a>\n </div>\n\n <div>\n <a class="\&quot;selectable" \"\n="" href="%5C%22/manage/manufacturer/3%5C%22">\n L1TA\n </a>\n </div>\n\n"]]} Any ideas ?

    Read the article

< Previous Page | 1 2 3