w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Regasm in code (dynamic register)
You can to use the /regfile command line option to regasm, then execute the generated .reg file. I prefer using reg.exe import "%s" instead of regedit.exe, since it will avoid a popup. Or you can write your own .reg parser and update the registry, but it may be overcomplicated. Ensure every "CodeBase"="file://...." entry will be changed to expected (network) folder containing the COM .dll wrapper.

Categories : C#

Register DLL with regasm from VBA with shell command
Well I just ended up working around the quirk I mention in the question. I had to move the initialize into a different method so that it is not called within the same action as the regasm. This seems to work well. I haven't had any trouble with it yet.

Categories : Dotnet

Regasm not working on dll
The entry in your registry should looks like this: HKEY_CLASSES_ROOT jxe_auto_file DefaultIcon: (Default) (Path to icon) I'm pretty sure there was no "DefaultIcon" in your jxe_auto_file entry

Categories : C#

RegAsm.exe not exporting EXCEPINFO structure
It is just like it says, the ComTypes.EXCEPINFO structure doesn't have the [ComVisible(true)] attribute. This was intentional. Note that this is only a warning, not an error. It was intentional because the type library you create from your [ComVisible] C# code will always include stdole2.tlb. Which is a standard type library that declares all the common Automation types, like IDispatch and the structures it uses. This is something you can see with Oleview.exe. Run it from the Visual Studio Command Prompt, use File + View Typelib and select your type library. Use Tlbexp.exe if you don't have it yet. You'll see the IDL that was decompiled from the type library, it has this near the top: // TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046} importlib("stdole

Categories : C#

.Net DLL registered via RegAsm loads even if the DLL is renamed. How come?
Not knowing the Regasm.exe command line you used makes this a guess, a bit unnecessary. That you didn't know it mattered is surely already a good explanation why you didn't expect the test outcome. A simple explanation is that they just renamed the wrong DLL. Regasm.exe strongly favors you also installing the assembly in the GAC and complains loudly when you don't and use /codebase. It is a good idea, DLL Hell is a pretty big problem in COM if the client doesn't use a manifest. So if you did this the right way then it is unlikely they whacked the GAC, it is hard to find and the directory is pretty inaccessible in .NET versions prior to v4. And, of course, DLL Hell is enough to explain what they observed :) You narrow it down by looking at the registry entries with Regedit.exe. If y

Categories : Dotnet

.NET registering a DLL through RegAsm without populating Windows event log
No Windows version places a limit to the size of the Event Log. 512 KB is just the default value of the (default) "Limit to ..." option. Just have your customers change this value to a higher one, or tell them to clear their Event log. Something tells me they already have intermittent problems with other applications due to the full event log. Besides, trying to do something to a user's system without leaving a trace in the Event log can be seen as an attempt to hack the system by some tools and admins ....

Categories : Dotnet

Registering with the Com Interop option in Visual Studio works but calling Regasm directly doesn't
I found the issue. (Of course only after I posted to SO...) The object was registering just fine. The issue was with missing dependencies in the constructor of the COM object. Moving the initialization code out of the constructor and to an Initialize() method exposed the issue. Visual Studio worked because of the directory it was running in.

Categories : Dotnet

Microarchitectural zeroing of a register via the register renamer: performance versus a mov?
Executive summary: You can run up to four xor ax, ax instructions per cycle as compared to the slower mov immediate, reg instructions. Details and references: Wikipedia has a nice overview of register renaming in general: http://en.wikipedia.org/wiki/Register_renaming Torbj¨orn Granlund's timings for instruction latencies and throughput for AMD and Intel x86 processors are at: http://gmplib.org/~tege/x86-timing.pdf Agner Fog nicely covers the specifics in his Micro-architecture study: 8.8 Register allocation and renaming Register renaming is controlled by the register alias table (RAT) and the reorder buffer (ROB) ... The µops from the decoders and the stack engine go to the RAT via a queue and then to the ROB-read and the reservation station. The RAT can handle 4

Categories : Assembly

GCM (Google cloud messaging) - can I register multiple devices with same register id?
No. Moreover, you should not need to. You can use user notifications to be able to send a single message from the server to all instances of your app across all the user's devices.

Categories : Android

Why does this mathematical operation work? (Getting 8-bit register from 32-bit register)
"mod 256" is the remainder after division by 256. In binary, this turns out to be the lowest 8 bits (because 256 is 2 to the 8th). This is just like "mod 2" gives you the least significant bit (0 or 1). On (in decimal, base 10), "mod 100" gives you the last two decimals ( 2013 mod 100 => 13).

Categories : Assembly

Django register
You need to use authenticate() first, before calling login(). from django.contrib.auth import authenticate, login if(form.is_valid()): form.save() new_user = authenticate(username=form.cleaned_data.get('username'), password= form.cleaned_data.get('password')) login(request,new_user) return redirect('/dashboard/') From Django docs: When you’re manually logging a user in, you must call authenticate() before you call login(). authenticate() sets an attribute on the User noting which authentication backend successfully authenticated that user (see the backends documentation for details), and this information is needed later during the login process. An error will be raised if you try to login a user object retrieved from the database direct

Categories : Django

Not able to register a user. How do I do that?
I use the code below. The code assumes that the XMPP server is running locally (localhost). The createAccount method is creating internally a Registration packet and sends it through the connection. public static void main(String[] args) { XMPPConnection.DEBUG_ENABLED = true; XMPPConnection connection=null; try { ConnectionConfiguration config = new ConnectionConfiguration("localhost", 5222); connection = new XMPPConnection(config); connection.connect(); AccountManager accountManager = connection.getAccountManager(); if(accountManager.supportsAccountCreation()) { accountManager.createAccount("user1", "user1pw"); } else { ... } } catch (Exception e) {

Categories : Java

What does “Register for COM Interop” actually do? Q2
Visual Studio enumerate the HKEY_LOCAL_MACHINESOFTWAREWow6432NodeClassesTypeLib registry key to fill the COM tab. Drop Wow6432Node if you use the 32-bit version of Windows. So what's missing is that you forgot to ask Regasm.exe to register the type library. You need to also use the /tlb option.

Categories : Misc

Register users in php?
I believe you need to quote your values like so: $Query = "INSERT INTO `sito` (`user`, `password`) VALUES('$Escape', '$Password')"; Also you might want to check out mysqli or PDO instead of using mysql_* functions.

Categories : PHP

gdb - get variable name of register
There might be one register, multiple registers, or even no registers associated with any given C variable at any given point in time. You'll have to inspect the disassembly to see what's going on. Why not just print my_reg to see the value? l *$pc will list the source code around the current instruction being executed.

Categories : C++

How to pass value from rax to xmm register
(Presumed) Problem: movq $1, -72(%rbp) moves the integer value 1 into memory, which, when represented as a floating point number is something extremely small. When you multiply 'x' by this number the result is so small that it's rounded to 0. Potential Solutions: Move a floating point immediate value of 1.0f into memory, instead of 1. I can't say exactly how to do this because I don't know what assembler you're using. Like Brett Hale said, convert the integer into a floating point number. There's probably a million ways to do this, so just Google something like "SSE Integer to Float", and you'll a bunch of results.

Categories : Assembly

Can't register assembly in .Net GAC
Found the answer. It appears that library was build in .net 2, and it can not appear here c:WindowsMicrosoft.NetassemblyGAC_MSIL because it is GAC for assemblies build in .net 4 and higher. So I just take library build in .net 4 and register it using gacutil from c:Program Files (x86)Microsoft SDKsWindowsv8.0AinNETFX 4.0 Toolsx64

Categories : Dotnet

Vim register completion
Hooking into the built-in commands (like " and Ctrl+r) is difficult, because Vim then is in a special sub-mode where it waits for the register name. I use the following "" mapping (which normally is a no-op) to refresh my memory: " ["x][N]"" List contents of the passed register / [N] named " registers / all registers (that typically contain " pasteable text). nnoremap <silent> <expr> "" ':<C-u>registers ' . (v:register ==# '"' ? (v:count ? strpart('abcdefghijklmnopqrstuvwxyz', 0, v:count1) : '"0123456789abcdefghijklmnopqrstuvwxyz*+.') : v:register) . "<CR>"

Categories : Vim

@Register or ?
From an efficiency standpoint, it would seem that using the controls element in web.config would be better, because it is cached once when the application starts; whereas the page directive Register will be processed every page request.

Categories : Asp Net

to use GCM, each device will need to register?
By using gcm sender id,you will use in android ie client side and server browser api in server side say php side. So when a device opens,it will create gcm register id at server side and intermediate is gcm account and it will monitor the device.so you can send notification from server to client. For same device,only unique gcm registration id will be generated. See this tutorial http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/

Categories : Android

Compare number with register
The compare instruction produces enough information to determine all the ordering information—less than, equal to, or greater than. The branch instruction chooses which conditions to branch on. Change BLO to BHI. Note: You did not specify the architecture or assembly language, so I am partially guessing about BHI. You should check the documentation. Various architectures and assembly languages have variants for slightly different kinds of branches. For example, BHI may be for branching if the comparison shows one unsigned value is higher than another unsigned value, while BGT may be for branch if the comparison shows one signed value is greater than than another signed value.

Categories : Assembly

ExpressJs Cannot Get /register Error
You route for /register should look like this: app.get("/register", function (req, res) { res.sendfile(__dirname + "/register.html"); }); Currently you have put both the login and the register view on "/", but only the first will work.

Categories : HTML

Register Variable in Ansible
I test the code use ansible 1.2 on my mbp, it works fine: --- - hosts: local tasks: - name: Checking if Sources are Available action: shell echo a$(cat /etc/apt/sources.list | grep $(echo 'http://url/${ansible_distribution}/stable' | tr "[:upper:]" "[:lower:]" )) register: sources ignore_errors: True - debug: msg="sources value is ${sources.stdout} " - name: Adding source. action: shell echo "deb http://url/${ansible_distribution}/stable ${ansible_lsb.codename} main" | tr "[:upper:]" "[:lower:]" >> /etc/apt/sources.list when: "ansible_os_family == 'RedHat' and sources.stdout == 'a'" result: ansible-playbook test.yml PLAY [local] ****************************************************************** GATHERING FACTS ***************

Categories : Ubuntu

Parsing Sax XML but only the last register is kept in memory
the issue is related to the todo tag. Every time you get that tag inside your startElement you override the current value of data: remove it from the startElement and instantiate it at declaration time public static XMLGettersSetters data = new XMLGettersSetters();

Categories : Android

vim system register * and + not working
If you have copy something to clipboard and paste that in vim, you can use "+p. + is a quoteplus, which means CLIPBOARD documented X selection. :help quoteplus for more information. If you want to copy something in vim to clipboard and paste the content in the other place by Ctrl+v, you can do "+yy, this will copy the current line to clipboard. more information about vim register: :help registers :help quotestar

Categories : Vim

Register GCM from a library project
Here's what you have to do : Write a class (in your library project) that overrides GCMBroadcastReceiver : package com.test.pushlibrary; import android.content.Context; import com.google.android.gcm.GCMBroadcastReceiver; public class PushLibraryBroadcastReceiver extends GCMBroadcastReceiver { /** * Gets the class name of the intent service that will handle GCM messages. */ @Override protected String getGCMIntentServiceClassName(Context context) { return "com.test.pushlibrary.GCMIntentService"; } } Change your manifest to refer to the new receiver : <receiver android:name="com.test.pushlibrary.PushLibraryBroadcastReceiver" ... The reason that your original code didn't work is that the default implementation of getGCMIntentS

Categories : Android

Redirect after Register Using UserID
var userID = System.Web.Security.Membership.GetUser().ProviderUserKey; Using the WebSecurity and System.Web.Security items will only work on subsequent request because you have not sent the auth cookie back to the client yet (this is where it pulls its data from). Given that, you should not even have to send the user Id of the user in the redirect URL...they are logged in and you can just get it at the controller/action that you are going to. By grabbing the userId from the auth ticket, you now do not have to check if the user Id passed in the URL is actually the user that is currently logged in. Example: Login Method [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public ActionResult Register(RegisterModel model) { if (!ModelState.IsValid)

Categories : Asp Net Mvc

Explicitly re-register device to GCM
Part 1: In order to check if the registration id is refreshed to a new one or it is still the same, I plan to re-register. Now, if you see the second point under the heading Enable GCM on Architectural Overview page, it says: Note that Google may periodically refresh the registration ID, so you should design your Android application with the understanding that the com.google.android.c2dm.intent.REGISTRATION intent may be called multiple times. Your Android application needs to be able to respond accordingly. So, Google automatically sends you this broadcast, when it renews the ID. You might not necessarily send check the emptyness of the ID. When Google changes the ID, then also it won't be empty, right? So if you want to handle the renewal/refreshing of the ID then you may do the

Categories : Android

Yii register form does not work
You must NOT comment out the rules() function. In it, you MUST set the attributes to safe, to allow Yii to copy the fields from the form to model: public function rules() { return array( array('username, password, user_sex, user_qq, user_hobby, user_xueli, user_introduce, user_email, user_tel', 'safe'), ); } See also: http://www.yiiframework.com/wiki/161/understanding-safe-validation-rules/

Categories : Forms

Why is CPSR not a banked register?
Manual mode changes are not an efficiency goal on the ARM. Typically, manual mode changes are only done to setup stacks, etc at boot or initialization time. The cpsr is the active copy. Why do we have a banked lr register but not the current pc? The spsr is a banked cpsr for a different mode; just like the banked lr is the pc for a different mode. The banking is so that the exception state can be transparent. The spsr is banked as an interrupt or data abort may occur in any mode; we need to save it so that we stack execution correctly. The normal unbanked user mode never stacks with another mode. mode changes are done automatically in exception conditions. The mode registers are setup to make exception handling very efficient and flexible. Manual mode changes are not highly conve

Categories : Assembly

fast compact register using sse
Simple and very fast, but requires 4KB of table space: _mm_shuffle_epi8(a, mask_lookup[bitvector]); where you simply store all 256 possible shuffle masks in a table indexed by the bitvector.

Categories : C++

What happens when we try to set the register of the currently executing code?
According to the Intel manual, you get an "undefined opcode" exception: mov — Move { Protected Mode, Real-Address Mode, Virtual-8086 Mode, 64-Bit Mode} Excpetions #UD If attempt is made to load the CS register.

Categories : Assembly

Increment eax register by 4 bytes
The thing you want is pretty simple, but you need to add few additional information to your code, because you're writing x86 assembly and not any high-level language like Java or C#. First solution is to keep counting in ecx and compare it with array length. ... arrlen: .long (arrlen - myvar)/4 ... xor %ecx, %ecx loop: movl $0, %edi movl $myvar(, %ecx, 4), %eax pushl %ecx ... //fill other registers ... int $0x80 popl %ecx incl %ecx cmpl %ecx, arrlen jne loop Another way is just to check value loaded. After calling system call, you can't be sure that it won't affect register values (some system calls return information in same registers as used for parameters). You can simply save it on stack, or faster, do comparasion direcly in memory. pus

Categories : Assembly

How to access values in an xmm register
This is how clang on my OS X machine does it -- annotated for clarity: # this is the constant '(double)2.5' LCPI0_0: .quad 4612811918334230528 ## double 2.500000e+00 ## (0x4004000000000000) leaq L_.str(%rip), %rdi # arg1 = format string address movsd LCPI0_0(%rip), %xmm0 # float arg2 = 2.5 movb $1, %al # number of floating-point arguments callq _printf .section __TEXT,__cstring,cstring_literals L_.str: .asciz "%f " # here's the format string

Categories : Assembly

Register annotation router
Information found in the phalcon forum: http://forum.phalconphp.com/discussion/344/multi-module-wildcard-annotation-router One has to register the namespace with the PhalconLoader instead of the throught the modules loader. $loader = new Loader(); $loader->registerNamespaces( array( 'AppsBackendControllers' => __dir__ . '/../apps/backend/controllers/' ) ); $loader->register();

Categories : PHP

Register callback from Java to C++ via JNI or JNA
This is what it looks like in JNA: public interface MyLibrary extends Library { /* StdCallLibrary if using __stdcall__ */ interface MyCallback extends Callback { /* StdCallCallback if using __stdcall__ */ void invoke(/* fill your parameters here*/); } DWORD RegisterCallback(HANDLE handle, int type, MyCallback callback); } ... MyLibrary lib = (MyLibrary)Native.loadLibrary("mylib", MyLibrary.class/*, options*/); MyCallback callback = new MyCallback() { public void invoke() { System.out.println("Success!"); } }; HANDLE h = ...; int type = ...; lib.RegisterCallback(h, type, callback); ... Suffice to say the JNI version is quite a bit longer, plus you have a native compile step to account for.

Categories : Java

Use an empty TagPrefix with a <%@ Register %>
I have looked at the documentation and it does appear that the "tagprefix" attribute is a required, non-empty attribute.

Categories : C#

Where to register event listeners
Its' not important, where the code resides. Just make sure its being executed and your events are properly registered & attached. We're using a single file where all events are attached and include it from bootstrap.php, this ensures that all events are available from all locations in the app. The magic happens when you dispatch an event, like from an controller action. $event = new CakeEvent('Model.Order.afterPlace', $this, array('some'=>'data') )); $this->getEventManager()->dispatch($event); However, you can dispatch events from anywhere you can reach the EventManager (in Models, Controller and Views by default)

Categories : PHP

Register Assembly for MVC view
You're confusing ASPX control tags with extension methods. <dx:ASPxGridView ......./> is an ASPX control; it has nothing to do with Razor or MVC. Html.DevExpress is an extension method that extends HtmlHelper<T>. To use it, you simply need to import the namespace that contains the method, namely DevExpress.Web.ASPxGridView. You can import a namespace in a single view file using the @using directive, and you can import it globally by adding it to the <pages> tag in ViewsWeb.config.

Categories : C#

How to register the SIEBELHTMLLib for programing
Install Siebel on the machine you are compiling VB program. Application Name: SiebelHTML Application ID: {253A9D17-F982-11D4-8BE4-00D0B7E61414} You can get 'SiebelAx_Desktop_Integration_21225.exe' from any machine which has Siebel application installed. Either register it manually or add a component reference to Visual Studio by providing location of file.

Categories : Visual Studio



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.