Posts

c - How to make 64bit Preprocessor defined constant compile without warning? -

imagine this: #define putvalue 0x000000000000000f #define setstr(s) literate(s) #define literate(s) #s ... foo (putvalue, setstr(putvalue)); how can make work this, foo wants first parameter 64 bit integer, , second parameter const string hexadecimal representation of integer leading 0x . so cant do: #define putvalue 0x000000000000000full as break second parameter. but not doing breaking first. oh figgured out awesome way so: foo (int64_c(putvalue), setstr(putvalue)); is doing job.

c# - user.config ignored assembly information and is located in default location -

i have c# excel add-in project uses user settings. the file saved in weird location, guess default one. far understand, location derived information taken assemblyinfo.cs file. in theory path should be: c:\users\jeremy\appdata\local<profile directory>\<company name>\<app name>_<evidence type>_<evidence hash>\<version>\user.config but in case, user.config ends in: c:\users\jeremy\appdata\local\microsoft_corporation\c__users_jeremy_path_u1gevrwm5dgrhpsynfqgtuhhmlxzqlm4\14.0.7132.5000\user.config i double checked , information company name or version defined in assembly file. somehow ignored. causes me lot of trouble because have 2 applications should using own user.config files, because of issue write in same file... for info, i'm building executables wix. do have hints solve that? i'm still not sure why i'm having weird path, might because of nature of software vsto add-in. in case, solved issue implementing ...

sql server - SQL CASE statement for if -

i've looked around , cannot find answer this. far i'm aware i'm using correctly i'm missing keeps coming 'incorrect syntax near keyword 'case'' i'm trying take 2 values, , depending on 'word' return value of 1-5. these multiplied give me 'rating' declare @pr int declare @ir int declare @r int declare @probabilityrating varchar(max) declare @impactrating varchar(max) set @probabilityrating = 'high' set @impactrating = 'medium' case @probabilityrating when 'very low' @pr = 1 when 'low' @pr = 2 when 'medium' @pr = 3 when 'high' @pr = 4 when 'very high' @pr = 5 end case @impactrating when 'very low' @ir = 1 when 'low' @ir = 2 when 'medium' @ir = 3 when 'high' @ir = 4 when 'very high' @ir = 5 end set @r = @ir * @pr where going wrong?! since you're reusing case , maybe makes sense...

c# - Why am I not able to access an image from code-behind -

i have following gridview: <asp:gridview showheaderwhenempty="false" alternatingrowstyle-backcolor="#ebe9e9" autogeneratecolumns="false" onsorting="yourtasksgv_sorting" allowsorting="true" id="yourtasksgv" runat="server" clientidmode="static" emptydatatext="you have no tasks assigned you" onrowdatabound="yourtasksgv_rowdatabound" onrowcreated="yourtasksgv_rowcreated"> <columns> <asp:templatefield> <itemtemplate> <asp:image id="imgexpcol" alternatetext="plus" clientidmode="static" imageurl="~/theimages/subtaskplus.png" runat="server" cssclass="imgexpcol" /> <asp:panel id="pnlsubtasks" runat="server" cssclass="pnlsubtasks" clientidmode="static"> <asp:gridview id=...

pdf - iText Error: java.io.IOException: trailer not found -

i'm creating web application fill pdf form using itext. create pdf forms i'm first using microsoft word create template, saving it, opening file in adobe acrobat xi pro, adding form fields, , saving pdf. problem pdf not saving trailer when execute this: pdfreader reader = new pdfreader(templatename); it throws exception "java.io.ioexception: trailer not found". know can read pdf if has trailer because i've tried reading other pdfs. appears issue acrobat not adding trailer pdf. if try creating pdf form scratch in acrobat not saved trailer. has else run problem? there setting in acrobat add trailer? there way itext read without trailer? ====update==== i must have had old version of itext because when downloaded latest version able read pdf file. after reading file , stamping got exception closing stamper. code looks this: pdfreader reader = new pdfreader(templatename); fileoutputstream os = new fileoutputstream(outputpath); pdfstamper stampe...

Where to find php_imagick.dll for php 5.5.12 for Windows wampserver 2.5? -

i using wampserver 2.5 on windows 7 (32 bit) , php version 5.5.12 . unable use imagick . i have installed imagick version 6.8.9 on system , works charm on command line. further, have followed instructions enable on wampserver. inserted " setenv magick_home c:/imagemagick " in httpd.conf @ appache. downloaded php_imagick-3.1.2-5.5-ts-vc11-x86.zip copied , pasted php_imagick.dll zip php.ini @ appache. while running simple script on php [$a = new imagick()] i error [class 'imagick' not found] . kindly direct me right way of installation , right downloads install imagick on wampserver 2.5 / windows 7 / 32bit / php 5.5.12 . manual installation of imagick on wamp, xampp, , iis create folder imagick in php/ext folder. now add newly created php/ext/imagick folder windows path. download latest version of imagick windows link. http://windows.php.net/downloads/pecl/releases/imagick/ download php extension of imagick link. http://windows.php.net...

Custom animation for navwindows Titanium -

//load profile controller. function go_to_profile() { var controller = alloy.createcontroller('profile', { title : 'profile', name : '_profile', isflyout : true }); var newwindow = controller.getview(); alloy.globals.navgroup.openwindow(newwindow, { animated : true, transition:titanium.ui.iphone.animationstyle.curl_up }); } here code. modify it, window slides in upwards. transition not seem work , keeps sliding in left right. any idea why, cheers. it's simple, ti.ui.ios.navigationwindow doesn't allow transitions. only when call `window.open()' can define transition prop.