|
Hola! Creé una pagina de streaming de películas con la api themovildb, el problema es que todas las películas están en ingles.¿como puedo obtener películas en español...
Gracias por apoyar!
|
|
|
|
|
English please.
".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
|
|
|
|
|
You may have to refer to the API documentation:
API: Languages[^]
You can try to add
&language=es to your request string to get a result in Spanish language.
while (!(success = Try()));
|
|
|
|
|
Try a Spanish movie forum.
|
|
|
|
|
As pointed out in the second response, just read the documentation. It's in there.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I am using BackGroundWorkd to show the time a specific method takes by using a progress bar in windows form .
I have an Event handler
backgroundWorker1_DoWork that is being called from my button click this function is used for my long running function.
I not sure how to asynchronously run my progress bar and function at the same time.
Here is my DoWork EventHandler:
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
int sum = 0;
var folder = @"C:\Users\kgraham\Documents\Test2" + @"\" + DateTime.Now.ToString("yyyy_MM_dd_") + "SA_Analysis_Report.xlsx";
for (int i = 0; i < 101; i++)
{
excelHelper.InsertNewRows();
sum = i;
backgroundWorker1.ReportProgress(i);
}
e.Result = sum;
excelHelper.Save(folder);
}
|
|
|
|
|
You have already posted this question and accepted a solution:
How to load the progress at the same time my method is running[^]
And based on your previous comments, this is nothing to do with web development; it's a desktop application.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
The answer didn't work like I Expected and yes this is a windows form application
|
|
|
|
|
hello dear experts, good day,
i want to connect two pages on which a plugin like
- participants_database or
- wp-job-manager runs
i want to do that via wpdb to another database :: how to combine two wp-pages - here i want to discuss a approach that works - see https:
- use Rest-API
- user other methods such als the following one which i want to discuss with you
If they are all on the same server under the same hosting account, that is helpful. In a case like that, you could write your custom code to access the other site’s database directly. This is discussed here, and it’s quite feasible: link: Using wpdb to connect to a separate database
see here the discussion of several approaches - which is so fruitful that i want to share it with you... - see https:
[b]question[/b]: I want to connect wpdb to another database. How do I create the instance and pass it the database name/username/password?
Answer1: 134 votes Yes it's possible. The wpdb object can be used to access any database and query any table. Absolutely no need to be Wordpress related, which is very interesting. The benefit is the ability to use all the wpdb classes and functions like get_results, etc so that there's no need to re-invent the wheel. Here's how:
[CODE]
$mydb = new wpdb('username','password','database','localhost');
$rows = $mydb->get_results("select Name from my_table");
echo "<ul>";
foreach ($rows as $obj) :
echo "<li>".$obj->Name."</li>";
endforeach;
echo "</ul>";[/CODE]
comment 1: you can also save time by using global $wpdb. But before firing ;[/CODE]$wpdb->get_results method,;[/CODE]
you must include wp-load.php as: [CODE]require_once('/your/wordpress/wp-load.php');[/CODE]
comment 2: Set WPDB prefix to make WP_Query and get_post to generate correct sql query by calling $mydb->set_prefix('wp_');
answer2: [ 30 votes ] Connecting to a second database is easy in WordPress, you simply create a new instance of the WPDB class and use it the same way you would use the standard $wpdb instance we all know and love.
Assuming the second database has the same login information as the main WP one you can even use the predefined constants
from wp-config.php to avoid hardcoding the login information.
[CODE]/**
* Instantiate the wpdb class to connect to your second database, $database_name
*/
$second_db = new wpdb(DB_USER, DB_PASSWORD, $database_name, DB_HOST);
/**
* Use the new database object just like you would use $wpdb
*/
$results = $second_db->get_results($your_query);[/CODE]
comment 1: This is somewhat redundant to Wadih's answer but I think my code example is a bit clearer and its also important to remember the db login constant's as they are almost always the right ones to use and otherwise you risk issues when moving from dev->stage->live environments where the login details might change. – jerclarke Sep 11 '10 at 20:55
comment 2: Set WPDB prefix to make WP_Query and get_post to generate correct sql query by calling [CODE]$second_db->set_prefix('wp_'); [/CODE]
answer3: [ 21 votes ] no one has said this so I thought I'd add an even easier way..as long as your additional database has the same user/pass details to access it as your wordpress database you can use the database name before the table name like this
[CODE]$query = $wpdb->prepare('SELECT * FROM dbname.dbtable WHERE 1');
$result = $wpdb->get_results($query);[/CODE]
comment 1: From my experience, this only works to get data, i.e. using SELECT. You can't insert data.
comment 2: it will not work externally,
- see https:
[b]Conclusio[/b]: well i like this approach very very much. The good thing - i am with the sites in question - i am on the same server - so i guess that this will work for me.
see the discussion of several approaches - which is so fruitful that i want to share it with you... - see https:
any idea any experience !?
love to hear from you
|
|
|
|
|
Hi!
To those who use Unity the 3D dev platform, I'm getting started with a project and want some version control to go with.
What are your experiences with version control? I've read that Unity supports Perforce and one other - also - proprietary VCS. Has anyone used Git or SVN with Unity? Any other methods I'm not aware of?
Thanks!
|
|
|
|
|
Years ago I used TortoiseSVN for code (wasn't unity) but it was file based so it did not matter. It had a plugin to File Explorer and was independent of the IDE. It worked great.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I following this article. Everything works great - from a browser.
What we're really after is to use SignalR in a WPF app, so during development I had been hosting in a Console app. Now, I want to host it in IIS.
For testing, I took this sample app and hosted it in IIS on our server. Like I said already, I can chat using from browser to browser.
Now, I'm trying to create a Console app that calls the Send method on the server from my PC:
class Program
{
private const string HUB_NAME = "ChatHub";
private static IHubProxy HubProxy;
static void Main(string[] args)
{
try
{
string url = "<a href="http:
var connection = new HubConnection(url);
HubProxy = connection.CreateHubProxy(HUB_NAME);
HubProxy.On<string, string>("send", HandleSendResponse);
connection.StateChanged += Connection_StateChanged;
connection.Error += Connection_Error;
Console.WriteLine($"Connecting to hub named '{HUB_NAME}' at {url}");
connection.Start().ContinueWith(task =>
{
if (task.IsFaulted)
{
Console.WriteLine("Connection failed");
foreach (var ex in task.Exception.InnerExceptions)
{
Console.WriteLine(ex.Message);
}
}
else
{
Console.WriteLine("Connection succeeded");
}
});
}
catch (Exception e)
{
Console.WriteLine("EXCEPTION OCCURED" + Environment.NewLine + e.ToString());
}
Console.WriteLine("Press any key to quit");
Console.ReadLine();
}
private static void Connection_Error(Exception obj)
{
Console.WriteLine($"Connection attempt threw '{obj.ToString()}'");
}
private static void Connection_StateChanged(StateChange obj)
{
Console.WriteLine($"Connection state is '{obj.NewState}'");
if (obj.NewState == ConnectionState.Connected)
{
string[] args = new string[2];
args[0] = "John Doe";
args[1] = "Hello there!";
HubProxy.Invoke("Send", args).ContinueWith(task =>
{
if (task.IsFaulted)
{
Console.WriteLine("There was an error calling Send: {0}", task.Exception.GetBaseException());
Console.WriteLine(task.Status.ToString());
}
else
{
Console.WriteLine("Send Complete.");
}
}).Wait();
}
}
private static void HandleSendResponse(string name, string message)
{
Console.WriteLine($"Server returned: '{message}' from '{name}'");
}
}
I'm getting the exception "You are using a version of the client that isn't compatible with the server. Client version 2.0, server version 1.3."
This looks pretty straightforward, but I've checked twice - both the server and client console app are using SignalR 2.0.0.
In the case of the browser, the jquery versions also look up to date, but my console app should care about that.
I've Googled this and everyone seems ot say the same thing as the message. But from what I can see the versions are correct.
Anyone have any ideas?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
|
I need to install an Asp.Net Web API to IIS on a server as part of another app's installation. We're using Wix to create our installers. During installation of our app, we would also like to put our Web API in IIS on a server.
I see plenty of resources on how to deploy using VS, but how do I do this with an installation package?
How is this done?
Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
I'm working in VS2019 on a web project and once in a while this pops up when I go to simply run the code from within Visual Studios..... I know it has something to do with permissions at the URL but in this case I'm running to loacal server from within VS. How can my permissions change like that and what can I do to fix it? Thanks.
Hide Copy Code
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Most likely causes:
A default document is not configured for the requested URL, and directory browsing is not enabled on the server.
|
|
|
|
|
You probably have it set to run based on the selected document and your selected document is a folder or something that can't be browsed to. Right click a default page and choose to set it as default page.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
|
When I run the code by itself(Index.cshtml), I don't get an error and everything works but when I try to make it a partial view in my details.cshtml page with
Html.RenderAction("Index", "FileUpload"); I get $(...).fileupload is not a function.
Code:Index.cshtml
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>index</title>
<link href="~/Content/FileUpload/FileUpload.css" rel="stylesheet" />
</head>
<body>
<div class="upload">
<div>
<form id="upload" method="post" action="/FileUpload/UploadFiles" enctype="multipart/form-data">
<div id="drop">
<a>Upload File</a>
<input type="file" name="upl" multiple id="fileuploader" />
</div>
<ul>
<!-- The file uploads will be shown here -->
</ul>
</form>
<script src="~/Scripts/jquery-3.1.0.min.js"></script>
<!-- JavaScript Includes -->
@*<script src="~/Scripts/jquery.knob.js"></script>*@
<script src="~/Scripts/FileUpload/jquery.knob.js"></script>
<!-- JavaScript Includes -->
<!-- jQuery File Upload Dependencies -->
@*<script src="~/Scripts/jquery.ui.widget.js"></script>*@
<script src="~/Scripts/FileUpload/jquery.ui.widget.js"></script>
@*<script src="~/Scripts/jquery.iframe-transport.js"></script>*@
<script src="~/Scripts/FileUpload/jquery.iframe-transport.js"></script>
@*<script src="~/Scripts/jquery.fileupload.js"></script>*@
<script src="~/Scripts/FileUpload/jquery.fileupload.js"></script>
<!-- jQuery File Upload Dependencies -->
<!-- Main JavaScript file -->
@*<script src="~/Scripts/script.js"></script>*@
<script src="~/Scripts/script.js"></script>
<!-- Main JavaScript file -->
</div>
</div>
</body>
</html>
Controller:
public class FileUploadController : Controller
{
[ChildActionOnly]
public ActionResult Index()
{
return PartialView();
}
[HttpPost]
public void UploadFiles()
{
if (Request.Files?.Count > 0)
{
var filesCount = Request.Files.Count;
for (int i = 0; i < filesCount; i++)
{
var file = Request.Files[i];
var fileName = Path.GetFileName(file.FileName);
var path = Path.Combine(Server.MapPath("~/Uploads/"), fileName);
file.SaveAs(path);
}
}
}
Code:Details.cshtml
@{.
.
Html.RenderAction("Index", "FileUpload");
}
|
|
|
|
|
Quote: everything works but when I try to make it a partial view Maybe your partial view does not load the scripts that are needed to be there for that fileupload to be defined. Check your browser console to see the actual error, most probably, inside the partial view you need to import the JavaScript for the fileupload component and then call the $(...).fileupload() .
This line to be precise,
<script src="~/Scripts/FileUpload/jquery.fileupload.js"></script> If you are sure that you have called this script and it is a part of the DOM, and still this error comes, please share the browser console logs so that we can look into them. You can capture that using F12 and then visiting console (if some other tab is selected).
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
This is the error that I am receiving :
jquery-3.1.0.min.js:2 Uncaught TypeError: $(...).fileupload is not a function
at HTMLDocument.<anonymous> (script.js:12)
at j (jquery-3.1.0.min.js:2)
at k (jquery-3.1.0.min.js:2)
|
|
|
|
|
Can you show the content of your script.js file? The problem comes somewhere from there,
<script src="~/Scripts/script.js"></script> Somewhere at line 12, there is a call to the fileupload function and you can need to make sure that your fileupload script is loaded before line 12 (anywhere!).
One thing that is still bugging me is that why is jquery-3.1.0.min.js in this entire trace. Maybe you are causing a circular (or duplicate) script being loaded. Please verify that each script is loaded only one, and in a correct layout—like your normal view is working out, because this problem comes only in the partial view.
For example, see here for some more insights on the same problem: jQuery-File-Upload - TypeError: $(...).fileupload is not a function - Stack Overflow
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Here is the scripts.js file., also how are you identifying that jquery-3.1.0.min.js in this entire trace, I'm just passing the script
<script src="~/Scripts/jquery-3.1.0.min.js"></script>
in the Index.cshtml file which is the view that I am calling in my Details.cshtml.
script.js:
$(document).ready(function () {
var ul = $('#upload ul');
$('#drop a').click(function () {
$(this).parent().find('input').click();
});
$('#upload').fileupload({
dropZone: $('#drop'),
add: function (e, data) {
var tpl = $('<li class="working"><input type="text" value="0" data-width="48" data-height="48"' +
' data-fgColor="#0788a5" data-readOnly="1" data-bgColor="#3e4043" /><p></p><span></span></li>');
tpl.find('p').text(data.files[0].name)
.append('' + formatFileSize(data.files[0].size) + '');
data.context = tpl.appendTo(ul);
tpl.find('input').knob();
tpl.find('span').click(function () {
if (tpl.hasClass('working')) {
jqXHR.abort();
}
tpl.fadeOut(function () {
tpl.remove();
});
});
var jqXHR = data.submit();
},
progress: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
data.context.find('input').val(progress).change();
if (progress == 100) {
data.context.removeClass('working');
}
},
fail: function (e, data) {
data.context.addClass('error');
}
});
$(document).on('drop dragover', function (e) {
e.preventDefault();
});
function formatFileSize(bytes) {
if (typeof bytes !== 'number') {
return '';
}
if (bytes >= 1000000000) {
return (bytes / 1000000000).toFixed(2) + ' GB';
}
if (bytes >= 1000000) {
return (bytes / 1000000).toFixed(2) + ' MB';
}
return (bytes / 1000).toFixed(2) + ' KB';
}
});
modified 30-Jul-19 15:35pm.
|
|
|
|
|
Hmmm, this looks fine. Just make sure that this partial view is loaded after you have loaded the script. Maybe bring all the scripts up to the top of the body element or at least before this partial view loading.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
That didn't fix the issue.
|
|
|
|
|
The problem only appears in partial view, right? Not if you keep everything inside the same view.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|