Member Avatar
UI 9 Replied To a Post in cURL Experiments
Topic by UI in Web Development
php
AssertNull,

I experimented as you suggested. Good thing you suggested it!
Mentioning my findings below for future newbies to benefit from them.

And yes, the following code shows a blank page and checking the source shows the same.

<?php
function get_url($url)
{
$ch = curl_init();
if($ch === false)
{
die('Failed … Reply by UI
Member Avatar
Featured JeffBennett Donated to our Community; Thanks!
Member Avatar
Girdhar Joined the Community
Member Avatar
Featured dottomm -2 Replied To a Post in Problem with simple PDO insert
Topic by dottomm in Web Development
Here is the code I am using:






$pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=$charset", $username, $password,
array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_PERSISTENT => false,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES $charset COLLATE $collate"
)
);
$name=array();
$email=array();
$role=array();

$rows = [];
$rows[] = [
'user_id' => $user_id,
'name' => $_POST['name'],
'email' => $_POST['email'], … Reply by dottomm
Member Avatar
UI 9 Replied To a Post in cURL Experiments
Topic by UI in Web Development
php
Fellow Programmers,

I did test both code blocks separately and they did redirect me to apple.com.

Sample 1:



//gets the data from a URL
function get_url($url)
{
$ch = curl_init();

if($ch === false)
{
die('Failed to create curl object');
}

$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, … Reply by UI
Member Avatar
Topic by Curious Gorge in Game Development
So, I was in a similar programm assignement not to long ago, and these 2 links helped out for me. One is to help me understand the solution in the form of vector math, and the other help me verify my answers.

http://www.mathportal.org/calculators/matrices-calculators/vector-calculator.php
https://www.studypug.com/algebra-help/vectors/direction-angle-of-a-vector

I know, tempting to just go … Reply by Kim_6
Member Avatar
Topic by josh_4 in Programming
I don´t know why, but the images for each nodes are allways the same. I tried by the taking the whole path to the icon/png in the xml and i tried it with only the the file too. <- nothing works. It´s allways the "old" folder.ico for all nodes in … Reply by josh_4
Member Avatar
Topic by Alv45525 in Community Center
Perhaps you are asking for `DataGridView1.CellClick`event ? Reply by xrj
Member Avatar
AssertNull 814 Replied To a Post in cURL Experiments
Topic by UI in Web Development
php
Get some working code without the array, then simply change the places where you set the options one by one to setting it a single time as an array...



<?php
function get_url($url)
{
$ch = curl_init();
if($ch === false)
{
die('Failed to create curl object');
}
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, … Reply by AssertNull
Member Avatar
I am developing an application for people to learn but i realised the need to time the quizzes in the programme. Could someone please help me with a sample multiple question codes with timer?
So far this is what i got:

Public Class Form1
Dim questions(2, 4) As String
Dim … Topic by Offei in Community Center
Member Avatar
I am developing an application for people to learn but i realised the need to time the quizzes in the programme. Could someone please help me with a sample multiple question codes with timer?
So far this is what i got:

Public Class Form1
Dim questions(2, 4) As String
Dim … Topic by Offei in Community Center
Member Avatar
Offei Joined the Community
Member Avatar
Featured cereal 1,328 Replied To a Post in Problem with simple PDO insert
Topic by dottomm in Web Development
$name is defined? If not the loop will not run:

while($i < count($name))
{
$stmt->execute([':user_id' => $user_id, ':name' => $name[$i], ':email' => $email[$i], ':role' => $role[$i]]);
$i++;
}

Also, you could add `debugDumpParams()` to see what looks like the prepared statement:

while($i < count($name))
{
$stmt->execute([':user_id' => $user_id, ':name' => … Reply by cereal
Member Avatar
A client needs a Windows Server set up.
The Server will run Exchange.
The client will have a max of 10 employees.
At most one user will ever need to remote-desktop in.
How many User CALs will need to be purchased and what kind?
Should there be 10 User CALs … Topic by DeanMSands3 in Microsoft Windows
Member Avatar
ADELEKE_1 Joined the Community
Member Avatar
Featured dottomm -2 Replied To a Post in Problem with simple PDO insert
Topic by dottomm in Web Development
First. Thank you so much. You've helped me understand how arrays works so much better. I greatly appreciate it.

I think instead of checkboxes I can use <select> to choose the role. In testing; it seems to work well and should make validation easier.

The arrays displayed are exactly as … Reply by dottomm
Member Avatar
Rema_3 Joined the Community
Member Avatar
jigglymig 12 Marked Solved Status for Saving pdf(s) from dictionary
The goal of this project is to create a dll that will take in employee and employer information then return W2(s) in pdf form. Then the main program will cycle through them and email/print. Currently, the program is adding the SSN and the edited pdf to a dictionary and returning … Topic by jigglymig in Software Development
c#
Member Avatar
jigglymig 12 Replied To a Post in Saving pdf(s) from dictionary
Topic by jigglymig in Software Development
c#
Thanks for the support. I ended up sending the memory stream(s) with the dictionary instead of actual documents. So I saved them for editing purposes using this...




private void Save (Dictionary<string, MemoryStream> employees)
{
string saveToFolder = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "W-2 PDF");
foreach (var key in employees.Keys)
{
var fileStream = File.Create(saveToFolder … Reply by jigglymig
Member Avatar
CHETAN_3 Joined the Community
Member Avatar
iamrahul Joined the Community
Member Avatar
diafol 3,547 Replied To a Post in tpl issue
Topic by david_105 in Web Development
php
You allow server to use php within tpl, e.g. Apache

AddType application/x-httpd-php .tpl

Or you can use templating shortcuts within tpl files, e.g. Smarty, RainTPL, etc, etc. Reply by diafol
Member Avatar
rproffitt 701 Replied To a Post in Open .mdf files
Topic by Bjorn_1 in Databases
Just a simple google using your own words finds a tutorial. You don't open but attach them.
Read https://learningsqlserver.wordpress.com/2011/02/13/how-can-i-open-mdf-and-ldf-files-in-sql-server-attach-tutorial-troublshooting/ Reply by rproffitt
Member Avatar
Hoai Joined the Community
Member Avatar
kwizera_1 Joined the Community
Member Avatar
UI 9 Replied To a Post in cURL Experiments
Topic by UI in Web Development
php
Guys,

On this cURL tutorial:
http://www.binarytides.com/php-curl-tutorial-beginners/

Under the section **"Make GET requests - fetch a url"**, you will see 3 blocks of code.
I'm referring to the 3rd one that looks like this:



curl_setopt_array($ch, array(
CURLOPT_URL => $url ,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_CONNECTTIMEOUT => $timeout ,
));



How come no … Reply by UI
Member Avatar
Bjorn_1 Created Open .mdf files
I am using MS SQL and have logs that are in .mdf and .ldf format. It took us a while but we figured out how to get our new settings correct and coming in w3c format. The olf files are still .mdf and I need to know what I can … Topic by Bjorn_1 in Databases
Member Avatar
Bjorn_1 Joined the Community
Member Avatar
bbbbbbbbb_1 Joined the Community
Member Avatar
rproffitt 701 Replied To a Post in tpl issue
Topic by david_105 in Web Development
php
David, fill in the blanks about what language or system uses those tpl files. As it is, we're guessing. How about a link to the product page and docs? A lot of us write in many languages but we need a little more from you on this. Reply by rproffitt