|
We figured out what it was - database permissions. F*ckin DBA's...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
<pre>Hi,
I am using the Live Server app, with VS Code. The issue I have is, as soon as I start coding, in the left column, the browser disappears, from the right.
Everything works fine, if I position/size VS Code/restore down Browser, side by side. Unfortunately that's with the browser working externally, from VS Code, not within its environment, the essence of the app.
The browser does automatically refresh but to see the refreshed/edited code, I have to access the browser from the taskbar, on laptop, unless I position the VS Code/browser together.
The whole concept of Visual Server, is to see edited code immediately, as I code.
Any suggestions would be greatly appreciated.
Ian
</pre>
|
|
|
|
|
Hi all...
just testing my new webhost, I made a new web project (Blazor, .NET5), clicked deploy and selected "FTP Passive" move.. what does the passive stands for...
It seems super slow.. going to try the.. "active"? deploy next!
EDIT
Seems marginally faster with "passive off"/"active". But maybe it's because I already built my app?
modified 4-Feb-21 8:14am.
|
|
|
|
|
On my customer PHP project, I've been tasked with upgrading it from PHP 4.7 to PHP 7.4.14. I decided not to take baby steps and do a giant leap since the app is so primitive, meaning it doesn't use any of the extensions such as image or anything clever.
I have 1000's of database queries using mssql_query, but I need to establish a connection first. Before I try to reinvent the wheel, thought it would be better to look at the wheels out there already first.
I'm not a PHP developer, nor do I work on WordPress, but could use a nudge in the right direction. Hoping there is something global. I saw something where I can add a PHP files called dbConnect, and PHP will load it on startup. But the documentation was kind of fuzzy to me.
All I've done so far was to do a test connection first, setup the environment, and start research on this.
I'm using PHP Storm
If it ain't broke don't fix it
Discover my world at jkirkerx.com
modified 2-Feb-21 14:54pm.
|
|
|
|
|
Hi,
My son is interested in coding and would like to learn web development. Which would be the best web development course for kids? Could someone please help me?
|
|
|
|
|
|
Whilst I try to refrain from printing emails, some are required and normally I use print pre-view to check what page(s) I need and select accordingly. If too complex as quick ctl A and copy paste to Word (or your favourite editor) and edit to the smallest number of pages possible.
However, just been caught out with a blood test appointment printed without checking and yes, three lines on the second page (of two sided print) that are not needed. Do Web designers have a secret contract with printer supplies for paper and ink? By the way, the email had masses of White Space!
Bah Humbug, waste of a sheet of paper.
|
|
|
|
|
I'm SMH on this.
Normally I really never look at the HTTP response payload and just assume it works. But this is a total hack on PHP 4.7 to tweak it to do modern things. I'm confused here, and really just looking for an explanation of why, so here goes.
I wrote this in PHP 4.7; being limited with what I can do, I hand crafted some JSON, and used a hack to encode it.
header('Content-Type: application/json; charset=utf-8');
$json = '{
"projectNumber":' . $sess_proj_no . ',
"projectStage":"' . $sess_proj_stage . '",
"newVersion":' . $new_version_no . ',
"undefinedValue":{
"projectNumber":"' . $projectNumber . '",
"variableContingencyCost":"' . $variableContingencyValue . '",
"variableContingencyValue":"' . $variableContingencyRate . '",
"actualPlusContingencyCost":"' . $actualPlusContingencyCost . '"
}
}';
$jsonTest = '{ "test": "result" }';
$jsonEncode = json_encode($jsonTest);
echo $json;
ob_end_flush();
With encoding, adding slashes to the double quotes,
SyntaxError: JSON.parse: expected property name or '}' at line 2 column 13 of the JSON data
"{
\"projectNumber\":2549,
\"projectStage\":\"engineering\",
\"newVersion\":0,
\"undefinedValue\":{
\"projectNumber\":\"\",
\"variableContingencyCost\":\"\",
\"variableContingencyValue\":\"\",
\"actualPlusContingencyCost\":\"\"
}
}"
Without encoding, no slashes to the double quotes, I get a clean HTTP response payload without errors.
{
"projectNumber": 2549,
"projectStage": "engineering",
"newVersion": 0,
"undefinedValue": {
"projectNumber": "",
"variableContingencyCost": "",
"variableContingencyValue": "",
"actualPlusContingencyCost": ""
}
}
I always thought JSON had to be encoded during transport, and then decoded to consume it.
Unless json_encode is meant to convert JSON created with a class, into a string without slashes. or it has something to do with echo and just spitting out text.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
According to my reading of the PHP manual, json_encode() didn't exist before PHP 5.2.0.
So I have no idea what you're using in 4.7....
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
|
It looks like you are creating a string in JSON format, then passing it to json_encode() where it is trying to turn it into more JSON. Unless you are actually trying to embed your JSON in the JSON that json_encode() produces, that doesn't make much sense.
This is how json_encode() is supposed to work:
$data = array(
"projectNumber" => $sess_proj_no,
"projectStage" => $sess_proj_stage,
"newVersion" => $new_version_no,
"undefinedValue" => array(
"projectNumber" => $projectNumber,
"variableContingencyCost" => $variableContingencyValue,
"variableContingencyValue" => $variableContingencyRate,
"actualPlusContingencyCost" => $actualPlusContingencyCost,
),
);
$json = json_encode($data);
|
|
|
|
|
Oh!
Wow thanks, I had no idea. That makes sense.
Will give it a try!
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I'm using Firefox 68.0.2 (64 bit) and a habit that I have been forming involves "bookmarking" webpages on a daily basis by pulling the site URL directly from the displayed address in the control at the top of the page as it appears in the browser onto the Bookmarks Toolbar (which is loaded with titled folders, as you would imagine, accounting for the passage of time/greater utility/etc). If a user does what I do in this way, he can right-click on any "saved" url and get a PROPERTIES dialog box to pop up and allow access to four things "Name", "Location", "Tags", and "Keyword".
So, a shortcut with properties. Considering a shortcut ... unless I saved a whole webpage to disk and then opened that local page in the browser and THEN pulled the URL to my Bookmarks Toolbar and then set about adding KEYWORDS to that local reference through the PROPERTIES/Keywords control, I would expect that by adding keywords to a link like this, to a REMOTE webpage on some server somewhere on the internet, that such a "save" would involve tracking those added keywords locally (I know it's through a SQLite database in the Mozilla folder) and I can assume that this is indeed what the local SQLite database keeps track of, among other things.
Well the behavior I observe is odd then; why does saving a webpage (as .html document for instance) to a location on a drive on my computer, placing a link to it in the bookmarks toolbar folder of choice, altering the links Properties/Keyword by adding a descriptive component, then saving that add, CHANGE THE PROPERTY OF THAT LOCAL WEBPAGE ... NOT just the link of the bookmark toolbar? It does. Somehow.
Try this yourself by saving a webpage to disk, opening that saved webpage in firefox browser, sliding a link from the address control to the browser toolbar, then opening that link. Once the page is verified "here" right-click the link again, choose Properties, see the Keywords control box, and type in some new/other term. AND now, this is the important part, copy this link, paste it somewhere else in the toolbar (behind a folder perhaps), open it so the local webpage is displayed, click once again on the link, get the properties/keyword control ... see that duplicate keyword you just typed in for the original, DELETE that keyword, and type in another keyword then save.
See my confusion:
Load the original link again, look at properties/keyword and see that the original now has the changed keyword (the original keyword has been erased and replaced with the copy's keyword).
This shouldn't be happening. Despite the fact that the link on the toolbar is connected to a local webpage and not some remote page address found in the browser's lookup under SQLite/Mozilla database, the keyword should still be associated with the LINK ALONE, NOT THE LOCAL FILE.
Yes?
Is not a webpage keyword (remote) stored in the SQLite database? Is not the sole keyword lookup for a given Bookmarked URL on my firefox toolbar being facilitated by a browser's delve into that SQLite data to return the keyword in that property's keyword {space} (for lack of a proper name for an association that a database uses to link such things under cover of it's functionality)?
How could I possibly be dis-explaining this to myself?
|
|
|
|
|
Is it possible to write libraries that contain controls/markup for use by multiple MVC5 apps?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
|
We're not using Core
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I know - that's why I suggested RazorGenerator.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Well, I installed it and finally figured out how to get it working (the docs aren't exactly forthcoming - or complete).
In any case, it looks like this is my only choice if I want to try doing what I need, so I 5'd you., Thanks for the info.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I am dismayed to find no tangible examples of its usage - nothing but casual mentions of what people did to make it work.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Hi there:
I have to debug two branches of the same codebase side-by-side (a development branch vs a release branch), as we're seeing unexplained differences in behaviour between them. I've opened two copies of VS 2019 (latest patch v18.6.3 at 16th Dec 2020), and when launching them, one will succeed, and the other will throw up an error message:
One or more errors occurred.
Failed to launch the debug adapter. Additional information be be available in the output window.
Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:4318).
What I've tried:
- Making sure that each web project is set to start on a unique port number, I've selected 53199 for one branch and 53200 for another.
- Delete the applicationhost.config inside .vs, restart VS and let it recreate.
What I've noticed:
- The two Visual Studios try to launch as tabs in the SAME Chrome instance. I loaded a random different project from another codebase and that project launched its own new Chrome instance.
- Inside each applicationhost.config, in the <sites> section, BOTH projects have:
<site name="foo.Web" id="2">
- Their site "id" is the same, but each config file does have the correct virtualdirectorypath for its project location.
- this is new behaviour (maybe a new bug?) and I've been able to run this configuration plenty of times in the past.
- the output window contains only this:
Verbose logs are written to:
C:\Users\Bar\AppData\Local\Temp\visualstudio-js-debugger.txt
The program '' has exited with code -1 (0xffffffff).
The program '[21072] iisexpress.exe' has exited with code 0 (0x0).
- as each site starts up, the visual studio debugger log shows a --remote-debugging-port which is unique for each site, so no conflict there...
Since we're using TFS version control, "two branches" in this context means two completely different folders on disk, each with a full copy of the project source inside. I cannot see why these projects interfere with each other. Each one launches into debug successfully on its own and then the other won't launch.
Can I "fool" VS / IIS Express by manually changing the site "id" or "name" in applicationhost.config?
Any help gratefully appreciated!
-- edit: there are workarounds, e.g. using two different browsers, but still would like to clarify whether it's me or VS or IIS express causing this, and whether it can be fixed!
|
|
|
|
|
You could always just set them up as their own sites in IIS and attach the debugger of each instance of VS to the relevant site. I'm pretty sure what you're trying should work anyway so don't know if there is something odd going on with your project structure or what the sites are doing. I'd try the IIS route though as I know that definitely works.
|
|
|
|
|
I'm trying to diagnose an issue with a mod I wrote.
So I start with $rs2 = -1, then I increment $rs2, but when I print $res2 in the table cell, $rs2 goes ...
0
1
0
1
1
1
1
1
I thought since $rs2 is the origin number to feed into mod, that the number should increment.
0
1
2
3
4
5
6
7
It's works on the other function with the same mechanics here. Just not this one.
I haven't worked PHP since 2005, so I'm a bit rusty.
$rs2++;
$stripe2 = ($rs2 % 2 == 0) ? "rowStripe" : "";
echo "
<tr>
<td class='report-table-body-20 $stripe2'>
<p class='report-table-body-p'> $rs2 $equip_cat_name</p>
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I was in a double while loop.
And incremented in the 2nd internal while, my bad!
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
|
Oh, that's a good idea
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|