Posts

C++ Local Static Variable Allocation -

so im learning c++ memory allocation , static variable. understand local variables allocated stack , not practice static. there situations use of local static variable not work @ all? i think confusing between two. there difference between local variable , local static variable . former's life till function exits (allocated on stack) later exists till program exits (allocated in global/static area of program memory).

pdf - .net, Itextsharp, how to flatten comments (specifically stamps)? -

in short, i'm having issues "flattening" stamp comments in pdf's while using itextsharp. effect i'm looking identical when "print pdf" acrobat (the stamp can no longer moved/edited/etc. can still select text might have). using simple javascript code seems work fine (this.flattenpages). this problems seems pertain stamps, real trick of it. i've used pdfstamper class flatten other kinds of page comments , annotations (e.g. text boxes) using: stamper.formflattening = true stamper.freetextflattening = true but not work stamps i've tried (the default included in acrobat or user created). document comes out on other end same editable stamp. so... ideas? , please let me know if there's additional information can provide. thanks. update: not same other annotations. whatever it's worth, stamps (specifically) show overcontents. how 1 go changing flag or otherwise merging/flattening onto page else can't find documentation for....

C# opening a Form out of a TrayIcon -

i used snippet creating tray application 2 buttons (settings , exit): using system; using system.windows.forms; using system.drawing; using windowsformsapplication1; //***************************************************************************** abstract class notico { private static notifyicon notico; //========================================================================== public static void main(string[] astrarg) { contextmenu cm; menuitem micurr; cm = new contextmenu(); micurr = new menuitem(); micurr.index = 0; micurr.text = "&settings"; micurr.click += new system.eventhandler(settingsclick); cm.menuitems.add(micurr); micurr = new menuitem(); micurr.index = 1; micurr.text = "beenden"; micurr.click += new system.eventhandler(exitclick); cm.menuitems.add(micurr); notico = new notifyicon(); notico.icon = new icon("tanss.ico"); notico.text = "tanss busylight connector...

jsp - java.lang.IllegalStateException: Cannot forward after response has been committed in servletfilter -

i using filter determine whether or not requested page has valid session or not. this code. web.xml : <filter> <filter-name>sessionfilter</filter-name> <filter-class> com.imagemanagementutility.filter.sessionfilter </filter-class> <init-param> <param-name>avoid-urls</param-name> <param-value>index.jsp</param-value> </init-param> </filter> <filter-mapping> <filter-name>sessionfilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> filter class: public class sessionfilter implements filter { private arraylist<string> urllist; public void destroy() { } public void dofilter(servletrequest req, servletresponse res, filterchain chain) throws ioexception, servletexception { httpservletrequest request = (httpservletrequest) req; httpservletresponse re...

Dispose JavaFX Tasks -

i have static borderpane contextmenu insight task task task = new task() { @override protected void call() throws exception { platform.runlater(new runnable() { @override public void run() { try { contextmenu = new contextmenu(); menuitem item1 = new menuitem("about"); item1.setonaction(new eventhandler<actionevent>() { @override public void handle(actionevent e) { system.out.println("about"); } }); menuitem item2 = new menuitem("preferences...

c# - sound not playing at the right moment -

i created mediaelement background music in windows phone app , plays problem when tried add sound button when pressed when debug , background music plays , when press button navigates me next page without playing sound created, , when press backbutton navigated page , plays it, why? code: private void play_click(object sender, routedeventargs e) { mediaelement click = new mediaelement(); click.source = new uri ("/assets/sounds/press.mp3",urikind.relative); click.position = timespan.zero; click.volume = 1; layoutroot.children.add(click); click.play(); navigationservice.navigate(new uri("/navpage.xaml", urikind.relative)); } private void play_click(object sender, routedeventargs e) { mediaelement click = new mediaelement(); click.source = new uri ("/assets/sounds/press.mp3",urikind.relative); click.position = timespan.zero; click.volume = 1; ...

c# - How to set windows path regex pattern? -

i have list of paths, , need match starting c:\program files\_folder_\_folder_\etc , having amount , type of character windows path can use. how approach, though guess allows alpanumeric characters: string pathpattern = @"c:\program files\_folder_\_folder_\etc[0-z]*"; if (system.text.regularexpressions.regex.ismatch(mylist[n], pathpattern, system.text.regularexpressions.regexoptions.ignorecase) { //some action } if c:\program files\_folder_\_folder_\etc pre-defined part. think can without regex using contains if(pathpattern.contains(@"c:\program files\_folder_\_folder_\etc")) { //some action } edit 1: can tolower() on pathpattern var ss = pathpattern.tolower().contains(@"c:\program files\_folder_\_folder_\etc".tolower());