[Solved] Extract image URL in a string (RSS with syndicationfeed)

Complete solution with regex : string source =”<img src=\”http://MyUrl.JPG.jpg\””; var reg = new Regex(“src=(?:\”|\’)?(?<imgSrc>[^>]*[^/].(?:jpg|bmp|gif|png))(?:\”|\’)?”); var match=reg.Match(source); if(match.Success) { var encod = match.Groups[“imgSrc”].Value; } solved Extract image URL in a string (RSS with syndicationfeed)

[Solved] Find hrefs value in string

Extend the capturing group around the “one or more not white space” LinkParser = new Regex(@”\b(?<url>https?://\S+)[‘””]”, RegexOptions.Compiled | RegexOptions.IgnoreCase); Then access the match collection with m.Groups[“url”].Value A simpler pattern might also work well: \b(?<url>http.*?)[‘”] These are very primitive and I wouldn’t guarantee it works in all cases. If you have urls that aren’t quoted at … Read more

[Solved] Please solve these errors. I’m using dev++ compiler [closed]

The first error is a typo you wrote pememory. The second error appears because you didn’t code any transformation between Float and ptrFloat. You should add a copy constructor to Float: Float(const Float& a) : Float(*a.fmem_top) {} And then a conversion constructor to ptrFloat: ptrFloat(Float a) : Float(a) { pmem_top=pmemory; *pmem_top=abc; pmem_top++; } PS: your … Read more

[Solved] Using Malloc() to create an integer array using pointer [closed]

It can be inferred from the error message, intarr_create(): null pointer in the structure’s data field, that data fields of each struct are expected to be allocated. intarr_t* intarr_create(size_t len){ intarr_t* ia = malloc(sizeof(intarr_t) * len); size_t i; for(i = 0; i < len; i++) { // ia[len].len = 0; // You can initialise the … Read more

[Solved] Need help turning a Lua function into a C#

This may help. public static void PrintValues() { var array = new [] { “value”, “value2”, “value3”, “value4” }; foreach(var l in array) { System.Console.WriteLine(l); } } solved Need help turning a Lua function into a C#

[Solved] Call function use pointer

First of all: Your functions void my_int_func(int x) and void my_int_func2(int y) do not return anything (return type void). They just prompt the input parameters to stdout. What you probably want is something like that #include <iostream> using namespace std; int my_int_func(int x) { return x; } int my_int_func2(int x) { return x; } void … Read more

[Solved] Is it possible to create a dialog which only blocks its parent? [closed]

You can disable the opening Form instead of making the modal child truly modal.. You can try this: Open the ‘modal’ children with this.Enabled = false; FormDlg yourModalChildForm= new FormDlg(this); yourModalChildForm.Show(); In the constructor write : Form myParent; public FormDlg(Form myParent_) { InitializeComponent(); myParent = myParent_; } And in the FormClosed write: private void FormDlg_FormClosed(object … Read more

[Solved] Unable to find cause of infinite loop [closed]

Your studentfile is most likely in a fail state, as you never check whether the read operations are successful or not. Change the code as follows: if(!(studentFile >> ssn >> resident >> hours)) { std::cout << “read failed”; return 1; } //… do { // Do stuff // REMOVE THIS LINE: studentFile >> ssn >> … Read more

[Solved] Ask user to repeat the program or exit in C

int main(void) { float x,y,sum; char ch; do { printf (“Enter the first number:”); scanf (“%f”,&x); printf (“Enter the second number:”); scanf (“%f”,&y); sum=x+y; printf (“The total number is:%f\n”,sum); printf (“Do you want to repeat the operation Y/N: “); scanf (” %c”, &ch); } while (ch == ‘y’ || ch == ‘Y’); } This uses … Read more

[Solved] No 2D Image container in c++ [closed]

The std::valarray class + std::gslice can be used for administrating 2D, 3D … ND matrices. http://en.cppreference.com/w/cpp/numeric/valarray http://en.cppreference.com/w/cpp/numeric/valarray/gslice See some example in the link. If your intention is the image manipulation refer to the specific specialized libraries (jpeg, png ….). 2 solved No 2D Image container in c++ [closed]