Category Archives: StackOverFlow

Stack Overflow is a question and answer site for professional and enthusiast programmers.

Usage of Created Formats from SAS Data Sets

I have created a formats like following

data formatset;
    input fmtname $ start $ end $ label $;
$test region1 region3 zone1
$test region4 region5 zone2
$test region6 region7 zone3

proc format library = work.formats
    cntlin = work.formatset;

Problem: I will have new datalines data with the variable region. And i want to have a new attribute zone which use the format $test.

read more

"Value of ‘null’ is not valid for stream"

Attempting to download an image from a URL into memory. Getting an error on the response stream.

Exception calling “FromStream” with “1” argument(s): “Value of ‘null’ is not valid for ‘stream’.”

Function Download-Image {
$req = [System.Net.WebRequest]::Create
    $response = $req.GetResponse()
    $ResponseStream = $Response.GetResponseStream()
    [System.IO.Stream]$stream = $ResponseStream

[byte[]]$image = Download-Image

Add-Type -AssemblyName System.Windows.Forms

$img = [System.Drawing.Image]::FromStream([System.IO.MemoryStream]$image)
$pictureBox = new-object Windows.Forms.PictureBox
$pictureBox.Width =  $img.Width
$pictureBox.Height =  $img.Height
$pictureBox.Image = $img

$form = new-object Windows.Forms.Form
$form.Width = $img.Width
$form.Height =  $img.Height
$form.AutoSize = $True
$form.AutoSizeMode = "GrowAndShrink"
$form.Icon = $icon
$form.Add_Shown( { $form.Activate() } )

read more

Bitnami WordPress site re-setup

so I have successfully installed Bitnami on my Linux. Purchased a theme from themeforest created a couple of pages using visual composer and some other plugins, customized some theme options, created a child theme and added some custom css in it. All well and dandy.

Now I’m trying to transfer the whole thing on other computer with some demands if possible. For better understanding of what I’m after lets simplify some things. Lets call:

The original(no changes have been made) purchased theme zip …… T1

read more

Access denied exception when running a .Net 4.5 application published using VS

I had a test build I was supposed to publish to the testing team. I used the default “Publish ” option in visual studio to create an installer. It created the installer successfully, and application is getting installed.

But when running the application, it throws an error saying “Access Denied exception occurred” in “System.Deployment” class. I have no idea what is happening here, because my code is not even coming to picture here. It is just the default deployment tool’s classes that are failing activation.

read more