Search Results

Search found 533 results on 22 pages for 'variant'.

Page 6/22 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • is Microsoft LC random generator patented?

    - by user396672
    I need a very simple pseudo random generator (no any specific quality requirements) and I found Microsoft's variant of LCG algorithm used for rand() C runtime library function fit my needs (gcc's one seems too complex). I found the algorithm here: http://rosettacode.org/wiki/Linear_congruential_generator#C However, I worry the algorithm (including its "magic numbers" i.e coefficients) may by patented or restricted for use in some another way. Is it allowed to use this algorithm without any licence or patent restrictions or not? I can't use library rand() because I need my results to be exactly reproducible on different platforms

    Read the article

  • le tabnagging: une nouvelle méthode d'attaque par phishing qui se base sur l'utilisation des tabs de

    Mis à jour 29 May 2010: Comme nous pouvions nous y attendre l'équipe travaillant sur le célèbre plugin NoScript vient de mettre à jour à la version 1.9.9.81. La première info de cette mise à jour est la suivante: Citation: Experimental protection against Aviv Raff's scriptless tabnagging variant, by blocking refreshes triggered on unfocused untrusted tabs. See the changelog for more details.

    Read the article

  • Windows Server 2008 in KVM

    - by Joseph
    I've been working on getting a Windows Server 2008 KVM in my linux box running Ubuntu Server 12.04. I've got virt-install and virt-manager installed, got the install up and running via virt-install --connect qemu:///system -n winsvr2008 -r 1024 --vcpus=1 --disk path=/home/pwnd/vm/2008.img,size=30 -c /home/pwnd/en_windows_server_2008_with_sp2_x86_dvd_342333.iso --graphics vnc,listen=192.168.1.127 --noautoconsole --os-type=windows --os-variant=win2k8 --network=bridge:virbr0 --hvm -v and virsh vncdisplay winsvr2008 I can connect and view, but upon starting, I get hung up on please wait right after clicking Install. Any ideas?

    Read the article

  • NoSQL CouchDB Getting Stable with New Release

    <b>Database Journal:</b> "The open source Apache CouchDB database project hit a major milestone this week with the release of version 0.11. The release is an important one for the NoSQL database variant as it matures toward its 1.0 release."

    Read the article

  • Does an LTS desktop get any updates after three years?

    - by Oli
    In cleaning up an answer today, I noted the following: LTS desktops get updates for three years LTS servers get updates for five years An Ubuntu desktop is (essentially) a superset of server packages. So in the fourth and fifth year, if LTS Server gets Kernel updates*, are these also provided for LTS Desktop? What about other core-system stuff? I realise the Kernel is a little special because there is a -server variant but are updates pushed for -generic (et al) too?

    Read the article

  • Week in Geek: Steam Users at Risk from Potential New Security Vulnerability

    - by Asian Angel
    Our latest edition of WIG is filled with news link coverage on topics such as 10 things to do after installing Ubuntu 12.10, the FTC’s offer of a $50,000 cash bounty for technology to help eliminate robocalls, the new malware variant spreading across Skype, and more. Can Dust Actually Damage My Computer? What To Do If You Get a Virus on Your Computer Why Enabling “Do Not Track” Doesn’t Stop You From Being Tracked

    Read the article

  • how to install oracle 10g xe on ubuntu 11.04

    - by ses
    I have read from here how to install oracle 10g xe in ubuntu 10.x but not in 11.04 (64 bit). But with 11.04 it does not work anymore because of dependency exceptions. So, how to install oracle 10g xe in ubuntu 11.04? I even found some variant how to fix it from here but in my case it does not work - the same exception take place: oracle-xe-universal:i386 depends on libc6 (= 2.3.2); however: Package libc6:i386 is not installed.

    Read the article

  • Is Operator Overloading supported in C

    - by caramel23
    Today when I was reading about LCC(windows) compiler I find out it has the implemention for operator overloading . I'm puzzled because after a bit of googling , it has been confirm that operator overloading ain't support in standard C , but I read some people's comment mentioning LCC is ANSI-compliant . So my real question is , is LCC really standard C or it's just like objective-c , a C variant with object-oriented feature ?

    Read the article

  • Windows virtual machince asks for a CD on boot

    - by poorni
    I have a Ubuntu Server 11.04 and I have created three virtual machines on separate PC with: Ubuntu Desktop Windows XP Windows 7 After completing the installation process, when I restart my server or for booting it for next time, Ubuntu desktop boots correctly but both the Windows OSes asks for a CD (that means any Windows OS variant CD), then it starts booting. Can any one resolve this problem?

    Read the article

  • Which of the following is better optimized for search engines, namely, Google? [duplicate]

    - by Carnotaurus
    This question already has an answer here: How should I structure my URLs for both SEO and localization? 7 answers I'm about to configure my routes. Which of the following is better optimized for search engines, namely, Google: a) /pubs/12337/Crown_Inn/Stockport b) /pubs/12337/Crown_Inn_Stockport c) /pubs/12337/Stockport/Crown_Inn d) /pubs/Stockport/Crown_Inn.html e) /Stockport/Crown_Inn.html f) Some other variant

    Read the article

  • Recovering a VHD after resizing it using VBoxManage

    - by tjrobinson
    I am using VirtualBox 4.1.18 and had a virtual machine running Windows 8 RC with a single VHD, which was initially sized at 25GB (too small!). After installing the OS and some applications I ran out of disk space so shut down the guest and then used this command to resize the VHD to 80GB: C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe modifyhd "D:\VirtualBox VMs\Windows 8 RC\Windows 8 RC.vhd" --resize 81920 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe showhdinfo "D:\VirtualBox VMs\Windows 8 RC\Windows 8 RC.vhd" UUID: 03fb26e7-d8bb-49b5-8cc2-1dc350750e64 Accessible: yes Logical size: 81920 MBytes Current size on disk: 24954 MBytes Type: normal (base) Storage format: VHD Format variant: dynamic default In use by VMs: Windows 8 RC (UUID: a6e6aa57-2d3a-421b-8042-7aae566e3e0b) Location: D:\VirtualBox VMs\Windows 8 RC\Windows 8 RC.vhd So far so good. However, when I started the guest up again I got the dreaded: Fatal: No bootable medium found! system halted If I boot into GParted it shows a single 80GB drive as "unallocated". The option to scan for and attempt to repair a filesystem doesn't find anything. I also tried cloning the VHD into a VDI file, just in case that magically fixed it: C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe clonehd "D:\VirtualBox VMs\Windows 8 RC\Windows 8 RC.vhd" "D:\VirtualBox VMs\Windows 8 RC\Windows 8 RC.vdi" --format VDI 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Clone hard disk created in format 'VDI'. UUID: baf0c2c4-362f-4f6c-846a-37bb1ffc027b C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe showhdinfo "D:\VirtualBox VMs\Windows 8 RC\Windows 8 RC.vdi" UUID: baf0c2c4-362f-4f6c-846a-37bb1ffc027b Accessible: yes Logical size: 81920 MBytes Current size on disk: 24798 MBytes Type: normal (base) Storage format: VDI Format variant: dynamic default In use by VMs: Windows 8 RC (UUID: a6e6aa57-2d3a-421b-8042-7aae566e3e0b) Location: D:\VirtualBox VMs\Windows 8 RC\Windows 8 RC.vdi Is there anything else I could try to recover the drive? No, I don't have a backup :( My host OS is Windows 7 64-bit.

    Read the article

  • How can I run Gnome or KDE locally in Cygwin?

    - by John Peter Thompson Garcés
    Apparently it is possible to do this using cygwin ports, as can be seen in screenshots. I followed this how-to to get apt-cygports set up, and I used it to install gnome-session. This how-to supposedly gives the commands needed to run Gnome or KDE, but whenever I try to run Gnome, a blank X-window pops up and then quickly disappears. Here is the terminal output: $ startx /usr/bin/dbus-launch gnome-session xauth: file /home/jpthomps/.serverauth.4168 does not exist Welcome to the XWin X Server Vendor: The Cygwin/X Project Release: 1.10.3.0 OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (WoW64) Package: version 1.10.3-12 built 2011-08-22 XWin was started with the following command line: /usr/bin/X :0 -auth /home/jpthomps/.serverauth.4168 (II) xorg.conf is not supported (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information LoadPreferences: /home/jpthomps/.XWinrc not found LoadPreferences: Loading /etc/X11/system.XWinrc LoadPreferences: Done parsing the configuration file... winDetectSupportedEngines - DirectDraw installed, allowing ShadowDD winDetectSupportedEngines - Windows NT, allowing PrimaryDD winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL winDetectSupportedEngines - Returning, supported engines 0000001f winSetEngine - Using Shadow DirectDraw NonLocking winScreenInit - Using Windows display depth of 32 bits per pixel winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff Screen 0 added at virtual desktop coordinate (0,0). MIT-SHM extension disabled due to lack of kernel support XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel (II) AIGLX: Loaded and initialized /usr/lib/dri/swrast_dri.so (II) GLX: Initialized DRISWRAST GL provider for screen 0 winPointerWarpCursor - Discarding first warp: 637 478 (--) 5 mouse buttons found (--) Setting autorepeat to delay=500, rate=31 (--) Windows keyboard layout: "00000409" (00000409) "US", type 4 (--) Found matching XKB configuration "English (USA)" (--) Model = "pc105" Layout = "us" Variant = "none" Options = "none" Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none" winBlockHandler - pthread_mutex_unlock() winProcEstablishConnection - winInitClipboard returned. winClipboardProc - DISPLAY=:0.0 winClipboardProc - XOpenDisplay () returned and successfully opened the display. xinit: XFree86_VT property unexpectedly has 0 items instead of 1 xinit: connection to X server lost waiting for X server to shut down winClipboardProc - winClipboardFlushWindowsMessageQueue trapped WM_QUIT message, exiting main loop. winClipboardProc - XDestroyWindow succeeded. winClipboardProc - Clipboard disabled - Exit from server winDeinitMultiWindowWM - Noting shutdown in progress

    Read the article

  • VBA nested Loop flow control

    - by PCGIZMO
    I will be brief and stick to what I know. This code for the most part works as it should. The only issue is in the iteration of the x and z loop. these to loops should set the range and yLABEL for the Y loop. I can get through a set and come up with the correct range after that things go bonkers. I know some of it has to do with not breaking out of x to set z and then back to x update the range. It should work z is found then x. the range between them is set for y. then next x but y stays then rang between y and x is set for y.. so on and so forth kinda like a slinky down the stairs. or a slide rule depending on how I set the loops either way I end up all over the place after a couple iterations. I have done a few things but each time I break out of x to set z , X restarts at the top of the range. At least that's what I think I am seeing. In the example sheet i have since changed the way the way the offset works with the loop but the idea is still the same. I have goto statements at this time i was going to try figuring out conditional switches after the loops were working. Any help direction or advice is appreciated. Option Explicit Sub parse() Application.DisplayAlerts = False 'Application.EnableCancelKey = xlDisabled Dim strPath As String, strPathused As String strPath = "C:\clerk plan2" Dim objfso As FileSystemObject, objFolder As Folder, objfile As Object Set objfso = CreateObject("Scripting.FileSystemObject") Set objFolder = objfso.GetFolder(strPath) 'Loop through objWorkBooks For Each objfile In objFolder.Files If objfso.GetExtensionName(objfile.Path) = "xlsx" Then Dim objWorkbook As Workbook Set objWorkbook = Workbooks.Open(objfile.Path) ' Set path for move to at end of script strPathused = "C:\prodplan\used\" & objWorkbook.Name objWorkbook.Worksheets("inbound transfer sheet").Activate objWorkbook.Worksheets("inbound transfer sheet").Cells.UnMerge 'Range management WB Dim SRCwb As Worksheet, SRCrange1 As Range, SRCrange2 As Range, lastrow As Range Set SRCwb = objWorkbook.Worksheets("inbound transfer sheet") Set SRCrange1 = SRCwb.Range("g3:g150") Set SRCrange2 = SRCwb.Range("a1:a150") Dim DSTws As Worksheet Set DSTws = Workbooks("clerkplan2.xlsm").Worksheets("transfer") Dim STR1 As String, STR2 As String, xVAL As String, zVAL As String, xSTR As String, zSTR As String STR1 = "INBOUND TRANS" STR2 = "INBOUND CA TRANS" Dim x As Variant, z As Variant, y As Variant, zxRANGE As Range For Each z In SRCrange2 zSTR = Mid(z, 1, 16) If zSTR <> STR2 Then GoTo zNEXT If zSTR = STR2 Then zVAL = z End If For Each x In SRCrange2 xSTR = Mid(x, 1, 13) If xSTR <> STR1 Then GoTo xNEXT If xSTR = STR1 Then xVAL = x End If Dim yLABEL As String If xVAL = x And zVAL = z Then If x.Row > z.Row Then Set zxRANGE = SRCwb.Range(x.Offset(1, 0).Address & " : " & z.Offset(-1, 0).Address) yLABEL = z.Value Else Set zxRANGE = SRCwb.Range(z.Offset(-1, 0).Address & " : " & x.Offset(1, 0).Address) yLABEL = x.Value End If End If MsgBox zxRANGE.Address ' DEBUG For Each y In zxRANGE If y.Offset(0, 6) = "Temp" Or y.Offset(0, 14) = "Begin Time" Or y.Offset(0, 15) = "End Time" Or _ Len(y.Offset(0, 6)) = 0 Or Len(y.Offset(0, 14)) = 0 Or Len(y.Offset(0, 15)) = "0" Then yNEXT Set lastrow = Workbooks("clerkplan2.xlsm").Worksheets("transfer").Range("c" & DSTws.Rows.Count).End(xlUp).Offset(1, 0) y.Offset(0, 6).Copy lastrow.PasteSpecial Paste:=xlPasteValues, operation:=xlNone, skipblanks:=True, Transpose:=False DSTws.Activate ActiveCell.Offset(0, -1) = objWorkbook.Name ActiveCell.Offset(0, -2) = yLABEL objWorkbook.Activate y.Offset(0, 14).Copy Set lastrow = Workbooks("clerkplan2.xlsm").Worksheets("transfer").Range("d" & DSTws.Rows.Count).End(xlUp).Offset(1, 0) lastrow.PasteSpecial Paste:=xlPasteValues, operation:=xlNone, skipblanks:=True, Transpose:=False objWorkbook.Activate y.Offset(0, 15).Copy Set lastrow = Workbooks("clerkplan2.xlsm").Worksheets("transfer").Range("e" & DSTws.Rows.Count).End(xlUp).Offset(1, 0) lastrow.PasteSpecial Paste:=xlPasteValues, operation:=xlNone, skipblanks:=True, Transpose:=False yNEXT: Next y xNEXT: Next x zNEXT: Next z strPathused = "C:\clerk plan2\used\" & objWorkbook.Name objWorkbook.Close False 'Move proccesed file to new Dir Dim OldFilePath As String Dim NewFilePath As String OldFilePath = objfile 'original file location NewFilePath = strPathused ' new file location Name OldFilePath As NewFilePath ' move the file End If Next End Sub

    Read the article

  • Help Repainting a Line

    - by serhio
    I am doing a custom control (inherited from VisualBasic.PowerPacks.LineShape), that should be painted like as standard one, but also having a Icon displayed near it. So, I just overrided OnPaint like this: protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { e.Graphics.DrawIcon(myIcon, StartPoint.X, StartPoint.Y); base.OnPaint(e); } Now, everything is OK, but when my control moves, the icon still remains drawn on the ancient place. Is there a way to paint it properly? The sample code for tests using Microsoft.VisualBasic.PowerPacks; using System.Windows.Forms; using System.Drawing; namespace LineShapeTest { /// /// Test Form /// public class Form1 : Form { IconLineShape myLine = new IconLineShape(); ShapeContainer shapeContainer1 = new ShapeContainer(); Panel panel1 = new Panel(); public Form1() { this.panel1.Dock = DockStyle.Fill; // load your back image here this.panel1.BackgroundImage = global::WindowsApplication22.Properties.Resources._13820t; this.panel1.Controls.Add(shapeContainer1); this.myLine.StartPoint = new Point(20, 30); this.myLine.EndPoint = new Point(80, 120); this.myLine.Parent = this.shapeContainer1; MouseEventHandler panelMouseMove = new MouseEventHandler(this.panel1_MouseMove); this.panel1.MouseMove += panelMouseMove; this.shapeContainer1.MouseMove += panelMouseMove; this.Controls.Add(panel1); } private void panel1_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { myLine.StartPoint = e.Location; } } } /// /// Test LineShape /// public class IconLineShape : LineShape { Icon myIcon = SystemIcons.Exclamation; protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { e.Graphics.DrawIcon(myIcon, StartPoint.X, StartPoint.Y); base.OnPaint(e); } } } Nota Bene, for the lineShape: Parent = ShapeContainer Parent.Parent = Panel Update 1 TRACES In this variant of OnPaint, we have traces: protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { Graphics g = Parent.Parent.CreateGraphics(); g.DrawIcon(myIcon, StartPoint.X, StartPoint.Y); base.OnPaint(e); } Update 2 BLINKS In this variant of OnPaint, we have a blinking image: protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { Parent.Parent.Invalidate(this.Region, true); Graphics g = Parent.Parent.CreateGraphics(); g.DrawIcon(myIcon, StartPoint.X, StartPoint.Y); base.OnPaint(e); } Update 3: External Invalidation This variant works well, but... from exterior of IconLineShape class: private void panel1_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Region r = myLine.Region; myLine.StartPoint = e.Location; panel1.Invalidate(r); } } /// /// Test LineShape /// public class IconLineShape : LineShape { Icon myIcon = SystemIcons.Exclamation; Graphics parentGraphics; protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { parentGraphics.DrawIcon(myIcon, StartPoint.X, StartPoint.Y); base.OnPaint(e); } protected override void OnParentChanged(System.EventArgs e) { // Parent is a ShapeContainer // Parent.Parent is a Panel parentGraphics = Parent.Parent.CreateGraphics(); base.OnParentChanged(e); } } Even this resolves the problem of the test example, I need this control to be done inside the control, because I can't force the external "clients" of this control do not forget to save the old region and invalidate the parent each time changing a location...

    Read the article

  • Script to reformat XML file

    - by JonS
    Hello all, I am trying to change an XML file from one format to another and have no clue as to how to write a script for it. Can someone help, please? The source file looks like this: <Record> <FieldValue fieldName="rapportage_nihil" fieldValue="false" fieldValueIsNull="false" fieldValueNatural="false"/> <FieldValue fieldName="periode" fieldValue="2009-23-31" fieldValueIsNull="false" fieldValueNatural="2009-10-31 00:23:23"/> <FieldValue fieldName="formulierid" fieldValue="9001HK1V10" fieldValueIsNull="false" fieldValueNatural="9001HK1V10"/> <FieldValue fieldName="versie" fieldValue="1" fieldValueIsNull="false" fieldValueNatural="1"/> <FieldValue fieldName="frequentie" fieldValue="M" fieldValueIsNull="false" fieldValueNatural="M"/> <FieldValue fieldName="variant_type" fieldValue="Landen" fieldValueIsNull="false" fieldValueNatural="Landen"/> <FieldValue fieldName="value" fieldValue="5F" fieldValueIsNull="false" fieldValueNatural="5F"/> <FieldValue fieldName="post_value" fieldValue="0.00" fieldValueIsNull="false" fieldValueNatural="1.037E-4"/> <FieldValue fieldName="cube" fieldValue="c01" fieldValueIsNull="false" fieldValueNatural="c01"/> <FieldValue fieldName="rij" fieldValue="r_24_100_1_000_0" fieldValueIsNull="false" fieldValueNatural="r_24_100_1_000_0"/> <FieldValue fieldName="kolom" fieldValue="c_2250_SPU" fieldValueIsNull="false" fieldValueNatural="c_2250_SPU"/> </Record> <Record> <FieldValue fieldName="rapportage_nihil" fieldValue="false" fieldValueIsNull="false" fieldValueNatural="false"/> <FieldValue fieldName="periode" fieldValue="2009-23-31" fieldValueIsNull="false" fieldValueNatural="2009-10-31 00:23:23"/> <FieldValue fieldName="formulierid" fieldValue="9001HK1V10" fieldValueIsNull="false" fieldValueNatural="9001HK1V10"/> <FieldValue fieldName="versie" fieldValue="1" fieldValueIsNull="false" fieldValueNatural="1"/> <FieldValue fieldName="frequentie" fieldValue="M" fieldValueIsNull="false" fieldValueNatural="M"/> <FieldValue fieldName="variant_type" fieldValue="Landen" fieldValueIsNull="false" fieldValueNatural="Landen"/> <FieldValue fieldName="value" fieldValue="5F" fieldValueIsNull="false" fieldValueNatural="5F"/> <FieldValue fieldName="post_value" fieldValue="0.00" fieldValueIsNull="false" fieldValueNatural="1.037E-4"/> <FieldValue fieldName="cube" fieldValue="c01" fieldValueIsNull="false" fieldValueNatural="c01"/> <FieldValue fieldName="rij" fieldValue="r_24_108_0_000_0" fieldValueIsNull="false" fieldValueNatural="r_24_108_0_000_0"/> <FieldValue fieldName="kolom" fieldValue="c_2250_SPU" fieldValueIsNull="false" fieldValueNatural="c_2250_SPU"/> </Record> <Record> <FieldValue fieldName="rapportage_nihil" fieldValue="false" fieldValueIsNull="false" fieldValueNatural="false"/> <FieldValue fieldName="periode" fieldValue="2009-23-31" fieldValueIsNull="false" fieldValueNatural="2009-10-31 00:23:23"/> <FieldValue fieldName="formulierid" fieldValue="9001HK1V10" fieldValueIsNull="false" fieldValueNatural="9001HK1V10"/> <FieldValue fieldName="versie" fieldValue="1" fieldValueIsNull="false" fieldValueNatural="1"/> <FieldValue fieldName="frequentie" fieldValue="M" fieldValueIsNull="false" fieldValueNatural="M"/> <FieldValue fieldName="variant_type" fieldValue="Landen" fieldValueIsNull="false" fieldValueNatural="Landen"/> <FieldValue fieldName="value" fieldValue="5F" fieldValueIsNull="false" fieldValueNatural="5F"/> <FieldValue fieldName="post_value" fieldValue="0.00" fieldValueIsNull="false" fieldValueNatural="1.6049E-4"/> <FieldValue fieldName="cube" fieldValue="c01" fieldValueIsNull="false" fieldValueNatural="c01"/> <FieldValue fieldName="rij" fieldValue="r_06_000_1_010_0" fieldValueIsNull="false" fieldValueNatural="r_06_000_1_010_0"/> <FieldValue fieldName="kolom" fieldValue="c_2250_SPU" fieldValueIsNull="false" fieldValueNatural="c_2250_SPU"/> </Record> This is the format that I need as a result: <bestand registratienummer="123"> <rapportage nihil="false" periode="2009-23-31" formulierid="9001HK1V10" versie="1" frequentie="M"> <variant type="Landen" value="5F" /> <post value="0.00" cube="c01" rij="r_24_100_1_000_0" kolom="c_2250_SPU" /> </rapportage> <rapportage nihil="false" periode="2009-23-31" formulierid="9001HK1V10" versie="1" frequentie="M"> <variant type="Landen" value="5F" /> <post value="0.00" cube="c01" rij="r_24_108_0_000_0" kolom="c_2250_SPU" /> </rapportage> <rapportage nihil="false" periode="2009-23-31" formulierid="9001HK1V10" versie="1" frequentie="M"> <variant type="Landen" value="5F" /> <post value="0.00" cube="c01" rij="r_06_000_1_010_0" kolom="c_2250_SPU" /> </rapportage> </bestand> Thanks very much!

    Read the article

  • Trouble in ActiveX multi-thread invoke javascript callback routine

    - by code0tt
    everyone. I'm get some trouble in ActiveX programming with ATL. I try to make a activex which can async-download files from http server to local folder and after download it will invoke javascript callback function. My solution: run a thread M to monitor download thread D, when D is finish the job, M is going to terminal themself and invoke IDispatch inferface to call javascript function. **************** THERE IS MY CODE: **************** /* javascript code */ funciton download() { var xfm = new ActiveXObject("XFileMngr.FileManager.1"); xfm.download( 'http://somedomain/somefile','localdev:\\folder\localfile',function(msg){alert(msg);}); } /* C++ code */ // main routine STDMETHODIMP CFileManager::download(BSTR url, BSTR local, VARIANT scriptCallback) { CString csURL(url); CString csLocal(local); CAsyncDownload download; download.Download(this, csURL, csLocal, scriptCallback); return S_OK; } // parts of CAsyncDownload.h typedef struct tagThreadData { CAsyncDownload* pThis; } THREAD_DATA, *LPTHREAD_DATA; class CAsyncDownload : public IBindStatusCallback { private: LPUNKNOWN pcaller; CString csRemoteFile; CString csLocalFile; CComPtr<IDispatch> spCallback; public: void onDone(HRESULT hr); HRESULT Download(LPUNKNOWN caller, CString& csRemote, CString& csLocal, VARIANT callback); static DWORD __stdcall ThreadProc(void* param); }; // parts of CAsyncDownload.cpp void CAsyncDownload::onDone(HRESULT hr) { if(spCallback) { TRACE(TEXT("invoke callback function\n")); CComVariant vParams[1]; vParams[0] = "callback is working!"; DISPPARAMS params = { vParams, NULL, 1, 0 }; HRESULT hr = spCallback->Invoke(0, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &params, NULL, NULL, NULL); if(FAILED(hr)) { CString csBuffer; csBuffer.Format(TEXT("invoke failed, result value: %d \n"),hr); TRACE(csBuffer); }else { TRACE(TEXT("invoke was successful\n")); } } } HRESULT CAsyncDownload::Download(LPUNKNOWN caller, CString& csRemote, CString& csLocal, VARIANT callback) { CoInitializeEx(NULL, COINIT_MULTITHREADED); csRemoteFile = csRemote; csLocalFile = csLocal; pcaller = caller; switch(callback.vt){ case VT_DISPATCH: case VT_VARIANT:{ spCallback = callback.pdispVal; } break; default:{ spCallback = NULL; } } LPTHREAD_DATA pData = new THREAD_DATA; pData->pThis = this; // create monitor thread M HANDLE hThread = CreateThread(NULL, 0, ThreadProc, (void*)(pData), 0, NULL); if(!hThread) { delete pData; return HRESULT_FROM_WIN32(GetLastError()); } WaitForSingleObject(hThread, INFINITE); CloseHandle(hThread); CoUninitialize(); return S_OK; } DWORD __stdcall CAsyncDownload::ThreadProc(void* param) { LPTHREAD_DATA pData = (LPTHREAD_DATA)param; // here, we will create http download thread D // when download job is finish, call onDone method; pData->pThis->onDone(S_OK); delete pData; return 0; } **************** CODE FINISH **************** OK, above is parts of my source code, if I call onDone method in sub-thread, I will get OLE ERROR(-2147418113 (8000FFFF) Catastrophic failure.). Did I miss something? please help me to figure it out.

    Read the article

  • Add Keyboard Input Language to Ubuntu

    - by Matthew Guay
    Want to type in multiple languages in Ubuntu?  Here we’ll show you how you can easily add and switch between multiple keyboard layouts in Ubuntu. Add a Keyboard Language To add a keyboard language, open the System menu, select Preferences, and then select Keyboard. In the Keyboard Preferences dialog, select the Layouts tab, and click Add.   You can select a country and then choose an language and keyboard variant.  Note that some countries, such as the United States, may show several languages.  Once you’ve made your selection, you can preview it on the sample keyboard displayed below the menu. Alternately, on the second tab, select a language and then choose a variant.  Click Add when you’ve made your selection. Now you’ll notice that there are two languages listed in the Keyboard Preferences, and they’re both ready to use immediately.  You can add more if you wish, or close the dialog. Switch Between Languages When you have multiple input languages installed, you’ll notice a new icon in your system tray on the top right.  It will show the abbreviation of the country and/or language name that is currently selected.  Click the icon to change the language. Right-click the dialog to view available languages (listed under Groups), open the Keyboard Preferences dialog again, or show the current layout. If you select Show Current Layout you’ll see a window with the keyboard preview we saw previously when setting the keyboard layout.  You can even print this layout preview out to help you remember a layout if you wish. Change Keyboard Shortcuts to Switch Languages By default, you can switch input languages in Ubuntu from the keyboard by pressing both Alt keys together.  Many users are already used to the default Alt+Switch combination to switch input languages in Windows, and we can add that in Ubuntu.  Open the keyboard preferences dialog, select the Layout tab, and click Options. Click the plus sign beside Key(s) to change layout, and select Alt+Shift.  Click Close, and you can now use this familiar shortcut to switch input languages. The layout options dialog offers many more neat keyboard shortcuts and options.  One especially neat option was the option to use a keyboard led to show when we’re using the alternate keyboard layout.  We selected the ScrollLock light since it’s hardly used today, and now it lights up when we’re using our other input language.   Conclusion Whether you regularly type in multiple languages or only need to enter an occasional character from an alternate keyboard layout, Ubuntu’s keyboard settings make it easy to make your keyboard work the way you want.  And since you can even preview and print a keyboard layout, you can even remember an alternate keyboard’s layout if it’s not printed on your keyboard. Windows users, you’re not left behind, either.  Check out our tutorial on how to Add keyboard languages to XP, Vista, and Windows 7. Similar Articles Productive Geek Tips Add keyboard languages to XP, Vista, and Windows 7Assign a Hotkey to Open a Terminal Window in UbuntuWhat is ctfmon.exe And Why Is It Running?Keyboard Shortcuts for VMware WorkstationInput Director Controls Multiple Windows Machines with One Keyboard and Mouse TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips VMware Workstation 7 Acronis Online Backup DVDFab 6 Revo Uninstaller Pro MELTUP – "The Beginning Of US Currency Crisis And Hyperinflation" Enable or Disable the Task Manager Using TaskMgrED Explorer++ is a Worthy Windows Explorer Alternative Error Goblin Explains Windows Error Codes Twelve must-have Google Chrome plugins Cool Looking Skins for Windows Media Player 12

    Read the article

  • Reading graph inputs for a programming puzzle and then solving it

    - by Vrashabh
    I just took a programming competition question and I absolutely bombed it. I had trouble right at the beginning itself from reading the input set. The question was basically a variant of this puzzle http://codercharts.com/puzzle/evacuation-plan but also had an hour component in the first line(say 3 hours after start of evacuation). It reads like this This puzzle is a tribute to all the people who suffered from the earthquake in Japan. The goal of this puzzle is, given a network of road and locations, to determine the maximum number of people that can be evacuated. The people must be evacuated from evacuation points to rescue points. The list of road and the number of people they can carry per hour is provided. Input Specifications Your program must accept one and only one command line argument: the input file. The input file is formatted as follows: the first line contains 4 integers n r s t n is the number of locations (each location is given by a number from 0 to n-1) r is the number of roads s is the number of locations to be evacuated from (evacuation points) t is the number of locations where people must be evacuated to (rescue points) the second line contains s integers giving the locations of the evacuation points the third line contains t integers giving the locations of the rescue points the r following lines contain to the road definitions. Each road is defined by 3 integers l1 l2 width where l1 and l2 are the locations connected by the road (roads are one-way) and width is the number of people per hour that can fit on the road Now look at the sample input set 5 5 1 2 3 0 3 4 0 1 10 0 2 5 1 2 4 1 3 5 2 4 10 The 3 in the first line is the additional component and is defined as the number of hours since the resuce has started which is 3 in this case. Now my solution was to use Dijisktras algorithm to find the shortest path between each of the rescue and evac nodes. Now my problem started with how to read the input set. I read the first line in python and stored the values in variables. But then I did not know how to store the values of the distance between the nodes and what DS to use and how to input it to say a standard implementation of dijikstras algorithm. So my question is two fold 1.) How do I take the input of such problems? - I have faced this problem in quite a few competitions recently and I hope I can get a simple code snippet or an explanation in java or python to read the data input set in such a way that I can input it as a graph to graph algorithms like dijikstra and floyd/warshall. Also a solution to the above problem would also help. 2.) How to solve this puzzle? My algorithm was: Find shortest path between evac points (in the above example it is 14 from 0 to 3) Multiply it by number of hours to get maximal number of saves Also the answer given for the variant for the input set was 24 which I dont understand. Can someone explain that also. UPDATE: I get how the answer is 14 in the given problem link - it seems to be just the shortest path between node 0 and 3. But with the 3 hour component how is the answer 24 UPDATE I get how it is 24 - its a complete graph traversal at every hour and this is how I solve it Hour 1 Node 0 to Node 1 - 10 people Node 0 to Node 2- 5 people TotalRescueCount=0 Node 1=10 Node 2= 5 Hour 2 Node 1 to Node 3 = 5(Rescued) Node 2 to Node 4 = 5(Rescued) Node 0 to Node 1 = 10 Node 0 to Node 2 = 5 Node 1 to Node 2 = 4 TotalRescueCount = 10 Node 1 = 10 Node 2= 5+4 = 9 Hour 3 Node 1 to Node 3 = 5(Rescued) Node 2 to Node 4 = 5+4 = 9(Rescued) TotalRescueCount = 9+5+10 = 24 It hard enough for this case , for multiple evac and rescue points how in the world would I write a pgm for this ?

    Read the article

  • Word automation - SaveAs

    - by nXqd
    I try to write a simple MFC - Word Automation to save for every 1 minute. I follow this article : http://www.codeproject.com/KB/office/MSOfficeAuto.aspx And this is what Im trying to implement , I'm new to COM so I think there's problem here: my VBA is generated by Word 2010: ActiveDocument.SaveAs2 FileName:="1.docx", FileFormat:=wdFormatXMLDocument _ , LockComments:=False, Password:="", AddToRecentFiles:=True, _ WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _ SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _ False, CompatibilityMode:=14 And my code to implement VBA code above : { COleVariant varName(L"b.docx"); COleVariant varFormat(L"wdFormatXMLDocument"); COleVariant varLockCmt((BYTE)0); COleVariant varPass(L""); COleVariant varReadOnly((BYTE)0); COleVariant varEmbedFont((BYTE)0); COleVariant varSaveNativePicFormat((BYTE)0); COleVariant varForms((BYTE)0); COleVariant varAOCE((BYTE)0); VARIANT x; x.vt = VT_I4; x.lVal = 14; COleVariant varCompability(&x);; VARIANT result; VariantInit(&result); _hr=OLEMethod( DISPATCH_METHOD, &result, pDocApp, L"SaveAs2",10, varName.Detach(),varFormat.Detach(),varLockCmt.Detach(),varPass.Detach(),varReadOnly.Detach(), varEmbedFont.Detach(),varSaveNativePicFormat.Detach(),varForms.Detach(),varAOCE.Detach(),varCompability.Detach() ); } I get no error from this one, but it doesn't work.

    Read the article

  • Code for decoding/encoding a modified base64 URL

    - by Kirk Liemohn
    I want to base64 encode data to put it in a URL and then decode it within my HttpHandler. I have found that Base64 Encoding allows for a '/' character which will mess up my UriTemplate matching. Then I found that there is a concept of a "modified Base64 for URL" from wikipedia: A modified Base64 for URL variant exists, where no padding '=' will be used, and the '+' and '/' characters of standard Base64 are respectively replaced by '-' and '_', so that using URL encoders/decoders is no longer necessary and has no impact on the length of the encoded value, leaving the same encoded form intact for use in relational databases, web forms, and object identifiers in general. Using .NET I want to modify my current code from doing basic base64 encoding and decoding to using the "modified base64 for URL" method. Has anyone done this? To decode, I know it starts out with something like: string base64EncodedText = base64UrlEncodedText.Replace('-', '+').Replace('_', '/'); // Append '=' char(s) if necessary - how best to do this? // My normal base64 decoding now uses encodedText But, I need to potentially add one or two '=' chars to the end which looks a little more complex. My encoding logic should be a little simpler: // Perform normal base64 encoding byte[] encodedBytes = Encoding.UTF8.GetBytes(unencodedText); string base64EncodedText = Convert.ToBase64String(encodedBytes); // Apply URL variant string base64UrlEncodedText = base64EncodedText.Replace("=", String.Empty).Replace('+', '-').Replace('/', '_'); I have seen the Guid to Base64 for URL StackOverflow entry, but that has a known length and therefore they can hardcode the number of equal signs needed at the end.

    Read the article

  • Q on Python serialization/deserialization

    - by neil
    What chances do I have to instantiate, keep and serialize/deserialize to/from binary data Python classes reflecting this pattern (adopted from RFC 2246 [TLS]): enum { apple, orange } VariantTag; struct { uint16 number; opaque string<0..10>; /* variable length */ } V1; struct { uint32 number; opaque string[10]; /* fixed length */ } V2; struct { select (VariantTag) { /* value of selector is implicit */ case apple: V1; /* VariantBody, tag = apple */ case orange: V2; /* VariantBody, tag = orange */ } variant_body; /* optional label on variant */ } VariantRecord; Basically I would have to define a (variant) class VariantRecord, which varies depending on the value of VariantTag. That's not that difficult. The challenge is to find a most generic way to build a class, which serializes/deserializes to and from a byte stream... Pickle, Google protocol buffer, marshal is all not an option. I made little success with having an explicit "def serialize" in my class, but I'm not very happy with it, because it's not generic enough. I hope I could express the problem. My current solution in case VariantTag = apple would look like this, but I don't like it too much import binascii import struct class VariantRecord(object): def __init__(self, number, opaque): self.number = number self.opaque = opaque def serialize(self): out = struct.pack('>HB%ds' % len(self.opaque), self.number, len(self.opaque), self.opaque) return out v = VariantRecord(10, 'Hello') print binascii.hexlify(v.serialize()) >> 000a0548656c6c6f Regards

    Read the article

  • Can FluentNHibernate be used with .Net4?

    - by stiank81
    I have a WPF application running with .Net3.5 using FluentNHibernate, and all works fine. When I upgraded to VS2010 I ran into some odd problems, but after changing to use x64 variant of SQLite it worked fine again. Now I want to change to use .Net4, but this has turned into a more painful experience then I expected.. First I met a problem which required that I set a [SecurityCritical] attribute. Fine - I fixed this. But the reason this was exposed was because an exception was thrown in the first place. And the exception thrown was the following - when calling FluentConfiguration.BuildConfiguration: FluentConfigurationException unhandled An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail The inner exception gives us more information: Message = "Could not create the driver from NHibernate.Driver.SQLite20Driver, NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4." This is what I saw in my own project when moving to VS2010. I have tried changing Fluent to use the x64 variant of SQLite, but this doesn't change anything. Does it sound like it might be related to mixing of 32bit and 64bit assemblies? I see that there are also others that have seen this problem, but I haven't really seen any solution yet. Anyone out there using Fluent with .Net4 and SQLite - on a 64bit machine - successfully? Help! I'm lost...

    Read the article

  • Crash on iOS when system purges memory and closes a UIViewController

    - by Amiramix
    My application is crashing when one of the views is purged from memory because of low-memory condition. At least this is what I understand from the crashlog. It happens on numerous screens but only when opening a Facebook dialog (using the Facebook SDK). Basically, looks like the system sometimes runs out of memory when we need to present a Facebook dialog (e.g. to let user post something on the Facebook timeline). Date/Time: 2012-03-14 19:47:33.819 +0000 OS Version: iPhone OS 5.1 (9B176) Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x30000008 Crashed Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libobjc.A.dylib 0x30f2bf78 objc_msgSend + 16 1 MyApp 0x00003c0e -LTBaseViewController viewDidUnload (LTBaseViewController.m:145) 2 MyApp 0x00004ea2 -LTBaseTableViewController viewDidUnload (LTBaseTableViewController.m:90) 3 UIKit 0x33766bd8 -[UIViewController unloadViewForced:] + 244 4 UIKit 0x338ae492 -[UIViewController purgeMemoryForReason:] + 58 5 Foundation 0x3071a4f8 __57-NSNotificationCenter addObserver:selector:name:object:_block_invoke_0 + 12 6 CoreFoundation 0x30e95540 ___CFXNotificationPost_block_invoke_0 + 64 7 CoreFoundation 0x30e21090 _CFXNotificationPost + 1400 8 Foundation 0x3068e3e4 -NSNotificationCenter postNotificationName:object:userInfo: + 60 9 Foundation 0x3068fc14 -NSNotificationCenter postNotificationName:object: + 24 10 UIKit 0x3387926a -UIApplication _performMemoryWarning + 74 11 UIKit 0x33879364 -UIApplication _receivedMemoryNotification + 168 12 libdispatch.dylib 0x36a12252 _dispatch_source_invoke + 510 13 libdispatch.dylib 0x36a0fb1e _dispatch_queue_invoke$VARIANT$up + 42 14 libdispatch.dylib 0x36a0fe64 _dispatch_main_queue_callback_4CF$VARIANT$up + 152 15 CoreFoundation 0x30e9c2a6 __CFRunLoopRun + 1262 16 CoreFoundation 0x30e1f49e CFRunLoopRunSpecific + 294 17 CoreFoundation 0x30e1f366 CFRunLoopRunInMode + 98 18 GraphicsServices 0x33fb6432 GSEventRunModal + 130 19 UIKit 0x336f5e76 UIApplicationMain + 1074 20 MyApp 0x00004818 main (main.m:16) 21 MyApp 0x000023b4 0x1000 + 5044 I checked and there are almost no memory leaks, e.g. when testing the app for an hour the total memory leaked was around 2-3Kb caused by some string-copying libraries. So I don't believe this is caused by the application. I guess that when the phone is not restarted for some time there are applications running in the background and when using Facebook SDK the memory becomes a problem and the system tries to recover the memory from random applications, including my application. My question is, how can I prevent this crash from happening? How should I handle unloadViewForced on a view controller to make the app more robust in low-memory conditions? And lastly, am I right that this crashlog suggests the crash occurred because the system tried to free memory and my application didn't handle it properly? Any help greatly appreciated.

    Read the article

  • Using FluentNHibernate with .Net4

    - by stiank81
    I have a WPF application running with .Net3.5 using FluentNHibernate, and all works fine. When I upgraded to VS2010 I ran into some odd problems, but after changing to use x64 variant of SQLite it worked fine again. Now I want to change to use .Net4, but this has turned into a more painful experience then I expected.. First I met a problem which required that I set a [SecurityCritical] attribute. Fine - I fixed this. But the reason this was exposed was because an exception was thrown in the first place. And the exception thrown was the following - when calling FluentConfiguration.BuildConfiguration: FluentConfigurationException unhandled An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail The inner exception gives us more information: Message = "Could not create the driver from NHibernate.Driver.SQLite20Driver, NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4." This is what I saw in my own project when moving to VS2010. I have tried changing Fluent to use the x64 variant of SQLite, but this doesn't change anything. Does it sound like it might be related to mixing of 32bit and 64bit assemblies? I see that there are also others that have seen this problem, but I haven't really seen any solution yet. Anyone out there using Fluent with .Net4 and SQLite - on a 64bit machine - successfully? Help! I'm lost...

    Read the article

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