Include Does Not Work In Codeigniter 4.1.9 - codeigniter-4

Hye, I'm still trying to dive in to learn some of the framework such as Codeigniter and Laravel, but i stumbled into a problem which is $this->include does not work, I am trying to include file that have html code... I've tried looking on the internet, trying out several other method but it still does not work
Here What I've Been Trying,
$this->include('test');
I've Also Tried Using The Controller Code Which Is,
return view('test');
And Lastly, I've tried,
$this->load->view('test');
But none of them works.

Try echo view('test');
Loading Multiple Views

echo view_cell('view file',[$datas=>$values])
https://codeigniter.com/user_guide/general/common_functions.html?highlight=view_cell#view_cell

Related

Why won't my one simple custom user Python snippet '__init__' appear in IntelliSense?

I've spent the last two hours trying to figure this out, but nothing I've found online helps. Either all search results I've found were severely outdated, not relevant to my problem, or didn't work.
I am a complete beginner to Python, so please try to make your suggestions/solutions/answers understandable enough for me (i.e. draw them in crayon if you must.:)) I want the init method to not autocomplete all of this:
__init__(self, *groups: _Group) -> None:
super().__init__(*groups)
I want it to simply autocomplete as "init()" and that's it, nice and clean for what I'm currently doing.
Searching around, looking at other python snippet extension files, and even using a snippet generator, I've
found that this should be the code that I should use:
"__init__ method":
{
"prefix": "__init__",
"body": ["__init__($0)"],
"description": "New __init__ method"
}
I've created a global.code-snippets file and even a python.json file with Configure User Snippets, both of which are located in C:\Users<myusername>\AppData\Roaming\Code\User\snippets. However, it does not show up when I type out init, instead I still get the default suggestions:
Default init suggestions
What am I missing? I didn't think this would be so difficult.
I've looked at https://code.visualstudio.com/docs/editor/userdefinedsnippets, I've tried https://snippet-generator.app/, I've checked out other Python snippet extensions to see how they were written out.
A bit more digging around and using different keyword searches this morning brought me to IntelliSense in Visual Studio Code, and 3/4 of the way down there was Suggestion selection which said to use the editor.suggestSelection setting. Turns out it was disabled. Once I enabled it, both my python.json and global.code-snippet suggestions showed up.

URL Binding issue Vue/webpack

I'm having a peculiar problem when I'm trying to bind an img-tag to a dynamic url.
After finding some similar solutions I found the way to go was by binding the src attribute like this
:src="require(....)"
The problem is however that it only works in the specific format
:src="require('#assets/vendor-'+name+'.svg')"
I'd like to use format src:="require(path)" but I can't seem to get this solution to work.
After some reading some suggestions would point to Webpack causing the issue but currently my knowledge is very limited.
EDIT 1:
Currently I have to extract the name from the JSON-file and add it to that path rather than just using the path found in the JSON-file.
:src="require('#/assets/vendor-' + this.$store.state.vendors[this.cardInfo.vendor].name + '.svg')"
I'd like to make this work
:src="require(this.$store.state.vendors[this.cardInfo.vendor].baseUrl)"

Watir-webdriver issue with options.yml file

I have been using firewatir for quite some time but thinking of switching to watir-webdriver. I was playing with my existing script and getting an error in the IRB when i use watir-webdriver
Here is my code from existing script
require 'rubygems'
require 'watir-webdriver'
Watir.options_file = 'classes/options.yml'
I am getting a following error
"undefined method `options_file=' for Watir:Module (NoMethodError)"
Can someone point me to the right direction since I am lost on this for couple of days.
Thanks
Watir != Watir-Webdriver. Watir-Webdriver does not support options.yml using options_file, or most likely the options you're setting in it (browser.speed, etc).
You can find a list of available methods, as well as a comparison list of the two here: http://jarib.github.com/watir-webdriver/doc/ .
If you post the options you are setting in that file we can help you determine if they're available in Watir-Webdriver, or how else you use them.
Thanks
You can read more about watir-webdriver at http://watirwebdriver.com/

twitter search api no results with OR

This suddenly stopped working, it was working, but now its not:
If I use the twitter UI and go to:
https://twitter.com/#!/search/%22social%20snap%22%20OR%20%22socialsnap%22%20OR%20%22socialsnap.com%22
I get 7 results.
If I use the api with the same call:
http://search.twitter.com/search.json?q="social snap" OR "socialsnap" OR "socialsnap.com"
I get zero results (ran in browser to simplify test)
Im sure im being an idiot or there is some encoding issue, but im stuck...any ideas?
Well I finally figured it out, I have no idea why, but this works:
http://search.twitter.com/search.json?q=/"social snap" OR "socialsnap" OR "socialsnap.com"
adding the slash after the q= makes it work...

Jelly script to reset the issue resolution in JIRA

I am trying to run a jelly script in JIRA to set the resolution to null for all my issues. The following script runs without errors and returns this:
<JiraJelly xmlns:jira='jelly:com.atlassian.jira.jelly.JiraTagLib' xmlns:log='jelly:log' xmlns:core='jelly:core' xmlns:jx='jelly:xml' xmlns:util='jelly:util'>org.ofbiz.core.entity.GenericValue.NULL_VALUEorg.ofbiz.core.entity.GenericValue.NULL_VALUEorg.ofbiz.core.entity.GenericValue.NULL_VALUE.... </JiraJelly>
Here is the script.
<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib" xmlns:util="jelly:util" xmlns:core="jelly:core" xmlns:jx="jelly:xml" xmlns:log="jelly:log">
<jira:RunSearchRequest var="issues" />
<core:forEach var="genericIssue" items="${issues}">
<core:invokeStatic className="com.atlassian.jira.issue.IssueImpl" method="getIssueObject" var="issue">
<core:arg type="org.ofbiz.core.entity.GenericValue" value="${genericIssue}"/>
</core:invokeStatic>
<core:invoke on="${issue}" method="setResolution">
<core:arg type="org.ofbiz.core.entity.GenericValue">org.ofbiz.core.entity.GenericValue.NULL_VALUE</core:arg>
</core:invoke>
</core:forEach>
</JiraJelly>
Does any one have any idea why this isn't working or have any ideas on how I might set the resolution to nothing?
Thank you!!
Updating issues via jelly in JIRA is a bit broken. The best example of how to make it work that I've seen is by using ActionDispatcher as shown on the docs page in a comment by Alastair King.
I know it can be done with Jelly runner, but i thinks that this would be easier to do so using the Jira remote API or the Jira CLI. A more elaborated example of the Jira remote API can be found here. If anyone wants me to post a working source code feel free to ask.

Resources