Posts

c# - ABCpdf not applying inline css styles -

in aspx page have script following css <style type="text/css"> .subcontainer{margin: 0 auto; padding-top: 20px} .hide-val{display:none;} </style> in browser page loads ok, div class hide-val not displayed when use addimageurl styles not being applied. doc thedoc2 = new doc(); thedoc2.htmloptions.usescript = true; thedoc2.htmloptions.media = mediatype.print; thedoc2.htmloptions.initialwidth = 1048; //for multiple page thedoc2.rect.inset(10, 30); thedoc2.page = thedoc2.addpage(); int theid2; theid2 = thedoc2.addimageurl(urltohtmlpage); while (true) { thedoc2.framerect(); // add black border if (!thedoc2.chainable(theid2)) break; thedoc2.page = thedoc2.addpage(); theid2 = thedoc2.addimagetochain(theid2); } (i...

javascript - add condition to run the script only from my computer's IP in jmeter -

Image
how can add condition run script computer's ip in jmeter ? i'm need write in condition line @ if controller ? thanks below function gives ip of computer in running script. __machineip you need use this. ${__machineip} for below steup in picture, statements inside if controller executed if ip of machine matches given ip "13.28.196.100".

c - Understanding how fork() and wait() work together -

this isn't in code review because not understand full concept of code start with. if should still moved let me know. i have code , explain thoughts on it, , hoping can tell me going wrong or getting confused @ because still not sure occurring. #include <sys/types.h> #include <stdio.h> #include <unistd.h> int main() { pid_t pid, pid1; pid = fork(); if (pid < 0) { fprintf (stderr, “fork() failed\n”); return(1); } else if (pid == 0) { pid1 = getpid(); printf (“pid = %d\n”, pid); // printf (“pid1 = %d\n”, pid1); // b } else { pid1 = getpid(); printf (“pid = %d\n”, pid); // c printf (“pid1 = %d\n”, pid1); // d wait (null); } return 0; } from understand, have 2 process id's, parent (pid) , child (pid1). once call pid = fork() , believe child initiated , given id of 0, while parent get's id of child, let 1337. pid = 1337 , pid1 = 0. so skip first if no error has o...

asp.net - How do you specify the project configuration when publishing to an Azure website from source control? -

i have configured azure website deploy bitbucket mercurial repository . have 1 branch. logs (see below), looks deployment process uses release configuration. ... myproject.web -> d:\home\site\repository\myproject.web\bin\myproject.web.dll transformed web.config using d:\home\site\repository\myproject.web\web.release.config obj\release\transformwebconfig\transformed\web.config. ... let's have 3 environments, dev, beta, , prod. have web.config transformations each since may have different connection strings or various other different settings across each environment. how can specify different configuration? you can create .deployment file in root of repo , put in it [config] scm_build_args=-p:configuration=debug alternatively can specify in site's app settings portal. this: scm_build_args=-p:configuration=debug for more custom deployment settings can refer this

c# - Cross-domain ajax calls won't work, even though it works in tutorials -

i'm wokring in asp.net. want create cross domain ajax calls webmethod using cors . i've come across many examples on internet, including many tutorials ans questions, somehow none works me. look @ example, it's 1:1 code tutorial found on matter , basic: // default.aspx.cs [system.web.services.webservicebinding(conformsto = system.web.services.wsiprofiles.basicprofile1_1)] public class myservice : system.web.services.webservice { [system.web.services.webmethod] [system.web.script.services.scriptmethod(responseformat = system.web.script.services.responseformat.json, usehttpget = false)] public string helloworld(string test) { string result = ""; result = "success"; return result; } } // global.asax httpcontext.current.response.addheader("access-control-allow-origin", "*"); if (httpcontext.current.request.httpmethod == "options") { httpcontext.current.response.addhead...

css - google font import doesn't work on linux -

i'm finishing website have weird problem. have font imported google, in css file. @import url(http://fonts.googleapis.com/css?family=josefin+slab); then normal font-family call on body tag this. body{ font-family:'josefin sans', sans-serif; } it works fine in chrome, firefox, exploder, safari, opera on windows , whatever else i've been able try on. i @ school yesterday between classes working on it, computers in lab linux machines, opened website firefox on linux , font didn't load on of them. defaulted sans-serif. i checked on safari on mac @ work , doesn't load there either. defaults sans-serif. is problem font file types on google , have go import eof , ttf , in order fix this? or else? i suggest uploading font http://www.fontsquirrel.com/ using webfont generator. this give fontface css , different font file types cross browser compatability.

c - Passing pointer to string, incompatible pointer type -

so i'm sure question answered many times having trouble seeing how fix situation. took snippet of program contains warning-generating code: #include <stdio.h> #include <stdlib.h> inputdata(int size, char *storage[size]) { int iterator = -1; { iterator++; *storage[iterator] = getchar(); } while (*storage[iterator] != '\n' && iterator < size); } main() { char name[30]; inputdata(30, name); } the warning message: $ gcc text.c text.c: in function ‘main’: text.c:18:5: warning: passing argument 2 of ‘inputdata’ incompatible pointer type [enabled default] inputdata(30, name); ^ text.c:4:1: note: expected ‘char **’ argument of type ‘char *’ inputdata(int size, char *storage[size]) edit: ok, managed play around syntax , fixed problem. still wouldn;t mind hearing more knowledgeable why precisely needed. here changed: #include <stdio.h> #include <stdlib.h> inputdata(int size, char *storage) // ...