Posts

visual c++ - LoadLibrary() fails with error 1114: "A DLL initialization routine failed" for Users -

i have situation loadlibrary() fails error 1114, fails when user logged in part of "user" group. works fine "administrators" , "power users". can run fine if start application "run as" administrator or power user i can step through of code, can not make changes (at least not changes can rolled out field), unfortunately solution has external application. so far tried give full access directory (and containing files) exes , dlls user group without success. next started looking group policy, before go in modifying bunch of stuff, thought id run community. thank in advance a dll initialization routine failed means dllmain of library returned anormal status, must require administrator run. if specify library want load can provide better answers.

java - Installing JDK without administrator privileges -

i trying install jdk @ office laptop says need administrator privileges. have access own account @ work. how can install java development kit without administrator rights? here workaround install java without admin privileges or without administrator password. need cygwin installed not require admin privileges. in utils make sure select cabextract.exe install it. fireup cygwin bash shell. type cabextract jdk1.6.exe <-- jdk file name this extract files current directory. move tools.zip new directory , unzip using cygwin or windows explorer. java directory. hint: try subsitite 7zip instead of cabextract , cygwin. if works faster. edit: doesn't working jdk latest versions of jdk 6 , 7. many of jar files (eg rt.jar) compressed need decompressed using unpack200. just go through each directory looking files .pack extension , unpack them using unpack200, eg: .\jre\bin\unpack200 .\jre\lib\rt.pack .\jre\lib\rt.jar this allows run java programs still had tr...

linux - Unable to remove files from directory -

i using rm delete files directory through perl script throws error can't exec "rm" no such file or directory . command goes : system("rm $directory$files"); $directory$files = /var/spool/mqueue/qf* perl has builtin function removing files, unlink . third example shows how use in combination glob delete list of files: unlink glob "*.bak"; or in case, unlink glob($directory.$files);

c# - Combobox selected item is deleted once selected . Invalid Postback or Callback argument -

i have 4 textboxes 1 combobox , 1 button ( , other controls) in page . based on values typed in textboxes related values updated in combobox. on clicking submit button in page giving following error . "invalid postback or callback argument. event validation enabled using in configuration or in page. secuity purposes,this feature verifies arguments postback or callback events originate server control rendered them. if data valid , expected . use clientscriptmanager.registerforeventsvalidation method in order register postback or callback data validation." now in page directive added <%@page enableeentvalidation="false"> when type values in 4 textboxes corresponding value appear in cobobox . when select combobox value, selected value wil deleted . reason ? <%@ page language="c#" masterpagefile="~/main.master" autoeventwireup="true" codebehind="addechecklist.aspx.cs" inherits="labtr...

c# - dynamically add a link button in gridview template field at run time together a label control -

i have gridview in form. working rowdatabound event grid. have template field inside columns of gridview. label has been taken inside template field. want add link label on rowdatabound event @ runtime, .system.web.ui.webcontrols.linkbutton showing instead of link button. how add link button label text in grid view? just add linkbutton inside templatefield <asp:gridview runat="server" id="gridview"> <columns> <asp:templatefield> <itemtemplate> <asp:linkbutton runat="server" id="lnktest"></asp:linkbutton> </itemtemplate> </asp:templatefield> </columns> </asp:gridview> then in rowdatabound event can find , whatever want void gridview_rowdatabound(object sender, gridviewroweventargs e) { if (e.row.rowtype == datacontrolrowtype.datarow) { enti...

cocos2d iphone - object is moving in the accelerometer -

i want create 1 game in cocos2d in 1 object running . i want move object left , right base on device accelerometer. getting value of accelerometer , update location of object. can see new location in log. object not moving it's possion. here code have writen in app . - (void) accelerometer:(uiaccelerometer *)accelerometer didaccelerate:(uiacceleration *)acceleration1 { acceleration = acceleration1; cgpoint position = mainplayer.position; if(acceleration.y < -0.25) { // tilting device right position.y -= 0.25; } else if (acceleration.y > 0.25) { // tilting device left position.y += 0.25; } else { } // newposition = position; ccaction *action = [ccmoveto actionwithduration:0.01 position:position]; [mainplayer runaction:action]; // mainplayer.position = ccp(position.x, position.y); } i have try both way setting position direct , using action. dose 1 knows why problem occure or setting need accelerometer work. please give link such kind exampl...

operating system - Difference between Counting and Binary Semaphores -

what difference between counting , binary semaphore. what have seen somewhere both can control n number of processes have requested resource. both have taken , free states. is there restriction on how many resources binary semaphore , counting semaphore can protect? both allow 1 process use resource @ time... is there other difference? above mentioned properties correct? actually, both types used synchronize access shared resource, whether entity trying access process or thread. the difference follows: binary semaphores binary, can have 2 values only; 1 represent process/thread in critical section(code access shared resource) , others should wait, other indicating critical section free. on other hand, counting semaphores take more 2 values, can have value want. max value x take allows x process/threads access shared resource simultaneously. for further information, take @ link. http://www.chibios.org/dokuwiki/doku.php?id=chibios:articles:semaphores_mutexe...